Changeset View
Changeset View
Standalone View
Standalone View
src/applications/policy/query/PhabricatorPolicyQuery.php
| Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | private static function getGlobalPolicyShortName($policy) { | ||||
| } | } | ||||
| } | } | ||||
| private function loadObjectPolicyPHIDs() { | private function loadObjectPolicyPHIDs() { | ||||
| $phids = array(); | $phids = array(); | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| if ($viewer->getPHID()) { | if ($viewer->getPHID()) { | ||||
| $pref_key = PhabricatorUserPreferences::PREFERENCE_FAVORITE_POLICIES; | $pref_key = PhabricatorPolicyFavoritesSetting::SETTINGKEY; | ||||
| $favorite_limit = 10; | $favorite_limit = 10; | ||||
| $default_limit = 5; | $default_limit = 5; | ||||
| // If possible, show the user's 10 most recently used projects. | // If possible, show the user's 10 most recently used projects. | ||||
| $favorites = $viewer->getUserSetting($pref_key); | $favorites = $viewer->getUserSetting($pref_key); | ||||
| if (!is_array($favorites)) { | if (!is_array($favorites)) { | ||||
| $favorites = array(); | $favorites = array(); | ||||
| ▲ Show 20 Lines • Show All 222 Lines • Show Last 20 Lines | |||||