summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/app.php3
-rw-r--r--lib/private/app/appmanager.php4
-rw-r--r--lib/private/repair.php2
3 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/app.php b/lib/private/app.php
index 3a1f731d621..60b644e58e2 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -321,6 +321,9 @@ class OC_App {
* @param string $app app
*/
public static function disable($app) {
+ if($app === 'files') {
+ throw new \Exception("files can't be disabled.");
+ }
self::$enabledAppsCache = array(); // flush
// check if app is a shipped app or not. if not delete
\OC_Hook::emit('OC_App', 'pre_disable', array('app' => $app));
diff --git a/lib/private/app/appmanager.php b/lib/private/app/appmanager.php
index 6d9aa0bfe37..20a765e3434 100644
--- a/lib/private/app/appmanager.php
+++ b/lib/private/app/appmanager.php
@@ -131,8 +131,12 @@ class AppManager implements IAppManager {
* Disable an app for every user
*
* @param string $appId
+ * @throws \Exception if app can't be disabled
*/
public function disableApp($appId) {
+ if($appId === 'files') {
+ throw new \Exception("files can't be disabled.");
+ }
$this->appConfig->setValue($appId, 'enabled', 'no');
}
}
diff --git a/lib/private/repair.php b/lib/private/repair.php
index d9fd99707e8..c74283896fd 100644
--- a/lib/private/repair.php
+++ b/lib/private/repair.php
@@ -13,6 +13,7 @@ use OC\Hooks\Emitter;
use OC\Repair\AssetCache;
use OC\Repair\CleanTags;
use OC\Repair\Collation;
+use OC\Repair\EnableFilesApp;
use OC\Repair\FillETags;
use OC\Repair\InnoDB;
use OC\Repair\RepairConfig;
@@ -84,6 +85,7 @@ class Repair extends BasicEmitter {
new AssetCache(),
new FillETags(\OC_DB::getConnection()),
new CleanTags(\OC_DB::getConnection()),
+ new EnableFilesApp(\OC::$server->getConfig()),
);
}