fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17618]


From: nelson . guerra
Subject: [Fmsystem-commits] [17618]
Date: Wed, 17 Jan 2018 18:35:58 -0500 (EST)

Revision: 17618
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17618
Author:   nelson224
Date:     2018-01-17 18:35:58 -0500 (Wed, 17 Jan 2018)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/addressbook/inc/functions.inc.php

Modified: branches/dev-syncromind/addressbook/inc/functions.inc.php
===================================================================
--- branches/dev-syncromind/addressbook/inc/functions.inc.php   2018-01-17 
23:35:43 UTC (rev 17617)
+++ branches/dev-syncromind/addressbook/inc/functions.inc.php   2018-01-17 
23:35:58 UTC (rev 17618)
@@ -24,8 +24,11 @@
                {
                        $select .= '<option value="">' . lang('Please Select') 
. '</option>'."\n";
                }
-               while (list($key,$val) = each($list))
-               {
+               //while (list($key,$val) = each($list))
+                if (is_array($list))
+                {
+                    foreach($list as $key => $val)
+                    {
                        $select .= '<option value="' . $key . '"';
                        if ($key == $id && $id != '')
                        {
@@ -32,7 +35,8 @@
                                $select .= ' selected';
                        }
                        $select .= '>' . $val . '</option>'."\n";
-               }
+                    }
+                }
 
                $select .= '</select>'."\n";
                $select .= '<noscript><input type="submit" name="' . $name . 
'_select" value="True"></noscript>' . "\n";
@@ -135,8 +139,11 @@
                $i = 0; $j = 0;
                $fields = array();
                
@reset($GLOBALS['phpgw_info']['user']['preferences']['addressbook']);
-               while (list($col,$descr) = 
@each($GLOBALS['phpgw_info']['user']['preferences']['addressbook']))
-               {
+               //while (list($col,$descr) = 
@each($GLOBALS['phpgw_info']['user']['preferences']['addressbook']))
+                if 
(is_array($GLOBALS['phpgw_info']['user']['preferences']['addressbook']))
+                {
+                    
foreach($GLOBALS['phpgw_info']['user']['preferences']['addressbook'] as $col => 
$descr)
+                    {
                        if ( substr($col,0,6) == 'extra_' )
                        {
                                $fields[$j]['name'] = 
preg_replace('/extra_/','',$col);
@@ -155,7 +162,8 @@
                                }
                        }
                        $i++;
-               }
+                    }
+                }
                @reset($fields);
                return $fields;
        }




reply via email to

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