summaryrefslogtreecommitdiffstats
path: root/lib/private/app.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-03-23 17:17:33 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-03-23 17:17:33 +0100
commit0adcb99110b96f310d6530b33b55c9e58abeb213 (patch)
tree25056b6938cec9e633c2af7db5f6fb0e9db50694 /lib/private/app.php
parentc93e4c806a0a39c2be4ee0e14ad0fd29f43ef730 (diff)
parent33cd60ab9aacd1f82a2e4cd31019ace26d597124 (diff)
downloadnextcloud-server-0adcb99110b96f310d6530b33b55c9e58abeb213.tar.gz
nextcloud-server-0adcb99110b96f310d6530b33b55c9e58abeb213.zip
Merge pull request #14862 from owncloud/introduce-shipped.json-master
shipped apps are now defined in core/shipped.json - the shipped tag in i...
Diffstat (limited to 'lib/private/app.php')
-rw-r--r--lib/private/app.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/private/app.php b/lib/private/app.php
index d30ada0391a..1b004154173 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -42,6 +42,7 @@ class OC_App {
static private $appTypes = array();
static private $loadedApps = array();
static private $altLogin = array();
+ private static $shippedApps = null;
/**
* clean the appId
@@ -182,12 +183,18 @@ class OC_App {
* Check if an app that is installed is a shipped app or installed from the appstore.
*/
public static function isShipped($appId) {
- $info = self::getAppInfo($appId);
- if (isset($info['shipped']) && $info['shipped'] == 'true') {
- return true;
- } else {
- return false;
+ if (is_null(self::$shippedApps)) {
+ $shippedJson = \OC::$SERVERROOT . '/core/shipped.json';
+ if (file_exists($shippedJson)) {
+ self::$shippedApps = json_decode(file_get_contents($shippedJson), true);
+ self::$shippedApps = self::$shippedApps['shippedApps'];
+ } else {
+ self::$shippedApps = ['files', 'files_encryption', 'files_external',
+ 'files_sharing', 'files_trashbin', 'files_versions', 'provisioning_api',
+ 'user_ldap', 'user_webdavauth'];
+ }
}
+ return in_array($appId, self::$shippedApps);
}
/**