Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/storage/PhabricatorUser.php
| Show First 20 Lines • Show All 527 Lines • ▼ Show 20 Lines | /* -( Settings )----------------------------------------------------------- */ | ||||
| * @return bool True if the setting has the specified value. | * @return bool True if the setting has the specified value. | ||||
| * @task settings | * @task settings | ||||
| */ | */ | ||||
| public function compareUserSetting($key, $value) { | public function compareUserSetting($key, $value) { | ||||
| $actual = $this->getUserSetting($key); | $actual = $this->getUserSetting($key); | ||||
| return ($actual == $value); | return ($actual == $value); | ||||
| } | } | ||||
| /** | |||||
| * @task settings | |||||
| */ | |||||
| public function clearUserSettingCache() { | |||||
| $this->settingCacheKeys = array(); | |||||
| $this->settingCache = array(); | |||||
| $settings_key = PhabricatorUserPreferencesCacheType::KEY_PREFERENCES; | |||||
| $this->clearCacheData($settings_key); | |||||
| return $this; | |||||
| } | |||||
| private function writeUserSettingCache($key, $value) { | private function writeUserSettingCache($key, $value) { | ||||
| $this->settingCacheKeys[$key] = true; | $this->settingCacheKeys[$key] = true; | ||||
| $this->settingCache[$key] = $value; | $this->settingCache[$key] = $value; | ||||
| return $value; | return $value; | ||||
| } | } | ||||
| public function getTranslation() { | public function getTranslation() { | ||||
| return $this->getUserSetting(PhabricatorTranslationSetting::SETTINGKEY); | return $this->getUserSetting(PhabricatorTranslationSetting::SETTINGKEY); | ||||
| ▲ Show 20 Lines • Show All 1,022 Lines • Show Last 20 Lines | |||||