diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-29 09:29:29 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-29 09:29:29 -0700 |
commit | e0bc89c87ff0bf51e0a3ba6537fa71500e10df28 (patch) | |
tree | 2223931481f9f871ebdf7fa9dbb16094b9665b68 /lib | |
parent | 2534c3bc7843ee7249e53d4bc404a6f08deffd12 (diff) | |
parent | 682d6e8a803d607b42f4179770ee332e1428ba05 (diff) | |
download | nextcloud-server-e0bc89c87ff0bf51e0a3ba6537fa71500e10df28.tar.gz nextcloud-server-e0bc89c87ff0bf51e0a3ba6537fa71500e10df28.zip |
Merge pull request #5577 from owncloud/fix_urlgenerator_imagepath
use SERVERROOT instead of WEBROOT in all file_exists checks, whitespace
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/urlgenerator.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/urlgenerator.php b/lib/private/urlgenerator.php index 1ec10fe5688..7795011fd06 100644 --- a/lib/private/urlgenerator.php +++ b/lib/private/urlgenerator.php @@ -88,27 +88,27 @@ class URLGenerator implements IURLGenerator { if (file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$image")) { return \OC::$WEBROOT . "/themes/$theme/apps/$app/img/$image"; } elseif (!file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$basename.svg") - && file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$basename.png")) { + && file_exists(\OC::$SERVERROOT . "/themes/$theme/apps/$app/img/$basename.png")) { return \OC::$WEBROOT . "/themes/$theme/apps/$app/img/$basename.png"; } elseif (file_exists(\OC_App::getAppPath($app) . "/img/$image")) { return \OC_App::getAppWebPath($app) . "/img/$image"; } elseif (!file_exists(\OC_App::getAppPath($app) . "/img/$basename.svg") - && file_exists(\OC_App::getAppPath($app) . "/img/$basename.png")) { + && file_exists(\OC_App::getAppPath($app) . "/img/$basename.png")) { return \OC_App::getAppPath($app) . "/img/$basename.png"; } elseif (!empty($app) and file_exists(\OC::$SERVERROOT . "/themes/$theme/$app/img/$image")) { return \OC::$WEBROOT . "/themes/$theme/$app/img/$image"; } elseif (!empty($app) and (!file_exists(\OC::$SERVERROOT . "/themes/$theme/$app/img/$basename.svg") - && file_exists(\OC::$WEBROOT . "/themes/$theme/$app/img/$basename.png"))) { + && file_exists(\OC::$SERVERROOT . "/themes/$theme/$app/img/$basename.png"))) { return \OC::$WEBROOT . "/themes/$theme/$app/img/$basename.png"; } elseif (!empty($app) and file_exists(\OC::$SERVERROOT . "/$app/img/$image")) { return \OC::$WEBROOT . "/$app/img/$image"; } elseif (!empty($app) and (!file_exists(\OC::$SERVERROOT . "/$app/img/$basename.svg") - && file_exists(\OC::$WEBROOT . "/$app/img/$basename.png"))) { + && file_exists(\OC::$SERVERROOT . "/$app/img/$basename.png"))) { return \OC::$WEBROOT . "/$app/img/$basename.png"; } elseif (file_exists(\OC::$SERVERROOT . "/themes/$theme/core/img/$image")) { return \OC::$WEBROOT . "/themes/$theme/core/img/$image"; } elseif (!file_exists(\OC::$SERVERROOT . "/themes/$theme/core/img/$basename.svg") - && file_exists(\OC::$SERVERROOT . "/themes/$theme/core/img/$basename.png")) { + && file_exists(\OC::$SERVERROOT . "/themes/$theme/core/img/$basename.png")) { return \OC::$WEBROOT . "/themes/$theme/core/img/$basename.png"; } elseif (file_exists(\OC::$SERVERROOT . "/core/img/$image")) { return \OC::$WEBROOT . "/core/img/$image"; |