Differential D16001 Diff 38525 src/applications/settings/editor/PhabricatorUserPreferencesEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/editor/PhabricatorUserPreferencesEditor.php
| <?php | <?php | ||||
| final class PhabricatorUserPreferencesEditor | final class PhabricatorUserPreferencesEditor | ||||
| extends AlmanacEditor { | extends PhabricatorApplicationTransactionEditor { | ||||
| public function getEditorApplicationClass() { | |||||
| return 'PhabricatorSettingsApplication'; | |||||
| } | |||||
| public function getEditorObjectsDescription() { | public function getEditorObjectsDescription() { | ||||
| return pht('Settings'); | return pht('Settings'); | ||||
| } | } | ||||
| public function getTransactionTypes() { | public function getTransactionTypes() { | ||||
| $types = parent::getTransactionTypes(); | $types = parent::getTransactionTypes(); | ||||
| ▲ Show 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | switch ($type) { | ||||
| } | } | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| return $errors; | return $errors; | ||||
| } | } | ||||
| protected function applyFinalEffects( | |||||
| PhabricatorLiskDAO $object, | |||||
| array $xactions) { | |||||
| $user_phid = $object->getUserPHID(); | |||||
| if ($user_phid) { | |||||
| PhabricatorUserCache::clearCache( | |||||
| PhabricatorUserPreferencesCacheType::KEY_PREFERENCES, | |||||
| $user_phid); | |||||
| } else { | |||||
| PhabricatorUserCache::clearCacheForAllUsers( | |||||
| PhabricatorUserPreferencesCacheType::KEY_PREFERENCES); | |||||
| } | |||||
| return $xactions; | |||||
| } | |||||
| } | } | ||||