phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc class.common.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc class.common.inc.php
Date: Mon, 02 Oct 2006 09:27:04 +0000

CVSROOT:        /cvsroot/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     06/10/02 09:27:04

Modified files:
        inc            : class.common.inc.php 

Log message:
        one less table in the restraunt ;)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.common.inc.php?cvsroot=phpgwapi&r1=1.246&r2=1.247

Patches:
Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.246
retrieving revision 1.247
diff -u -b -r1.246 -r1.247
--- class.common.inc.php        1 Oct 2006 12:02:13 -0000       1.246
+++ class.common.inc.php        2 Oct 2006 09:27:04 -0000       1.247
@@ -8,7 +8,7 @@
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage utilities
-       * @version $Id: class.common.inc.php,v 1.246 2006/10/01 12:02:13 
skwashd Exp $
+       * @version $Id: class.common.inc.php,v 1.247 2006/10/02 09:27:04 
skwashd Exp $
        */
 
        /**
@@ -315,22 +315,22 @@
                *
                * @param array $error List of errors
                * @param string $text Heading error text
-               * @return boolean|string HTML table with error messages or 
false 
+               * @return string HTML table with error messages or empty string 
when there is no error/s
                */
-               function error_list($errors,$text='Error')
+               function error_list($errors, $text='Error')
                {
                        if (! is_array($errors))
                        {
-                               return False;
+                               return '';
                        }
 
-                       $html_error = '<table border="0" width="100%"><tr><td 
align="right"><strong>' . lang($text)
-                               . '</strong>: </td><td align="left">' . 
$errors[0] . '</td></tr>';
+                       $html_error = '<h3>' . lang($text) . "</h3>\n"
+                                               . "<ul 
class=\"errors\">\n<ul>\n<li>{$errors[0]}</li>";
                        for ($i=1; $i<count($errors); ++$i)
                        {
-                               $html_error .= '<tr><td>&nbsp;</td><td 
align="left">' . $errors[$i] . '</td></tr>';
+                               $html_error .= "<li>{$errors[$i]}</li>\n";
                        }
-                       return $html_error . '</table>';
+                       return "$html_error</ul>\n";
                }
 
                /**




reply via email to

[Prev in Thread] Current Thread [Next in Thread]