Merge branch 'refactoring' of git.kde.org:owncloud into refactoring

This commit is contained in:
Frank Karlitschek 2011-04-16 14:37:51 +02:00
commit 5112295723
1 changed files with 9 additions and 5 deletions

View File

@ -36,12 +36,16 @@ 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";
if(!empty($app)) {
$app .= '/';
}
return "$WEBROOT/$app/$file";
// 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;
}
/**