make menu work with movable apps

This commit is contained in:
Georg Ehrke 2012-04-18 17:25:44 +02:00
parent eb29c577c2
commit dfc92675e0

View file

@ -41,7 +41,11 @@ class OC_Helper {
$app .= '/';
// Check if the app is in the app folder
if( file_exists( OC::$APPSROOT . '/apps/'. $app.$file )){
$urlLinkTo = OC::$APPSWEBROOT . '/apps/' . $app . $file;
if(substr($app, -1, 1) == '/'){
$app = substr($app, 0, strlen($app) - 1);
}
$urlLinkTo = OC::$WEBROOT . '?app=' . $app;
$urlLinkTo .= ($file!='index.php')?'&file=' . $file:'';
}
else{
$urlLinkTo = OC::$WEBROOT . '/' . $app . $file;