Changeset View
Changeset View
Standalone View
Standalone View
src/view/page/PhabricatorStandardPageView.php
| Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | foreach ($patterns as $pattern) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| public function getDurableColumnVisible() { | public function getDurableColumnVisible() { | ||||
| $column_key = PhabricatorUserPreferences::PREFERENCE_CONPHERENCE_COLUMN; | $column_key = PhabricatorUserPreferences::PREFERENCE_CONPHERENCE_COLUMN; | ||||
| return (bool)$this->getUserPreference($column_key, 0); | return (bool)$this->getUserPreference($column_key, false); | ||||
| } | } | ||||
| public function addQuicksandConfig(array $config) { | public function addQuicksandConfig(array $config) { | ||||
| $this->quicksandConfig = $config + $this->quicksandConfig; | $this->quicksandConfig = $config + $this->quicksandConfig; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getQuicksandConfig() { | public function getQuicksandConfig() { | ||||
| Show All 14 Lines | public function setNavigation(AphrontSideNavFilterView $navigation) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getNavigation() { | public function getNavigation() { | ||||
| return $this->navigation; | return $this->navigation; | ||||
| } | } | ||||
| public function getTitle() { | public function getTitle() { | ||||
| $glyph_key = PhabricatorUserPreferences::PREFERENCE_TITLES; | $glyph_key = PhabricatorTitleGlyphsSetting::SETTINGKEY; | ||||
| if ($this->getUserPreference($glyph_key) == 'text') { | $glyph_on = PhabricatorTitleGlyphsSetting::VALUE_TITLE_GLYPHS; | ||||
| $use_glyph = false; | $glyph_setting = $this->getUserPreference($glyph_key, $glyph_on); | ||||
| } else { | |||||
| $use_glyph = true; | $use_glyph = ($glyph_setting == $glyph_on); | ||||
| } | |||||
| $title = parent::getTitle(); | $title = parent::getTitle(); | ||||
| $prefix = null; | $prefix = null; | ||||
| if ($use_glyph) { | if ($use_glyph) { | ||||
| $prefix = $this->getGlyph(); | $prefix = $this->getGlyph(); | ||||
| } else { | } else { | ||||
| $application_name = $this->getApplicationName(); | $application_name = $this->getApplicationName(); | ||||
| ▲ Show 20 Lines • Show All 176 Lines • ▼ Show 20 Lines | final class PhabricatorStandardPageView extends PhabricatorBarePageView | ||||
| protected function getHead() { | protected function getHead() { | ||||
| $monospaced = null; | $monospaced = null; | ||||
| $request = $this->getRequest(); | $request = $this->getRequest(); | ||||
| if ($request) { | if ($request) { | ||||
| $user = $request->getUser(); | $user = $request->getUser(); | ||||
| if ($user) { | if ($user) { | ||||
| $monospaced = $user->loadPreferences()->getPreference( | $monospaced = $user->getUserSetting( | ||||
| PhabricatorUserPreferences::PREFERENCE_MONOSPACED); | PhabricatorMonospacedFontSetting::SETTINGKEY); | ||||
| } | } | ||||
| } | } | ||||
| $response = CelerityAPI::getStaticResourceResponse(); | $response = CelerityAPI::getStaticResourceResponse(); | ||||
| $font_css = null; | $font_css = null; | ||||
| if (!empty($monospaced)) { | if (!empty($monospaced)) { | ||||
| // We can't print this normally because escaping quotation marks will | // We can't print this normally because escaping quotation marks will | ||||
| ▲ Show 20 Lines • Show All 454 Lines • ▼ Show 20 Lines | if (!$request) { | ||||
| return $default; | return $default; | ||||
| } | } | ||||
| $user = $request->getUser(); | $user = $request->getUser(); | ||||
| if (!$user) { | if (!$user) { | ||||
| return $default; | return $default; | ||||
| } | } | ||||
| return $user->loadPreferences()->getPreference($key, $default); | return $user->getUserSetting($key); | ||||
| } | } | ||||
| public function produceAphrontResponse() { | public function produceAphrontResponse() { | ||||
| $controller = $this->getController(); | $controller = $this->getController(); | ||||
| if (!$this->getApplicationMenu()) { | if (!$this->getApplicationMenu()) { | ||||
| $application_menu = $controller->buildApplicationMenu(); | $application_menu = $controller->buildApplicationMenu(); | ||||
| if ($application_menu) { | if ($application_menu) { | ||||
| Show All 28 Lines | |||||