Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15461896
D16021.id38552.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D16021.id38552.diff
View Options
diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php
--- a/src/applications/people/storage/PhabricatorUser.php
+++ b/src/applications/people/storage/PhabricatorUser.php
@@ -505,13 +505,13 @@
->setViewer($this)
->assertValidValue($value);
- $this->settingCacheKeys[$key] = true;
- $this->settingCache[$key] = $value;
-
- return $value;
+ return $this->writeUserSettingCache($key, $value);
} catch (Exception $ex) {
// Fall through below and return the default value.
}
+ } else {
+ // This is an ad-hoc setting with no controlling object.
+ return $this->writeUserSettingCache($key, $value);
}
}
@@ -523,10 +523,7 @@
$value = null;
}
- $this->settingCacheKeys[$key] = true;
- $this->settingCache[$key] = $value;
-
- return $value;
+ return $this->writeUserSettingCache($key, $value);
}
@@ -557,6 +554,12 @@
return $this;
}
+ private function writeUserSettingCache($key, $value) {
+ $this->settingCacheKeys[$key] = true;
+ $this->settingCache[$key] = $value;
+ return $value;
+ }
+
public function getTranslation() {
return $this->getUserSetting(PhabricatorTranslationSetting::SETTINGKEY);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 2, 12:12 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7222927
Default Alt Text
D16021.id38552.diff (1 KB)
Attached To
Mode
D16021: Fix reading ad-hoc settings with no formal Settings object
Attached
Detach File
Event Timeline
Log In to Comment