-
Details
Diff Detail
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Also please replace %s in all error messages that are affected by named error parameter introduction to corresponding named parameters in /core/install/upgrades.sql for 5.2.2-B1 version. Don't forget to update /core/install/english.lang as well.
core/kernel/utility/validator.php | ||
---|---|---|
211 | The array declaration isn't fixed to match coding standard. | |
261 | The parameter name should be max_value to be consistent with other parameter names. | |
442 | There is dedicated $this->Application->Phrase method that should be used to translate a phrase. | |
445 | Rename to $replacement_count to add more clarity. | |
453 | Since introduced {field} parameter isn't currently used anywhere we put vsprintf function call into situation where we always have 1 more parameter given, then %s in the actual error message. Please verify that this doesn't cause vsprintf to return empty string or trigger a warning. If it does, then we should just remove $msg and don't use vsprintf. |
core/install/upgrades.sql | ||
---|---|---|
2914–2924 | Please remove any unnecessary trailing whitespaces:
I believe phpMyAdmin causes that bad looking SQL formatting. | |
core/kernel/utility/validator.php | ||
50 | The $params should be used here to make use of newly added {field} parameter as last %s. |
core/kernel/utility/validator.php | ||
---|---|---|
445–450 | Now, when we are not calling vsprintf at the end the parameter unsetting code isn't needed anymore. Same goes for replacement count tracking code. |
core/kernel/utility/validator.php | ||
---|---|---|
441 | We need to allow changing this via unit config as well. Here is what needs to be done: $field_options = $this->dataSource->GetFieldOptions($field); if ( $this->Application->isAdmin ) { $field_phrase = !empty($field_options['admin_label']) ? $field_options['admin_label'] : 'la_fld_' . $field; } else { $field_phrase = !empty($field_options['front_label']) ? $field_options['front_label'] : 'lu_fld_' . $field; } Theoretically this would allow to override corresponding phrase in unit config. |
By uploading patch that only has uncommited changes you've wiped out all other changes in this Differential Revision. Please reupload patch that has all pieces together: commited and uncommited.
To do so I:
- checkout SVN revision of a project prior to time, when patch was applied
- apply existing patch
- make changes
- create new patch
Please also update FormSubmissionsEventHandler::OnBuildFormFields method to include following lines in the cycle that creates form field configuration:
$field_options['front_label'] = $options['FieldLabel']; $field_options['admin_label'] = $options['Prompt'];
Make sure it works.
Adding comment to create corresponding "Issue Link" from JIRA Issue back to this Differential Revision.