From: Jakob Sack Date: Mon, 20 Jun 2011 19:01:34 +0000 (+0200) Subject: Fix linkTo() X-Git-Tag: v3.0~267^2~487 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb1ce7819a16e9b780e1272e405950817d1de6dc;p=nextcloud-server.git Fix linkTo() --- diff --git a/lib/helper.php b/lib/helper.php index 6f7d7ce251e..8cd6ebf75a5 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -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; } /**