Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F871740
D13.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, May 8, 2:02 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Fri, May 9, 2:02 AM (13 h, 3 m)
Engine
blob
Format
Raw Data
Handle
616608
Attached To
D13: INP-1383 - Don't translate phrase from "empty_label" parameter of "PedefinedOptions" tag twice
D13.id.diff
View Options
Index: core/kernel/db/db_tag_processor.php
===================================================================
--- core/kernel/db/db_tag_processor.php
+++ core/kernel/db/db_tag_processor.php
@@ -1155,8 +1155,10 @@
$field = $params['field'];
$value = array_key_exists('value', $params) ? $params['value'] : $object->GetDBField($field);
$field_options = $object->GetFieldOptions($field);
+
- if (!array_key_exists('options', $field_options) || !is_array($field_options['options'])) {
+ if ( !array_key_exists('options', $field_options) || !is_array($field_options['options']) ) {
trigger_error('Options not defined for <strong>'.$object->Prefix.'</strong> field <strong>'.$field.'</strong>', E_USER_WARNING);
+
return '';
}
@@ -1172,7 +1174,9 @@
$empty_label = mb_substr($empty_label, 1);
}
else {
+ if ( !isset($field_options['use_phrases']) || !$field_options['use_phrases'] ) {
- $empty_label = $this->Application->Phrase($empty_label, false);
+ $empty_label = $this->Application->Phrase($empty_label, false);
+ }
}
}
\ No newline at end of file
Event Timeline
Log In to Comment