Allows the developer to define the text when printing out a list of errors/results/warnings.

This commit is contained in:
skeeter 2001-12-27 15:16:22 +00:00
parent 3bd53a72c2
commit 5e7170193e

View File

@ -319,14 +319,14 @@
@abstract This is used for reporting errors in a nice format. @abstract This is used for reporting errors in a nice format.
@param $error - array of errors @param $error - array of errors
*/ */
function error_list($errors) function error_list($errors,$text='Error')
{ {
if (! is_array($errors)) if (! is_array($errors))
{ {
return False; return False;
} }
$html_error = '<table border="0" width="50%"><tr><td align="right"><b>' . lang('error') $html_error = '<table border="0" width="100%"><tr><td align="right"><b>' . lang($text)
. '</b>: </td><td align="left">' . $errors[0] . '</td></tr>'; . '</b>: </td><td align="left">' . $errors[0] . '</td></tr>';
for ($i=1; $i<count($errors); $i++) for ($i=1; $i<count($errors); $i++)
{ {