Merge pull request #3891 from owncloud/fix_loadAppScriptFile
Check if the app is enabled and the app path is found before trying to l...
This commit is contained in:
commit
45076edf4f
13
lib/base.php
13
lib/base.php
|
@ -669,12 +669,15 @@ class OC {
|
||||||
$app = $param['app'];
|
$app = $param['app'];
|
||||||
$file = $param['file'];
|
$file = $param['file'];
|
||||||
$app_path = OC_App::getAppPath($app);
|
$app_path = OC_App::getAppPath($app);
|
||||||
$file = $app_path . '/' . $file;
|
if (OC_App::isEnabled($app) && $app_path !== false) {
|
||||||
unset($app, $app_path);
|
$file = $app_path . '/' . $file;
|
||||||
if (file_exists($file)) {
|
unset($app, $app_path);
|
||||||
require_once $file;
|
if (file_exists($file)) {
|
||||||
return true;
|
require_once $file;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
header('HTTP/1.0 404 Not Found');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue