Merge branch 'MDL-58538-master' of git://github.com/junpataleta/moodle

This commit is contained in:
Dan Poltawski
2017-04-20 08:26:54 +01:00
3 changed files with 16 additions and 3 deletions
+2 -1
View File
@@ -1646,12 +1646,13 @@ class theme_config {
*
* Use this function sparingly and never for icons. For icons use pix_icon or the pix helper in a mustache template.
*
* @deprecated since Moodle 3.3
* @param string $imagename the name of the icon.
* @param string $component specification of one plugin like in get_string()
* @return moodle_url
*/
public function pix_url($imagename, $component) {
debugging('pix_url is deprecated. Use image_url for images and pix_icon for icons.');
debugging('pix_url is deprecated. Use image_url for images and pix_icon for icons.', DEBUG_DEVELOPER);
return $this->image_url($imagename, $component);
}
+11 -1
View File
@@ -253,8 +253,18 @@ class renderer_base {
return $classes;
}
/**
* Return the direct URL for an image from the pix folder.
*
* Use this function sparingly and never for icons. For icons use pix_icon or the pix helper in a mustache template.
*
* @deprecated since Moodle 3.3
* @param string $imagename the name of the icon.
* @param string $component specification of one plugin like in get_string()
* @return moodle_url
*/
public function pix_url($imagename, $component = 'moodle') {
debugging('pix_url is deprecated. Use image_url for images and pix_icon for icons.');
debugging('pix_url is deprecated. Use image_url for images and pix_icon for icons.', DEBUG_DEVELOPER);
return $this->page->theme->image_url($imagename, $component);
}
+3 -1
View File
@@ -283,6 +283,8 @@ class repository_onedrive extends repository {
* @param string $parent Parent id.
* @param int $page page.
* @return array of files and folders.
* @throws Exception
* @throws repository_exception
*/
protected function query($q, $path = null, $parent = null, $page = 0) {
global $OUTPUT;
@@ -322,7 +324,7 @@ class repository_onedrive extends repository {
'title' => $remotefile->name,
'path' => $this->build_node_path($remotefile->id, $remotefile->name, $path),
'date' => strtotime($remotefile->lastModifiedDateTime),
'thumbnail' => $OUTPUT->pix_url(file_folder_icon(64))->out(false),
'thumbnail' => $OUTPUT->image_url(file_folder_icon(64))->out(false),
'thumbnail_height' => 64,
'thumbnail_width' => 64,
'children' => []