summaryrefslogtreecommitdiffstats
path: root/apps/files/js/files.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-04-04 11:32:07 +0200
committerVincent Petry <pvince81@owncloud.com>2014-04-04 11:34:26 +0200
commita4eafca77f86ab2630bec698c3302c93daddb991 (patch)
treed19954cea3761efe945e1cee0816c69fc555e94b /apps/files/js/files.js
parent8a10c44eb33d45e2deba7d72b30e509fa332fb24 (diff)
downloadnextcloud-server-a4eafca77f86ab2630bec698c3302c93daddb991.tar.gz
nextcloud-server-a4eafca77f86ab2630bec698c3302c93daddb991.zip
Moved code to replace svg with png to OC.Util
- Moved code that replaces the "svg" extension for the given file to core as OC.Util.replaceSVGIcon. - Added unit test for OC.Util.replaceSVGIcon - Moved "replaceSVG" to OC.Util.replaceSVG and deprecated the global "replaceSVG" function. - Added alias for SVGSupport() as OC.Util.hasSVGSupport() (for now)
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 4c2d87d808c..668faf723c8 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -635,7 +635,7 @@ Files.getMimeIcon = function(mime, ready) {
ready(Files.getMimeIcon.cache[mime]);
} else {
$.get( OC.filePath('files','ajax','mimeicon.php'), {mime: mime}, function(path) {
- if(SVGSupport()){
+ if(OC.Util.hasSVGSupport()){
path = path.substr(0, path.length-4) + '.svg';
}
Files.getMimeIcon.cache[mime]=path;