Skip to content
Snippets Groups Projects
Commit 45076edf authored by Bart Visscher's avatar Bart Visscher
Browse files

Merge pull request #3891 from owncloud/fix_loadAppScriptFile

Check if the app is enabled and the app path is found before trying to l...
parents b9a95af1 57370353
Branches
No related tags found
No related merge requests found
......@@ -669,12 +669,15 @@ class OC {
$app = $param['app'];
$file = $param['file'];
$app_path = OC_App::getAppPath($app);
$file = $app_path . '/' . $file;
unset($app, $app_path);
if (file_exists($file)) {
require_once $file;
return true;
if (OC_App::isEnabled($app) && $app_path !== false) {
$file = $app_path . '/' . $file;
unset($app, $app_path);
if (file_exists($file)) {
require_once $file;
return true;
}
}
header('HTTP/1.0 404 Not Found');
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment