diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-06-20 21:01:34 +0200 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-06-20 21:01:34 +0200 |
commit | eb1ce7819a16e9b780e1272e405950817d1de6dc (patch) | |
tree | 7ff0b1fb599aff22e08c4ead7d9b6c3fadcfa9f5 /lib/helper.php | |
parent | 91c37bbb7642b996e4c386b3033cca02831371ef (diff) | |
download | nextcloud-server-eb1ce7819a16e9b780e1272e405950817d1de6dc.tar.gz nextcloud-server-eb1ce7819a16e9b780e1272e405950817d1de6dc.zip |
Fix linkTo()
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/helper.php b/lib/helper.php index 6f7d7ce251e..8cd6ebf75a5 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -37,17 +37,24 @@ class OC_HELPER { global $WEBROOT; global $SERVERROOT; - if(!empty($app)) { + if( $app != '' ){ $app .= '/'; // Check if the app is in the app folder - if( file_exists( $SERVERROOT . '/apps/'. $app )){ + if( file_exists( $SERVERROOT . '/apps/'. $app.$file )){ return $WEBROOT . '/apps/' . $app . $file; } + else{ + return $WEBROOT . '/' . $app . $file; + } } else{ - $app = 'core'; + if( file_exists( $SERVERROOT . '/core/'. $file )){ + return $WEBROOT . '/core/'.$file; + } + else{ + return $WEBROOT . '/'.$file; + } } - return $WEBROOT . '/' . $app . $file; } /** |