View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013643 | mantisbt | administration | public | 2011-12-02 08:36 | 2014-09-23 18:05 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.9 | ||||
Target Version | 1.2.9 | Fixed in Version | 1.2.9 | ||
Summary | 0013643: Definition of MANTIS_ERROR strings in plugin language file causes check in test_lang.php to fail | ||||
Description | A plugin which defines language strings for error messages in the following format $MANTIS_ERROR['plugin_example_error1'] = 'error message'; Causes the check in admin/test_lang.php to fail with the following errors: ERROR: ERROR: = sign without variable | ||||
Steps To Reproduce |
[1] https://github.com/mantisbt-plugins/csv-import/tree/65650599aa901a77227e38bff0a64aaeba6ba92b | ||||
Tags | No tags attached. | ||||
Patch for 1.2.x pushed; also applied to Master although the new format in strings_english.txt is not compatible with the current logic. |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master af03f786 2011-12-01 23:23 Details Diff |
Improve admin checks for language strings This brings the following improvements to test_lang.php: - Simplify the code by defining a new checkplugins() function for plugins language checks, allowing to use a revised checklangdir() for both the main and the plugin language strings (removes the recursive call) - Use PHP scandir() function to retrieve a sorted array of files instead of manually building it using opendir() and a loop on readdir() - Process the languages in alphabetical order - Array having strings as keys are valid tokens. Fixes 0013643 This avoids reporting errors is useful for plugin error strings like $MANTIS_ERROR['plugin_example_error1'] = 'Error message'; - Better formatting of error messages - Whitespace and coding guidelines fixes NOTE: This commit has been ported to master for consistency, although the new format of the strings_english.txt file is not compatible with the logic in test_lang.php. |
Affected Issues 0013643 |
|
mod - admin/test_langs.php | Diff File | ||
MantisBT: master-1.2.x 8e346687 2011-12-01 23:23 Details Diff |
Improve admin checks for language strings This brings the following improvements to test_lang.php: - Simplify the code by defining a new checkplugins() function for plugins language checks, allowing to use a revised checklangdir() for both the main and the plugin language strings (removes the recursive call) - Use PHP scandir() function to retrieve a sorted array of files instead of manually building it using opendir() and a loop on readdir() - Process the languages in alphabetical order - Array having strings as keys are valid tokens. Fixes 0013643 This avoids reporting errors is useful for plugin error strings like $MANTIS_ERROR['plugin_example_error1'] = 'Error message'; - Better formatting of error messages - Whitespace and coding guidelines fixes |
Affected Issues 0013643 |
|
mod - admin/test_langs.php | Diff File |