|
|
|
|
@ -36,12 +36,16 @@ class OC_HELPER { |
|
|
|
|
public static function linkTo( $app, $file ){ |
|
|
|
|
global $WEBROOT; |
|
|
|
|
global $SERVERROOT; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!empty($app)) { |
|
|
|
|
$app .= '/'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Check if the app is in the app folder |
|
|
|
|
if( file_exists( "$SERVERROOT/apps/$app/$file" )){ |
|
|
|
|
return "$WEBROOT/apps/$app/$file"; |
|
|
|
|
if( file_exists( $SERVERROOT . '/apps/'. $app . $file )){ |
|
|
|
|
return $WEBROOT . '/apps/' . $app . $file; |
|
|
|
|
} |
|
|
|
|
return "$WEBROOT/$app/$file"; |
|
|
|
|
return $WEBROOT . '/' . $app . $file; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|