Index: main/trunk/greenstone2/perllib/plugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugin.pm	(revision 23212)
@@ -280,7 +280,6 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata, $extrametafile, 
-	$processor, $maxdocs, $gli, $aux) = @_;
-
-    $maxdocs = -1 unless defined $maxdocs && $maxdocs =~ /\d/;
+	$processor, $gli, $aux) = @_;
+
     $gli = 0 unless defined $gli;
 
@@ -313,5 +312,5 @@
 	$rv = $plugobj->metadata_read($pluginfo, $base_dir, $file, $block_hash,
 			     $extrametakeys, $extrametadata, $extrametafile,
-			     $processor, $maxdocs, $gli, $aux);
+			     $processor, $gli, $aux);
 
 	if (defined $rv) {
Index: main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm	(revision 23212)
@@ -189,5 +189,5 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata, $extrametafile,
-	$processor, $maxdocs, $gli) = @_;
+	$processor, $gli, $aux) = @_;
 
     return undef;
Index: main/trunk/greenstone2/perllib/plugins/BasePlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/BasePlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/BasePlugin.pm	(revision 23212)
@@ -939,5 +939,5 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata, $extrametafile,
-	$processor, $maxdocs, $gli) = @_;
+	$processor, $gli, $aux) = @_;
     
     # can we process this file??
Index: main/trunk/greenstone2/perllib/plugins/DSpacePlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/DSpacePlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/DSpacePlugin.pm	(revision 23212)
@@ -256,5 +256,5 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata, $extrametafile,
-	$processor, $maxdocs, $gli) = @_;
+	$processor, $gli, $aux) = @_;
 
     my $only_first_doc = $self->{'only_first_doc'};
Index: main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm	(revision 23212)
@@ -336,5 +336,5 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata, $extrametafile,
-	$processor, $maxdocs, $gli) = @_;
+	$processor, $gli, $aux) = @_;
 
     return undef;
@@ -379,5 +379,4 @@
     # Recur over directory contents.
     my (@dir, $subfile);
-    my $count = 0;
     
     print $outhandle "DirectoryPlugin read: getting directory $dirname\n" if ($verbosity > 2);
@@ -433,10 +432,10 @@
 	}
     }
-    # apply metadata pass for each of the files in the directory
+    # apply metadata pass for each of the files in the directory -- ignore
+    # maxdocs here
     my $num_files = scalar(@dir);
     for (my $i = 0; $i < scalar(@dir); $i++) {
 	my $subfile = $dir[$i];
 	my $this_file_base_dir = $base_dir;
-	last if ($maxdocs != -1 && $count >= $maxdocs);
 	next if ($subfile =~ m/^\.\.?$/);
 	my $file_subfile = &util::filename_cat($file, $subfile);
@@ -450,9 +449,9 @@
 	print $outhandle "DirectoryPlugin metadata recurring: $subfile\n" if ($verbosity > 2);
 	
-	$count += &plugin::metadata_read ($pluginfo, $this_file_base_dir,
-					  $file_subfile,$block_hash,
-					  \@extrametakeys, \%extrametadata,
-					  \%extrametafile,
-					  $processor, $maxdocs, $gli);
+	&plugin::metadata_read ($pluginfo, $this_file_base_dir,
+				$file_subfile,$block_hash,
+				\@extrametakeys, \%extrametadata,
+				\%extrametafile,
+				$processor, $gli);
 	$additionalmetadata = 1;
     }
@@ -485,5 +484,5 @@
     
     # import each of the files in the directory
-    $count=0;
+    my $count=0;
     for (my $i = 0; $i <= scalar(@dir); $i++) {
 	# When every file in the directory has been done, pause for a moment (figuratively!)
Index: main/trunk/greenstone2/perllib/plugins/EmbeddedMetadataPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/EmbeddedMetadataPlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/EmbeddedMetadataPlugin.pm	(revision 23212)
@@ -203,5 +203,5 @@
   my ($pluginfo, $base_dir, $file, $block_hash, 
       $extrametakeys, $extrametadata, $extrametafile,
-      $processor, $maxdocs, $gli) = @_;
+      $processor, $gli, $aux) = @_;
   
   my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file);
Index: main/trunk/greenstone2/perllib/plugins/GreenstoneXMLPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/GreenstoneXMLPlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/GreenstoneXMLPlugin.pm	(revision 23212)
@@ -97,5 +97,5 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata, $extrametafile,
-	$processor, $maxdocs, $gli) = @_;
+	$processor, $gli, $aux) = @_;
 
     my $outhandle = $self->{'outhandle'};
Index: main/trunk/greenstone2/perllib/plugins/LOMPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/LOMPlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/LOMPlugin.pm	(revision 23212)
@@ -123,5 +123,5 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata, $extrametafile,
-	$processor, $maxdocs, $gli) = @_;
+	$processor, $gli, $aux) = @_;
 
     my $outhandle = $self->{'outhandle'};
Index: main/trunk/greenstone2/perllib/plugins/MetadataCSVPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/MetadataCSVPlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/MetadataCSVPlugin.pm	(revision 23212)
@@ -99,5 +99,5 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata, $extrametafile,
-	$processor, $maxdocs, $gli) = @_;
+	$processor, $gli, $aux) = @_;
 
     # Read metadata from CSV files
Index: main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm	(revision 23212)
@@ -228,5 +228,5 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata,$extrametafile,
-	$processor, $maxdocs, $gli) = @_;
+	$processor, $gli, $aux) = @_;
 
     my $filename = &util::filename_cat($base_dir, $file);
Index: main/trunk/greenstone2/perllib/plugins/OAIMetadataXMLPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/OAIMetadataXMLPlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/OAIMetadataXMLPlugin.pm	(revision 23212)
@@ -84,5 +84,5 @@
 {
   my $self = shift (@_);
-  my ($pluginfo, $base_dir, $file, $block_hash, $extrametakeys, $extrametadata,$extrametafile, $processor, $maxdocs, $gli) = @_;
+  my ($pluginfo, $base_dir, $file, $block_hash, $extrametakeys, $extrametadata,$extrametafile, $processor, $gli, $aux) = @_;
   
   # Read in the normal metadata.xml file
Index: main/trunk/greenstone2/perllib/plugins/OAIPlugin.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/OAIPlugin.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/OAIPlugin.pm	(revision 23212)
@@ -191,5 +191,5 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata, $extrametafile,
-	$processor, $maxdocs, $gli) = @_;
+	$processor, $gli, $aux) = @_;
 
     # can we process this file??
Index: main/trunk/greenstone2/perllib/plugins/SplitTextFile.pm
===================================================================
--- main/trunk/greenstone2/perllib/plugins/SplitTextFile.pm	(revision 23211)
+++ main/trunk/greenstone2/perllib/plugins/SplitTextFile.pm	(revision 23212)
@@ -120,7 +120,7 @@
     my ($pluginfo, $base_dir, $file, $block_hash, 
 	$extrametakeys, $extrametadata, $extrametafile,
-	$processor, $maxdocs, $gli) = @_;
-
-    # returns 1 if matches process_exp, and has done blocking in the meantime
+	$processor, $gli, $aux) = @_;
+
+    # returns 1 if matches process_exp
     my $matched = $self->SUPER::metadata_read($pluginfo, $base_dir, $file,
 					      $block_hash, 
@@ -128,5 +128,5 @@
 					      $extrametadata, 
 					      $extrametafile,
-					      $processor, $maxdocs, $gli);
+					      $processor, $gli, $aux);
     my $split_matched = undef;
 
