MantisBT: master fa6037d1

Author Committer Branch Timestamp Parent
Julian Fitzell master 2003-04-23 19:00 master 7f202598
Changeset

Implement parameterized error messages. This allows us, for example to say "Bug 23 not found" instead of just "Bug not found".

Parameters are gven before triggering an error by calling error_parameters() (this function already existed in anticipation of this feature)
and the error strings are now passed through sprintf with those values.

I won't have much time to work on this in the next day or two so if anyone else wants to actually parameterize more of the error strings, feel
free.

  • core/bug_api.php
    (bug_cache_row): call error_parameters() before triggering an error
    (bug_text_cache_row): ditto
    (bug_ensure_exists): ditto

  • core/error_api.php
    (error_string): pass the error string through sprintf with a padded array
    of error parameters (padded to prevent errors when too few parameters
    are given)

  • lang/strings_english.txt: parameterize three error strings as an
    example

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2162 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9

mod - core/error_api.php Diff File
mod - doc/ChangeLog Diff File
mod - lang/strings_english.txt Diff File
mod - core/bug_api.php Diff File