/** * check if app is shipped * * @param string $appId the id of the app to check * @return bool * * Check if an app that is installed is a shipped app or installed from the appstore. */ public static function isShipped($appId) { 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', 'encryption', 'files_external', 'files_sharing', 'files_trashbin', 'files_versions', 'provisioning_api', 'user_ldap', 'user_webdavauth']; } } return in_array($appId, self::$shippedApps); }