mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-15351: fixing the path arguments, and a bit of white space drama cleanup.
This commit is contained in:
parent
03f3db97c3
commit
d292a40c99
@ -27,7 +27,7 @@ class repository_local extends repository {
|
||||
}
|
||||
|
||||
private function _encode_path($filearea, $path, $visiblename) {
|
||||
return array(serialize(array($filearea, $path)), $visiblename);
|
||||
return array('path'=>serialize(array($filearea, $path)), 'name'=>$visiblename);
|
||||
}
|
||||
|
||||
private function _decode_path($path) {
|
||||
@ -70,7 +70,7 @@ class repository_local extends repository {
|
||||
$level = $fileinfo->get_parent();
|
||||
while ($level) {
|
||||
$params = $level->get_params();
|
||||
$ret['path'][] = $this->_encode_path($params['filearea'], $params['filepath'], $level->get_visible_name());
|
||||
$ret['path'] = $this->_encode_path($params['filearea'], $params['filepath'], $level->get_visible_name());
|
||||
$level = $level->get_parent();
|
||||
}
|
||||
}
|
||||
@ -128,7 +128,7 @@ class repository_local extends repository {
|
||||
$level = $child->get_parent();
|
||||
while ($level) {
|
||||
$params = $level->get_params();
|
||||
$path[] = $this->_encode_path($params['filearea'], $params['filepath'], $level->get_visible_name());
|
||||
$path = $this->_encode_path($params['filearea'], $params['filepath'], $level->get_visible_name());
|
||||
$level = $level->get_parent();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user