MDL-33399 mixed: Fixed up calls to get_area_files that used empty sorts
authorSam Hemelryk <sam@moodle.com>
Tue, 29 May 2012 04:44:28 +0000 (16:44 +1200)
committerSam Hemelryk <sam@moodle.com>
Tue, 29 May 2012 04:44:28 +0000 (16:44 +1200)
lib/filebrowser/file_info_stored.php
lib/portfolio/exporter.php
mod/scorm/datamodels/aicclib.php

index a5a37a3..2f3ea57 100644 (file)
@@ -505,7 +505,7 @@ class file_info_stored extends file_info {
         if ($this->is_directory()) {
             $filepath = $this->lf->get_filepath();
             $fs = get_file_storage();
-            $storedfiles = $fs->get_area_files($this->context->id, $this->get_component(), $this->lf->get_filearea(), $this->lf->get_itemid(), "");
+            $storedfiles = $fs->get_area_files($this->context->id, $this->get_component(), $this->lf->get_filearea(), $this->lf->get_itemid());
             foreach ($storedfiles as $file) {
                 if (strpos($file->get_filepath(), $filepath) === 0) {
                     $file->delete();
index 81727f5..3baf0b5 100644 (file)
@@ -809,7 +809,7 @@ class portfolio_exporter {
      */
     public function get_tempfiles($skipfile='portfolio-export.zip') {
         $fs = get_file_storage();
-        $files = $fs->get_area_files(SYSCONTEXTID, 'portfolio', 'exporter', $this->id, '', false);
+        $files = $fs->get_area_files(SYSCONTEXTID, 'portfolio', 'exporter', $this->id, 'sortorder, itemid, filepath, filename', false);
         if (empty($files)) {
             return array();
         }
index c926c12..43369fe 100644 (file)
@@ -121,7 +121,7 @@ function scorm_parse_aicc($scorm) {
 
     $fs = get_file_storage();
 
-    $files = $fs->get_area_files($context->id, 'mod_scorm', 'content', 0, '', false);
+    $files = $fs->get_area_files($context->id, 'mod_scorm', 'content', 0, 'sortorder, itemid, filepath, filename', false);
 
     $version = 'AICC';
     $ids = array();