Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14104819
D18888.id45334.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D18888.id45334.diff
View Options
diff --git a/src/applications/transactions/bulk/type/BulkTokenizerParameterType.php b/src/applications/transactions/bulk/type/BulkTokenizerParameterType.php
--- a/src/applications/transactions/bulk/type/BulkTokenizerParameterType.php
+++ b/src/applications/transactions/bulk/type/BulkTokenizerParameterType.php
@@ -23,7 +23,6 @@
$template_markup = $template->render();
$datasource = $this->getDatasource();
- $limit = null;
return array(
'markup' => (string)hsprintf('%s', $template_markup),
@@ -31,7 +30,7 @@
'src' => $datasource->getDatasourceURI(),
'browseURI' => $datasource->getBrowseURI(),
'placeholder' => $datasource->getPlaceholderText(),
- 'limit' => $limit,
+ 'limit' => $datasource->getLimit(),
),
'value' => null,
);
diff --git a/src/applications/transactions/editfield/PhabricatorTokenizerEditField.php b/src/applications/transactions/editfield/PhabricatorTokenizerEditField.php
--- a/src/applications/transactions/editfield/PhabricatorTokenizerEditField.php
+++ b/src/applications/transactions/editfield/PhabricatorTokenizerEditField.php
@@ -60,6 +60,10 @@
$datasource = $this->newDatasource()
->setViewer($this->getViewer());
+ if ($this->getIsSingleValue()) {
+ $datasource->setLimit(1);
+ }
+
return id(new BulkTokenizerParameterType())
->setDatasource($datasource);
}
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldTokenizer.php
@@ -68,6 +68,11 @@
protected function newBulkParameterType() {
$datasource = $this->getDatasource();
+ $limit = $this->getFieldConfigValue('limit');
+ if ($limit) {
+ $datasource->setLimit($limit);
+ }
+
return id(new BulkTokenizerParameterType())
->setDatasource($datasource);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 12:48 AM (21 h, 40 s)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6797224
Default Alt Text
D18888.id45334.diff (2 KB)
Attached To
Mode
D18888: Respect tokenizer limits in the bulk editor
Attached
Detach File
Event Timeline
Log In to Comment