[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.categories.inc.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.categories.inc.php |
Date: |
Tue, 29 Aug 2006 10:53:35 +0000 |
CVSROOT: /cvsroot/phpgwapi
Module name: phpgwapi
Changes by: Dave Hall <skwashd> 06/08/29 10:53:35
Modified files:
inc : class.categories.inc.php
Log message:
more E_NOTICEs
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.categories.inc.php?cvsroot=phpgwapi&r1=1.128&r2=1.129
Patches:
Index: class.categories.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.categories.inc.php,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -b -r1.128 -r1.129
--- class.categories.inc.php 29 Aug 2006 08:27:25 -0000 1.128
+++ class.categories.inc.php 29 Aug 2006 10:53:35 -0000 1.129
@@ -7,7 +7,7 @@
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General
Public License
* @package phpgwapi
* @subpackage utilities
- * @version $Id: class.categories.inc.php,v 1.128 2006/08/29 08:27:25
skwashd Exp $
+ * @version $Id: class.categories.inc.php,v 1.129 2006/08/29 10:53:35
skwashd Exp $
*/
/**
@@ -430,8 +430,9 @@
return
$this->formated_list($format,$type,$selected,$globals,$site_link);
}
- function formated_list($format,$type='',$selected = '',$globals
= False,$site_link = 'site')
+ function formated_list($format, $type='', $selected = '',
$globals = False, $site_link = 'site')
{
+ $self = '';
if(is_array($format))
{
$temp_format = $format['format'];
@@ -459,21 +460,16 @@
$cats = $this->return_sorted_array(0, False,
'', '', '',$globals);
}
- if($self)
+ $s = '';
+ if ($format == 'select')
{
- for ($i=0;$i<count($cats);++$i)
+ foreach ( $cats as $cat )
{
- if ($cats[$i]['id'] == $self)
+ if ( $cat['id'] == $self )
{
- unset($cats[$i]);
- }
- }
+ continue;
}
- if ($format == 'select')
- {
- while (is_array($cats) && (list(,$cat) =
each($cats)))
- {
$s .= '<option value="' . $cat['id'] .
'"';
if (in_array($cat['id'],$selected))
{