diff options
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/lib/helper.php b/lib/helper.php index 2ddd5e7b778..f5e247ca9eb 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -41,15 +41,15 @@ class OC_Helper { $app .= '/'; // Check if the app is in the app folder if( file_exists( OC::$APPSROOT . '/apps/'. $app.$file )){ - if(substr($file, -3) == 'php' || substr($file, -3) == 'css'){ + //if(substr($file, -3) == 'php' || substr($file, -3) == 'css'){ if(substr($app, -1, 1) == '/'){ $app = substr($app, 0, strlen($app) - 1); } $urlLinkTo = OC::$WEBROOT . '/?app=' . $app; $urlLinkTo .= ($file!='index.php')?'&getfile=' . urlencode($file):''; - }else{ - $urlLinkTo = OC::$APPSWEBROOT . '/apps/' . $app . $file; - } + //}else{ + // $urlLinkTo = OC::$APPSWEBROOT . '/apps/' . $app . $file; + //} } else{ $urlLinkTo = OC::$WEBROOT . '/' . $app . $file; @@ -106,6 +106,17 @@ class OC_Helper { } /** + * @brief Creates an absolute url for remote use + * @param $service id + * @returns the url + * + * Returns a absolute url to the given service. + */ + public static function linkToRemote( $service ) { + return self::linkToAbsolute( '', 'remote.php') . '/' . $service . '/'; + } + + /** * @brief Creates path to an image * @param $app app * @param $image image name @@ -576,14 +587,12 @@ class OC_Helper { return true; } } - /* - echo 'SUB: ' . $sub . "\n"; + /*echo 'SUB: ' . $sub . "\n"; echo 'PAR: ' . $parent . "\n"; echo 'REALSUB: ' . $realpath_sub . "\n"; echo 'REALPAR: ' . $realpath_parent . "\n"; echo substr($realpath_sub, 0, strlen($realpath_parent)); - exit; - */ + exit;*/ return false; } } |