diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-09-17 16:33:27 +0200 |
---|---|---|
committer | npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com> | 2019-09-28 09:39:28 +0000 |
commit | de6940352a2f708376219a89ec84a8e6d25ca59e (patch) | |
tree | 459bacfc183b24d611be1877fbe22bbcd4efb1d6 /lib/private | |
parent | c8cd607681ac128228f57114ce14dd67ab05de04 (diff) | |
download | nextcloud-server-de6940352a2f708376219a89ec84a8e6d25ca59e.tar.gz nextcloud-server-de6940352a2f708376219a89ec84a8e6d25ca59e.zip |
Move settings to an app
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Accounts/AccountManager.php | 2 | ||||
-rw-r--r-- | lib/private/AppFramework/App.php | 2 | ||||
-rw-r--r-- | lib/private/L10N/Factory.php | 3 | ||||
-rw-r--r-- | lib/private/Route/Router.php | 5 | ||||
-rw-r--r-- | lib/private/Settings/Manager.php | 21 |
5 files changed, 16 insertions, 17 deletions
diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index 408f070dc0d..7a73ec455eb 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -33,7 +33,7 @@ use OCP\IDBConnection; use OCP\IUser; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; -use OC\Settings\BackgroundJobs\VerifyUserData; +use OCA\Settings\BackgroundJobs\VerifyUserData; /** * Class AccountManager diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php index 6185a35d1d7..691c5514881 100644 --- a/lib/private/AppFramework/App.php +++ b/lib/private/AppFramework/App.php @@ -104,8 +104,6 @@ class App { if ($appName === 'core') { $appNameSpace = 'OC\\Core'; - } else if ($appName === 'settings') { - $appNameSpace = 'OC\\Settings'; } else { $appNameSpace = self::buildAppNamespace($appName); } diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 80f12c0a832..2e1652e9a1b 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -469,7 +469,6 @@ class Factory implements IFactory { if (($this->isSubDirectory($transFile, $this->serverRoot . '/core/l10n/') || $this->isSubDirectory($transFile, $this->serverRoot . '/lib/l10n/') - || $this->isSubDirectory($transFile, $this->serverRoot . '/settings/l10n/') || $this->isSubDirectory($transFile, \OC_App::getAppPath($app) . '/l10n/') ) && file_exists($transFile)) { @@ -496,7 +495,7 @@ class Factory implements IFactory { * @return string directory */ protected function findL10nDir($app = null) { - if (in_array($app, ['core', 'lib', 'settings'])) { + if (in_array($app, ['core', 'lib'])) { if (file_exists($this->serverRoot . '/' . $app . '/l10n/')) { return $this->serverRoot . '/' . $app . '/l10n/'; } diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php index 1839b356424..3d91a33cd8a 100644 --- a/lib/private/Route/Router.php +++ b/lib/private/Route/Router.php @@ -162,7 +162,6 @@ class Router implements IRouter { if (!isset($this->loadedApps['core'])) { $this->loadedApps['core'] = true; $this->useCollection('root'); - require_once __DIR__ . '/../../../settings/routes.php'; require_once __DIR__ . '/../../../core/routes.php'; // Also add the OCS collection @@ -258,7 +257,9 @@ class Router implements IRouter { $app = \OC_App::cleanAppId($app); \OC::$REQUESTEDAPP = $app; $this->loadRoutes($app); - } else if (substr($url, 0, 6) === '/core/' or substr($url, 0, 10) === '/settings/') { + } else if (substr($url, 0, 10) === '/settings/') { + $this->loadRoutes('settings'); + } else if (substr($url, 0, 6) === '/core/') { \OC::$REQUESTEDAPP = $url; if (!\OC::$server->getConfig()->getSystemValueBool('maintenance') && !Util::needUpgrade()) { \OC_App::loadApps(); diff --git a/lib/private/Settings/Manager.php b/lib/private/Settings/Manager.php index 1a9e8261ee8..48e2d34a5dd 100644 --- a/lib/private/Settings/Manager.php +++ b/lib/private/Settings/Manager.php @@ -30,6 +30,7 @@ namespace OC\Settings; use Closure; +use OC\Settings\Personal\PersonalInfo; use OCP\AppFramework\QueryException; use OCP\IL10N; use OCP\ILogger; @@ -245,32 +246,32 @@ class Manager implements IManager { if ($section === 'overview') { /** @var ISettings $form */ - $form = $this->container->query(Admin\Overview::class); + $form = $this->container->query(\OCA\Settings\Admin\Overview::class); if ($filter === null || $filter($form)) { $forms[$form->getPriority()] = [$form]; } } if ($section === 'server') { /** @var ISettings $form */ - $form = $this->container->query(Admin\Server::class); + $form = $this->container->query(\OCA\Settings\Admin\Server::class); if ($filter === null || $filter($form)) { $forms[$form->getPriority()] = [$form]; } - $form = $this->container->query(Admin\Mail::class); + $form = $this->container->query(\OCA\Settings\Admin\Mail::class); if ($filter === null || $filter($form)) { $forms[$form->getPriority()] = [$form]; } } if ($section === 'security') { /** @var ISettings $form */ - $form = $this->container->query(Admin\Security::class); + $form = $this->container->query(\OCA\Settings\Admin\Security::class); if ($filter === null || $filter($form)) { $forms[$form->getPriority()] = [$form]; } } if ($section === 'sharing') { /** @var ISettings $form */ - $form = $this->container->query(Admin\Sharing::class); + $form = $this->container->query(\OCA\Settings\Admin\Sharing::class); if ($filter === null || $filter($form)) { $forms[$form->getPriority()] = [$form]; } @@ -289,23 +290,23 @@ class Manager implements IManager { if ($section === 'personal-info') { /** @var ISettings $form */ - $form = $this->container->query(Personal\PersonalInfo::class); + $form = $this->container->query(\OCA\Settings\Personal\PersonalInfo::class); $forms[$form->getPriority()] = [$form]; - $form = new Personal\ServerDevNotice(); + $form = new \OCA\Settings\Personal\ServerDevNotice(); $forms[$form->getPriority()] = [$form]; } if ($section === 'security') { /** @var ISettings $form */ - $form = $this->container->query(Personal\Security::class); + $form = $this->container->query(\OCA\Settings\Personal\Security::class); $forms[$form->getPriority()] = [$form]; /** @var ISettings $form */ - $form = $this->container->query(Personal\Security\Authtokens::class); + $form = $this->container->query(\OCA\Settings\Personal\Security\Authtokens::class); $forms[$form->getPriority()] = [$form]; } if ($section === 'additional') { /** @var ISettings $form */ - $form = $this->container->query(Personal\Additional::class); + $form = $this->container->query(\OCA\Settings\Personal\Additional::class); $forms[$form->getPriority()] = [$form]; } |