]> git.mjollnir.org Git - moodle.git/commitdiff
"REPOSITORY/MDL-13766, return unknown type icon for repository api"
authordongsheng <dongsheng>
Thu, 12 Mar 2009 08:02:51 +0000 (08:02 +0000)
committerdongsheng <dongsheng>
Thu, 12 Mar 2009 08:02:51 +0000 (08:02 +0000)
lib/filelib.php

index 0a9848646ff89f166ff969dd210785e4569a1e66..50aa5e44c9cdd43ecb221093e93ae1d60e20dc75 100644 (file)
@@ -719,13 +719,16 @@ function mimeinfo($element, $filename) {
                 if (file_exists($CFG->dirroot.'/pix/f/'.$filename)) {
                     return $filename;
                 } else {
-                    return $CFG->pixpath.'/f/unknown-32.png';   // By default
+                    return 'unknown-32.png';
                 }
             } else {
                 return $mimeinfo['xxx'][$element];   // By default
             }
         }
     } else {
+        if ($element == 'icon32') {
+            return 'unknown-32.png';
+        }
         return $mimeinfo['xxx'][$element];   // By default
     }
 }