diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-04-16 09:46:58 +0200 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-04-16 09:46:58 +0200 |
commit | f36f453dd293a847978186ad7c920b14c4914373 (patch) | |
tree | 731a102697b21aa163b634d0d01be245dfcc5b64 /lib/helper.php | |
parent | f1015c88faf8ce418c5e0f983756d71403044210 (diff) | |
download | nextcloud-server-f36f453dd293a847978186ad7c920b14c4914373.tar.gz nextcloud-server-f36f453dd293a847978186ad7c920b14c4914373.zip |
apps are now stored in /apps
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php index a10697c3933..982da7b6cc3 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -35,6 +35,12 @@ class OC_HELPER { */ public static function linkTo( $app, $file ){ global $WEBROOT; + global $SERVERROOT; + + // Check if the app is in the app folder + if( file_exists( "$SERVERROOT/apps/$app/$file" )){ + return "$WEBROOT/apps/$app/$file"; + } return "$WEBROOT/$app/$file"; } @@ -47,7 +53,12 @@ class OC_HELPER { * Returns the path to the image. */ public static function imagePath( $app, $image ){ + global $SERVERROOT; global $WEBROOT; + // Check if the app is in the app folder + if( file_exists( "$SERVERROOT/apps/img/$app/$file" )){ + return "$WEBROOT/apps/img/$app/$file"; + } return "$WEBROOT/$app/img/$image"; } |