MDL-33399 mixed: Fixed up calls to get_area_files that used empty sorts

This commit is contained in:
Sam Hemelryk 2012-05-29 16:44:28 +12:00
parent 9f4789b842
commit 849b9a6af7
3 changed files with 3 additions and 3 deletions

View 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();

View 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();
}

View 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();