summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-08-28 06:10:06 -0700
committerBart Visscher <bartv@thisnet.nl>2013-08-28 06:10:06 -0700
commit45076edf4fda2782a93f507e49ff39aec6eeccdf (patch)
tree25d55a782cd7c251c9d983e22586d6832654eb17 /lib
parentb9a95af12c20f18376df4c4f8355b9911ff5a7fd (diff)
parent57370353ad1b21156094adc3d1e735582bbd2bb0 (diff)
downloadnextcloud-server-45076edf4fda2782a93f507e49ff39aec6eeccdf.tar.gz
nextcloud-server-45076edf4fda2782a93f507e49ff39aec6eeccdf.zip
Merge pull request #3891 from owncloud/fix_loadAppScriptFile
Check if the app is enabled and the app path is found before trying to l...
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/base.php b/lib/base.php
index 89ebefb0dea..0c9fe329b8f 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -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;
}