don't manifold slashes in case empty $app is forwarded to linkTo()
This commit is contained in:
parent
8465f76e7e
commit
627dc95d19
|
@ -36,12 +36,16 @@ class OC_HELPER {
|
||||||
public static function linkTo( $app, $file ){
|
public static function linkTo( $app, $file ){
|
||||||
global $WEBROOT;
|
global $WEBROOT;
|
||||||
global $SERVERROOT;
|
global $SERVERROOT;
|
||||||
|
|
||||||
// Check if the app is in the app folder
|
if(!empty($app)) {
|
||||||
if( file_exists( "$SERVERROOT/apps/$app/$file" )){
|
$app .= '/';
|
||||||
return "$WEBROOT/apps/$app/$file";
|
|
||||||
}
|
}
|
||||||
return "$WEBROOT/$app/$file";
|
|
||||||
|
// Check if the app is in the app folder
|
||||||
|
if( file_exists( $SERVERROOT . '/apps/'. $app . $file )){
|
||||||
|
return $WEBROOT . '/apps/' . $app . $file;
|
||||||
|
}
|
||||||
|
return $WEBROOT . '/' . $app . $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue