r4915 - tags/METACAT_1_9_1/src/perl

walbridge at ecoinformatics.org walbridge at ecoinformatics.org
Mon Apr 13 16:13:49 PDT 2009


Author: walbridge
Date: 2009-04-13 16:13:49 -0700 (Mon, 13 Apr 2009)
New Revision: 4915

Modified:
   tags/METACAT_1_9_1/src/perl/register-dataset.cgi
Log:
the entry form javascript now correctly tracks the file numbers, and can be relied on instead of using upCount here

Modified: tags/METACAT_1_9_1/src/perl/register-dataset.cgi
===================================================================
--- tags/METACAT_1_9_1/src/perl/register-dataset.cgi	2009-04-13 23:10:24 UTC (rev 4914)
+++ tags/METACAT_1_9_1/src/perl/register-dataset.cgi	2009-04-13 23:13:49 UTC (rev 4915)
@@ -3846,12 +3846,10 @@
             debug("Processing file: $fn");
             # Upload the file object itself to a temporary file, copy file metadata to form
             my $fileInfo = processFile($fileName);
-            # if we have existing uploads, increment the counter to avoid overwriting
-            my $totalFileNum = $fileNum + $FORM::upCount;
-            $$templateVars{"upload_$totalFileNum"} = $fileInfo->{'fileHash'};
-            $$templateVars{"uploadname_$totalFileNum"} = $fileInfo->{'fileName'};
-            $$templateVars{"uploadtype_$totalFileNum"} = $fileInfo->{'contentType'};
-            $$templateVars{"uploadperm_$totalFileNum"} = param("uploadperm_$fileNum");
+            $$templateVars{"upload_$fileNum"} = $fileInfo->{'fileHash'};
+            $$templateVars{"uploadname_$fileNum"} = $fileInfo->{'fileName'};
+            $$templateVars{"uploadtype_$fileNum"} = $fileInfo->{'contentType'};
+            $$templateVars{"uploadperm_$fileNum"} = param("uploadperm_$fileNum");
             $uploadCount++;
         }
     }



More information about the Metacat-cvs mailing list