Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1102178
D13.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
Mon, Aug 18, 3:40 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Tue, Aug 19, 3:40 AM (1 h, 40 m)
Engine
blob
Format
Raw Data
Handle
713972
Attached To
D13: INP-1383 - Don't translate phrase from "empty_label" parameter of "PedefinedOptions" tag twice
D13.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