Skip to content
Snippets Groups Projects
Commit eb1ce781 authored by Jakob Sack's avatar Jakob Sack
Browse files

Fix linkTo()

parent 91c37bbb
Branches
No related tags found
No related merge requests found
...@@ -37,17 +37,24 @@ class OC_HELPER { ...@@ -37,17 +37,24 @@ class OC_HELPER {
global $WEBROOT; global $WEBROOT;
global $SERVERROOT; global $SERVERROOT;
if(!empty($app)) { if( $app != '' ){
$app .= '/'; $app .= '/';
// Check if the app is in the app folder // 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; return $WEBROOT . '/apps/' . $app . $file;
} }
else{
return $WEBROOT . '/' . $app . $file;
}
} }
else{ else{
$app = 'core'; if( file_exists( $SERVERROOT . '/core/'. $file )){
return $WEBROOT . '/core/'.$file;
}
else{
return $WEBROOT . '/'.$file;
}
} }
return $WEBROOT . '/' . $app . $file;
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment