MantisBT: master-1.2.x 8e346687

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2011-12-01 23:23 master-1.2.x 5d1febbe
Affected Issues  0013643: Definition of MANTIS_ERROR strings in plugin language file causes check in test_lang.php to fail
Changeset

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

mod - admin/test_langs.php Diff File