Skip to content
Snippets Groups Projects
Commit 29b9e270 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

fix linkto function in OC_Helper

parent fd47fbe1
No related branches found
No related tags found
No related merge requests found
......@@ -41,11 +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($app, -1, 1) == '/'){
$app = substr($app, 0, strlen($app) - 1);
if(substr($file, -3) == 'php'){
if(substr($app, -1, 1) == '/'){
$app = substr($app, 0, strlen($app) - 1);
}
$urlLinkTo = OC::$APPSWEBROOT . '/?app=' . $app;
$urlLinkTo .= ($file!='index.php')?'&getfile=' . urlencode($file):'';
}else{
$urlLinkTo = OC::$APPSWEBROOT . '/' . $app . $file;
}
$urlLinkTo = OC::$APPSWEBROOT . '/?app=' . $app;
$urlLinkTo .= ($file!='index.php')?'&getfile=' . urlencode($file):'';
}
else{
$urlLinkTo = OC::$WEBROOT . '/' . $app . $file;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment