diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/app.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/private/app.php b/lib/private/app.php index faaadef3857..a97db7b5e53 100644 --- a/lib/private/app.php +++ b/lib/private/app.php @@ -92,7 +92,7 @@ class OC_App { if ($checkUpgrade and self::shouldUpgrade($app)) { throw new \OC\NeedsUpdateException(); } - require_once $app . '/appinfo/app.php'; + self::requireAppFile($app); if (self::isType($app, array('authentication'))) { // since authentication apps affect the "is app enabled for group" check, // the enabled apps cache needs to be cleared to make sure that the @@ -104,6 +104,16 @@ class OC_App { } /** + * Load app.php from the given app + * + * @param string $app app name + */ + private static function requireAppFile($app) { + // encapsulated here to avoid variable scope conflicts + require_once $app . '/appinfo/app.php'; + } + + /** * check if an app is of a specific type * * @param string $app |