MDL-22983 fixed incorrect repo icon locations - the /pix/ subfolder is the only way now
authorPetr Skoda <skodak@moodle.org>
Sat, 3 Jul 2010 14:40:33 +0000 (14:40 +0000)
committerPetr Skoda <skodak@moodle.org>
Sat, 3 Jul 2010 14:40:33 +0000 (14:40 +0000)
19 files changed:
repository/alfresco/pix/icon.png [moved from repository/alfresco/icon.png with 100% similarity]
repository/boxnet/pix/icon.png [moved from repository/boxnet/icon.png with 100% similarity]
repository/dropbox/pix/icon.png [moved from repository/dropbox/icon.png with 100% similarity]
repository/filesystem/pix/icon.png [moved from repository/filesystem/icon.png with 100% similarity]
repository/flickr/pix/icon.png [moved from repository/flickr/icon.png with 100% similarity]
repository/flickr_public/pix/icon.png [moved from repository/flickr_public/icon.png with 100% similarity]
repository/googledocs/pix/icon.png [moved from repository/googledocs/icon.png with 100% similarity]
repository/lib.php
repository/local/pix/icon.png [moved from repository/local/icon.png with 100% similarity]
repository/merlot/pix/icon.png [moved from repository/merlot/icon.png with 100% similarity]
repository/picasa/pix/icon.png [moved from repository/picasa/icon.png with 100% similarity]
repository/recent/pix/icon.png [moved from repository/recent/icon.png with 100% similarity]
repository/s3/pix/icon.png [moved from repository/s3/icon.png with 100% similarity]
repository/upload/pix/icon.png [moved from repository/upload/icon.png with 100% similarity]
repository/url/pix/icon.png [moved from repository/url/icon.png with 100% similarity]
repository/user/pix/icon.png [moved from repository/user/icon.png with 100% similarity]
repository/webdav/pix/icon.png [moved from repository/webdav/icon.png with 100% similarity]
repository/wikimedia/pix/icon.png [moved from repository/wikimedia/icon.png with 100% similarity]
repository/youtube/pix/icon.png [moved from repository/youtube/icon.png with 100% similarity]

index 22ff35f..2c407c2 100644 (file)
@@ -1191,13 +1191,13 @@ abstract class repository {
      * @return object
      */
     final public function get_meta() {
-        global $CFG;
+        global $CFG, $OUTPUT;
         $ft = new filetype_parser;
         $meta = new stdclass;
         $meta->id   = $this->id;
         $meta->name = $this->get_name();
         $meta->type = $this->options['type'];
-        $meta->icon = $CFG->httpswwwroot.'/repository/'.$meta->type.'/icon.png';
+        $meta->icon = $OUTPUT->pix_url('icon', 'repository_'.$meta->type)->out(false);
         $meta->supported_types = $ft->get_extensions($this->supported_filetypes());
         $meta->return_types = $this->supported_returntypes();
         return $meta;