Changeset View
Changeset View
Standalone View
Standalone View
src/applications/base/controller/PhabricatorController.php
| Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | if ($request->getUser()) { | ||||
| $user->attachAlternateCSRFString(PhabricatorHash::digest($phsid)); | $user->attachAlternateCSRFString(PhabricatorHash::digest($phsid)); | ||||
| } | } | ||||
| $request->setUser($user); | $request->setUser($user); | ||||
| } | } | ||||
| PhabricatorEnv::setLocaleCode($user->getTranslation()); | PhabricatorEnv::setLocaleCode($user->getTranslation()); | ||||
| $preferences = $user->loadPreferences(); | |||||
| if (PhabricatorEnv::getEnvConfig('darkconsole.enabled')) { | if (PhabricatorEnv::getEnvConfig('darkconsole.enabled')) { | ||||
| $dark_console = PhabricatorUserPreferences::PREFERENCE_DARK_CONSOLE; | $dark_console = PhabricatorDarkConsoleSetting::SETTINGKEY; | ||||
| if ($preferences->getPreference($dark_console) || | if ($user->getUserSetting($dark_console) || | ||||
| PhabricatorEnv::getEnvConfig('darkconsole.always-on')) { | PhabricatorEnv::getEnvConfig('darkconsole.always-on')) { | ||||
| $console = new DarkConsoleCore(); | $console = new DarkConsoleCore(); | ||||
| $request->getApplicationConfiguration()->setConsole($console); | $request->getApplicationConfiguration()->setConsole($console); | ||||
| } | } | ||||
| } | } | ||||
| // NOTE: We want to set up the user first so we can render a real page | // NOTE: We want to set up the user first so we can render a real page | ||||
| // here, but fire this before any real logic. | // here, but fire this before any real logic. | ||||
| ▲ Show 20 Lines • Show All 495 Lines • Show Last 20 Lines | |||||