Fix linkTo()

This commit is contained in:
Jakob Sack 2011-06-20 21:01:34 +02:00
parent 91c37bbb76
commit eb1ce7819a
1 changed files with 11 additions and 4 deletions

View File

@ -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;
}
/**