fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17587]


From: nelson . guerra
Subject: [Fmsystem-commits] [17587]
Date: Mon, 15 Jan 2018 20:52:21 -0500 (EST)

Revision: 17587
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17587
Author:   nelson224
Date:     2018-01-15 20:52:21 -0500 (Mon, 15 Jan 2018)
Log Message:
-----------


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

Modified: branches/dev-syncromind/addressbook/inc/class.boXport.inc.php
===================================================================
--- branches/dev-syncromind/addressbook/inc/class.boXport.inc.php       
2018-01-16 01:52:05 UTC (rev 17586)
+++ branches/dev-syncromind/addressbook/inc/class.boXport.inc.php       
2018-01-16 01:52:21 UTC (rev 17587)
@@ -207,14 +207,18 @@
                                        }
                                        elseif ($name && $value)
                                        {
-                                               reset($contacts->import);
-                                               while ( list($fname,$fvalue) = 
each($contacts->import) )
-                                               {
+                                               //reset($contacts->import);
+                                               //while ( list($fname,$fvalue) 
= each($contacts->import) )
+                                                if 
(is_array($contacts->import))
+                                                {
+                                                    foreach($contacts->import 
as $fname => $fvalue)
+                                                    {
                                                        if ( 
strstr(strtolower($name), $contacts->import[$fname]) )
                                                        {
                                                                $buffer = 
$contacts->import_new_attrib($buffer,$name,$value);
                                                        }
-                                               }
+                                                    }
+                                                }
                                        }
                                }
                        }
@@ -239,15 +243,19 @@
                        {
                                // Read in user custom fields, if any
                                $customfields = array();
-                               while (list($col,$descr) = 
@each($GLOBALS['phpgw_info']['user']['preferences']['addressbook']))
-                               {
-                               if ( substr($col,0,6) == 'extra_' )
+                               //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_' )
                                        {
                                                $field = 
preg_replace('/extra_/','',$col);
                                                        $field = 
preg_replace('/ /','_',$field);
                                                $customfields[$field] = 
ucfirst($field);
                                        }
-                               }
+                                    }
+                                }
 
                                if (!empty($cat_id))
                                {
@@ -261,10 +269,14 @@
                                for ($i=0;$i<count($contacts->ids);$i++)
                                {
                                        $buffer = 
$contacts->export_start_record($buffer);
-                                       while( list($name,$value) = 
each($contacts->currentrecord) )
-                                       {
+                                       //while( list($name,$value) = 
each($contacts->currentrecord) )
+                                        if (is_array($contacts->currentrecord))
+                                        {
+                                            foreach($contacts->currentrecord 
as $name => $value)
+                                            {
                                                $buffer = 
$contacts->export_new_attrib($buffer,$name,$value);
-                                       }
+                                            }
+                                        }
                                        $buffer = 
$contacts->export_end_record($buffer);
                                }
 




reply via email to

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