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 | |
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')
-rw-r--r-- | lib/base.php | 3 | ||||
-rw-r--r-- | lib/composer/composer/autoload_classmap.php | 34 | ||||
-rw-r--r-- | lib/composer/composer/autoload_psr4.php | 1 | ||||
-rw-r--r-- | lib/composer/composer/autoload_static.php | 39 | ||||
-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 |
9 files changed, 18 insertions, 92 deletions
diff --git a/lib/base.php b/lib/base.php index f7153247393..7674c16c26b 100644 --- a/lib/base.php +++ b/lib/base.php @@ -726,7 +726,8 @@ class OC { // Make sure that the application class is not loaded before the database is setup if ($systemConfig->getValue("installed", false)) { - $settings = new \OC\Settings\Application(); + OC_App::loadApp('settings'); + $settings = new \OCA\Settings\AppInfo\Application(); $settings->register(); } diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 48be2fc03fb..ab0543b0068 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -1142,41 +1142,7 @@ return array( 'OC\\Session\\Internal' => $baseDir . '/lib/private/Session/Internal.php', 'OC\\Session\\Memory' => $baseDir . '/lib/private/Session/Memory.php', 'OC\\Session\\Session' => $baseDir . '/lib/private/Session/Session.php', - 'OC\\Settings\\Activity\\GroupProvider' => $baseDir . '/settings/Activity/GroupProvider.php', - 'OC\\Settings\\Activity\\GroupSetting' => $baseDir . '/settings/Activity/GroupSetting.php', - 'OC\\Settings\\Activity\\Provider' => $baseDir . '/settings/Activity/Provider.php', - 'OC\\Settings\\Activity\\SecurityFilter' => $baseDir . '/settings/Activity/SecurityFilter.php', - 'OC\\Settings\\Activity\\SecurityProvider' => $baseDir . '/settings/Activity/SecurityProvider.php', - 'OC\\Settings\\Activity\\SecuritySetting' => $baseDir . '/settings/Activity/SecuritySetting.php', - 'OC\\Settings\\Activity\\Setting' => $baseDir . '/settings/Activity/Setting.php', - 'OC\\Settings\\Admin\\Mail' => $baseDir . '/settings/Settings/Admin/Mail.php', - 'OC\\Settings\\Admin\\Overview' => $baseDir . '/settings/Settings/Admin/Overview.php', - 'OC\\Settings\\Admin\\Security' => $baseDir . '/settings/Settings/Admin/Security.php', - 'OC\\Settings\\Admin\\Server' => $baseDir . '/settings/Settings/Admin/Server.php', - 'OC\\Settings\\Admin\\Sharing' => $baseDir . '/settings/Settings/Admin/Sharing.php', - 'OC\\Settings\\Application' => $baseDir . '/settings/Application.php', - 'OC\\Settings\\BackgroundJobs\\VerifyUserData' => $baseDir . '/settings/BackgroundJobs/VerifyUserData.php', - 'OC\\Settings\\Controller\\AdminSettingsController' => $baseDir . '/settings/Controller/AdminSettingsController.php', - 'OC\\Settings\\Controller\\AppSettingsController' => $baseDir . '/settings/Controller/AppSettingsController.php', - 'OC\\Settings\\Controller\\AuthSettingsController' => $baseDir . '/settings/Controller/AuthSettingsController.php', - 'OC\\Settings\\Controller\\CertificateController' => $baseDir . '/settings/Controller/CertificateController.php', - 'OC\\Settings\\Controller\\ChangePasswordController' => $baseDir . '/settings/Controller/ChangePasswordController.php', - 'OC\\Settings\\Controller\\CheckSetupController' => $baseDir . '/settings/Controller/CheckSetupController.php', - 'OC\\Settings\\Controller\\CommonSettingsTrait' => $baseDir . '/settings/Controller/CommonSettingsTrait.php', - 'OC\\Settings\\Controller\\LogSettingsController' => $baseDir . '/settings/Controller/LogSettingsController.php', - 'OC\\Settings\\Controller\\MailSettingsController' => $baseDir . '/settings/Controller/MailSettingsController.php', - 'OC\\Settings\\Controller\\PersonalSettingsController' => $baseDir . '/settings/Controller/PersonalSettingsController.php', - 'OC\\Settings\\Controller\\TwoFactorSettingsController' => $baseDir . '/settings/Controller/TwoFactorSettingsController.php', - 'OC\\Settings\\Controller\\UsersController' => $baseDir . '/settings/Controller/UsersController.php', - 'OC\\Settings\\Hooks' => $baseDir . '/settings/Hooks.php', - 'OC\\Settings\\Mailer\\NewUserMailHelper' => $baseDir . '/settings/Mailer/NewUserMailHelper.php', 'OC\\Settings\\Manager' => $baseDir . '/lib/private/Settings/Manager.php', - 'OC\\Settings\\Middleware\\SubadminMiddleware' => $baseDir . '/settings/Middleware/SubadminMiddleware.php', - 'OC\\Settings\\Personal\\Additional' => $baseDir . '/settings/Settings/Personal/Additional.php', - 'OC\\Settings\\Personal\\PersonalInfo' => $baseDir . '/settings/Settings/Personal/PersonalInfo.php', - 'OC\\Settings\\Personal\\Security' => $baseDir . '/settings/Settings/Personal/Security.php', - 'OC\\Settings\\Personal\\Security\\Authtokens' => $baseDir . '/settings/Settings/Personal/Security/Authtokens.php', - 'OC\\Settings\\Personal\\ServerDevNotice' => $baseDir . '/settings/Settings/Personal/ServerDevNotice.php', 'OC\\Settings\\Section' => $baseDir . '/lib/private/Settings/Section.php', 'OC\\Setup' => $baseDir . '/lib/private/Setup.php', 'OC\\Setup\\AbstractDatabase' => $baseDir . '/lib/private/Setup/AbstractDatabase.php', diff --git a/lib/composer/composer/autoload_psr4.php b/lib/composer/composer/autoload_psr4.php index 2561f0048c5..31c762759e3 100644 --- a/lib/composer/composer/autoload_psr4.php +++ b/lib/composer/composer/autoload_psr4.php @@ -6,7 +6,6 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname(dirname($vendorDir)); return array( - 'OC\\Settings\\' => array($baseDir . '/settings'), 'OC\\Core\\' => array($baseDir . '/core'), 'OC\\' => array($baseDir . '/lib/private'), 'OCP\\' => array($baseDir . '/lib/public'), diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index 0a5a1dc2fb6..d6c449bff48 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -9,7 +9,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c public static $prefixLengthsPsr4 = array ( 'O' => array ( - 'OC\\Settings\\' => 12, 'OC\\Core\\' => 8, 'OC\\' => 3, 'OCP\\' => 4, @@ -17,10 +16,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c ); public static $prefixDirsPsr4 = array ( - 'OC\\Settings\\' => - array ( - 0 => __DIR__ . '/../../..' . '/settings', - ), 'OC\\Core\\' => array ( 0 => __DIR__ . '/../../..' . '/core', @@ -1176,41 +1171,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Session\\Internal' => __DIR__ . '/../../..' . '/lib/private/Session/Internal.php', 'OC\\Session\\Memory' => __DIR__ . '/../../..' . '/lib/private/Session/Memory.php', 'OC\\Session\\Session' => __DIR__ . '/../../..' . '/lib/private/Session/Session.php', - 'OC\\Settings\\Activity\\GroupProvider' => __DIR__ . '/../../..' . '/settings/Activity/GroupProvider.php', - 'OC\\Settings\\Activity\\GroupSetting' => __DIR__ . '/../../..' . '/settings/Activity/GroupSetting.php', - 'OC\\Settings\\Activity\\Provider' => __DIR__ . '/../../..' . '/settings/Activity/Provider.php', - 'OC\\Settings\\Activity\\SecurityFilter' => __DIR__ . '/../../..' . '/settings/Activity/SecurityFilter.php', - 'OC\\Settings\\Activity\\SecurityProvider' => __DIR__ . '/../../..' . '/settings/Activity/SecurityProvider.php', - 'OC\\Settings\\Activity\\SecuritySetting' => __DIR__ . '/../../..' . '/settings/Activity/SecuritySetting.php', - 'OC\\Settings\\Activity\\Setting' => __DIR__ . '/../../..' . '/settings/Activity/Setting.php', - 'OC\\Settings\\Admin\\Mail' => __DIR__ . '/../../..' . '/settings/Settings/Admin/Mail.php', - 'OC\\Settings\\Admin\\Overview' => __DIR__ . '/../../..' . '/settings/Settings/Admin/Overview.php', - 'OC\\Settings\\Admin\\Security' => __DIR__ . '/../../..' . '/settings/Settings/Admin/Security.php', - 'OC\\Settings\\Admin\\Server' => __DIR__ . '/../../..' . '/settings/Settings/Admin/Server.php', - 'OC\\Settings\\Admin\\Sharing' => __DIR__ . '/../../..' . '/settings/Settings/Admin/Sharing.php', - 'OC\\Settings\\Application' => __DIR__ . '/../../..' . '/settings/Application.php', - 'OC\\Settings\\BackgroundJobs\\VerifyUserData' => __DIR__ . '/../../..' . '/settings/BackgroundJobs/VerifyUserData.php', - 'OC\\Settings\\Controller\\AdminSettingsController' => __DIR__ . '/../../..' . '/settings/Controller/AdminSettingsController.php', - 'OC\\Settings\\Controller\\AppSettingsController' => __DIR__ . '/../../..' . '/settings/Controller/AppSettingsController.php', - 'OC\\Settings\\Controller\\AuthSettingsController' => __DIR__ . '/../../..' . '/settings/Controller/AuthSettingsController.php', - 'OC\\Settings\\Controller\\CertificateController' => __DIR__ . '/../../..' . '/settings/Controller/CertificateController.php', - 'OC\\Settings\\Controller\\ChangePasswordController' => __DIR__ . '/../../..' . '/settings/Controller/ChangePasswordController.php', - 'OC\\Settings\\Controller\\CheckSetupController' => __DIR__ . '/../../..' . '/settings/Controller/CheckSetupController.php', - 'OC\\Settings\\Controller\\CommonSettingsTrait' => __DIR__ . '/../../..' . '/settings/Controller/CommonSettingsTrait.php', - 'OC\\Settings\\Controller\\LogSettingsController' => __DIR__ . '/../../..' . '/settings/Controller/LogSettingsController.php', - 'OC\\Settings\\Controller\\MailSettingsController' => __DIR__ . '/../../..' . '/settings/Controller/MailSettingsController.php', - 'OC\\Settings\\Controller\\PersonalSettingsController' => __DIR__ . '/../../..' . '/settings/Controller/PersonalSettingsController.php', - 'OC\\Settings\\Controller\\TwoFactorSettingsController' => __DIR__ . '/../../..' . '/settings/Controller/TwoFactorSettingsController.php', - 'OC\\Settings\\Controller\\UsersController' => __DIR__ . '/../../..' . '/settings/Controller/UsersController.php', - 'OC\\Settings\\Hooks' => __DIR__ . '/../../..' . '/settings/Hooks.php', - 'OC\\Settings\\Mailer\\NewUserMailHelper' => __DIR__ . '/../../..' . '/settings/Mailer/NewUserMailHelper.php', 'OC\\Settings\\Manager' => __DIR__ . '/../../..' . '/lib/private/Settings/Manager.php', - 'OC\\Settings\\Middleware\\SubadminMiddleware' => __DIR__ . '/../../..' . '/settings/Middleware/SubadminMiddleware.php', - 'OC\\Settings\\Personal\\Additional' => __DIR__ . '/../../..' . '/settings/Settings/Personal/Additional.php', - 'OC\\Settings\\Personal\\PersonalInfo' => __DIR__ . '/../../..' . '/settings/Settings/Personal/PersonalInfo.php', - 'OC\\Settings\\Personal\\Security' => __DIR__ . '/../../..' . '/settings/Settings/Personal/Security.php', - 'OC\\Settings\\Personal\\Security\\Authtokens' => __DIR__ . '/../../..' . '/settings/Settings/Personal/Security/Authtokens.php', - 'OC\\Settings\\Personal\\ServerDevNotice' => __DIR__ . '/../../..' . '/settings/Settings/Personal/ServerDevNotice.php', 'OC\\Settings\\Section' => __DIR__ . '/../../..' . '/lib/private/Settings/Section.php', 'OC\\Setup' => __DIR__ . '/../../..' . '/lib/private/Setup.php', 'OC\\Setup\\AbstractDatabase' => __DIR__ . '/../../..' . '/lib/private/Setup/AbstractDatabase.php', 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]; } |