MDL-24636 File API: Fixed calculation of the number of current files when merging...
authorDavid Mudrak <david.mudrak@gmail.com>
Tue, 12 Oct 2010 14:56:01 +0000 (14:56 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Tue, 12 Oct 2010 14:56:01 +0000 (14:56 +0000)
lib/filelib.php

index 18637a0..7c4c8de 100644 (file)
@@ -677,7 +677,7 @@ function file_save_draft_area_files($draftitemid, $contextid, $component, $filea
             }
             // unchanged file or directory - we keep it as is
             unset($newhashes[$oldhash]);
-            if (!$file->is_directory()) {
+            if (!$oldfile->is_directory()) {
                 $filecount++;
             }
         }