]> source.dussan.org Git - nextcloud-server.git/commitdiff
make menu work with movable apps
authorGeorg Ehrke <dev@georgswebsite.de>
Wed, 18 Apr 2012 15:25:44 +0000 (17:25 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Wed, 18 Apr 2012 15:25:44 +0000 (17:25 +0200)
lib/helper.php

index 61a57ec27e3f1b9e644900b3290cd94d013c4209..77b56051419ca27e63f0f7efc3a0a72d894fb402 100755 (executable)
@@ -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;