Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13256158
D18240.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
980 B
Referenced Files
None
Subscribers
None
D18240.diff
View Options
diff --git a/src/view/form/control/AphrontFormTokenizerControl.php b/src/view/form/control/AphrontFormTokenizerControl.php
--- a/src/view/form/control/AphrontFormTokenizerControl.php
+++ b/src/view/form/control/AphrontFormTokenizerControl.php
@@ -33,6 +33,14 @@
return $this;
}
+ private function getPlaceholder() {
+ if (!strlen($this->placeholder)) {
+ $datasource = $this->datasource;
+ return $datasource->getPlaceholderText();
+ }
+ return $this->placeholder;
+ }
+
public function setInitialValue(array $initial_value) {
$this->initialValue = $initial_value;
return $this;
@@ -67,10 +75,7 @@
}
$datasource->setViewer($this->getUser());
- $placeholder = null;
- if (!strlen($this->placeholder)) {
- $placeholder = $datasource->getPlaceholderText();
- }
+ $placeholder = $this->getPlaceholder();
$values = nonempty($this->getValue(), array());
$tokens = $datasource->renderTokens($values);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 26, 9:56 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6274409
Default Alt Text
D18240.diff (980 B)
Attached To
Mode
D18240: Fallback to placeholder if datasource placeholder does not exist
Attached
Detach File
Event Timeline
Log In to Comment