Skip to content

Commit

Permalink
MDL-33399 mixed: Fixed up calls to get_area_files that used empty sorts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Hemelryk committed May 29, 2012
1 parent 9f4789b commit 849b9a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/filebrowser/file_info_stored.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ public function delete() {
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();
Expand Down
2 changes: 1 addition & 1 deletion lib/portfolio/exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ public function zip_tempfiles($filename='portfolio-export.zip', $filepath='/fina
*/
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();
}
Expand Down
2 changes: 1 addition & 1 deletion mod/scorm/datamodels/aicclib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 849b9a6

Please sign in to comment.