Changeset View
Changeset View
Standalone View
Standalone View
src/view/page/PhabricatorStandardPageView.php
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | public function getShowDurableColumn() { | ||||
$conpherence_installed = PhabricatorApplication::isClassInstalledForViewer( | $conpherence_installed = PhabricatorApplication::isClassInstalledForViewer( | ||||
'PhabricatorConpherenceApplication', | 'PhabricatorConpherenceApplication', | ||||
$viewer); | $viewer); | ||||
if (!$conpherence_installed) { | if (!$conpherence_installed) { | ||||
return false; | return false; | ||||
} | } | ||||
if ($this->isQuicksandBlacklistURI()) { | |||||
return false; | |||||
} | |||||
return true; | |||||
} | |||||
private function isQuicksandBlacklistURI() { | |||||
$request = $this->getRequest(); | |||||
if (!$request) { | |||||
return false; | |||||
} | |||||
$patterns = $this->getQuicksandURIPatternBlacklist(); | $patterns = $this->getQuicksandURIPatternBlacklist(); | ||||
$path = $request->getRequestURI()->getPath(); | $path = $request->getRequestURI()->getPath(); | ||||
foreach ($patterns as $pattern) { | foreach ($patterns as $pattern) { | ||||
if (preg_match('(^'.$pattern.'$)', $path)) { | if (preg_match('(^'.$pattern.'$)', $path)) { | ||||
return false; | return true; | ||||
} | } | ||||
} | } | ||||
return false; | |||||
return true; | |||||
} | } | ||||
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, 0); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 243 Lines • ▼ Show 20 Lines | if ($user && $user->getIsAdmin()) { | ||||
array( | array( | ||||
'href' => '/config/issue/', | 'href' => '/config/issue/', | ||||
'title' => implode(', ', $open), | 'title' => implode(', ', $open), | ||||
), | ), | ||||
pht('You have %d unresolved setup issue(s)...', count($open)))); | pht('You have %d unresolved setup issue(s)...', count($open)))); | ||||
} | } | ||||
} | } | ||||
if (!$this->isQuicksandBlacklistURI()) { | |||||
Javelin::initBehavior( | Javelin::initBehavior( | ||||
'scrollbar', | 'scrollbar', | ||||
array( | array( | ||||
'nodeID' => 'phabricator-standard-page', | 'nodeID' => 'phabricator-standard-page', | ||||
'isMainContent' => true, | 'isMainContent' => true, | ||||
)); | )); | ||||
} | |||||
$main_page = phutil_tag( | $main_page = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'id' => 'phabricator-standard-page', | 'id' => 'phabricator-standard-page', | ||||
'class' => 'phabricator-standard-page', | 'class' => 'phabricator-standard-page', | ||||
), | ), | ||||
array( | array( | ||||
▲ Show 20 Lines • Show All 336 Lines • Show Last 20 Lines |