aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Installer.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-09-05 12:55:24 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-12-13 13:06:12 +0100
commit3eee359d7ffd6219f6a2ab8cca18a13118552842 (patch)
tree94aa2317588ce3864a3d3715330c757f61d25713 /lib/private/Installer.php
parent642606754b133a36d7715b45b243155cbb006f95 (diff)
downloadnextcloud-server-3eee359d7ffd6219f6a2ab8cca18a13118552842.tar.gz
nextcloud-server-3eee359d7ffd6219f6a2ab8cca18a13118552842.zip
Allow to force enable apps via CLI
Co-authored-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Installer.php')
-rw-r--r--lib/private/Installer.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index 2ad1fb36af7..d583dd20761 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -94,10 +94,11 @@ class Installer {
* Installs an app that is located in one of the app folders already
*
* @param string $appId App to install
+ * @param bool $forceEnable
* @throws \Exception
* @return string app ID
*/
- public function installApp($appId) {
+ public function installApp(string $appId, bool $forceEnable = false): string {
$app = \OC_App::findAppInDirectories($appId);
if($app === false) {
throw new \Exception('App not found in any app directory');
@@ -117,7 +118,7 @@ class Installer {
}
$ignoreMaxApps = $this->config->getSystemValue('app_install_overwrite', []);
- $ignoreMax = in_array($appId, $ignoreMaxApps);
+ $ignoreMax = $forceEnable || in_array($appId, $ignoreMaxApps, true);
$version = implode('.', \OCP\Util::getVersion());
if (!\OC_App::isAppCompatible($version, $info, $ignoreMax)) {