fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17655] Trunk: Merge 17483:17654 from dev-syncromind


From: sigurdne
Subject: [Fmsystem-commits] [17655] Trunk: Merge 17483:17654 from dev-syncromind
Date: Sat, 20 Jan 2018 07:44:48 -0500 (EST)

Revision: 17655
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17655
Author:   sigurdne
Date:     2018-01-20 07:44:47 -0500 (Sat, 20 Jan 2018)
Log Message:
-----------
Trunk: Merge 17483:17654 from dev-syncromind

Modified Paths:
--------------
    trunk/addressbook/csv_import.php
    trunk/addressbook/inc/class.boXport.inc.php
    trunk/addressbook/inc/class.boaddressbook.inc.php
    trunk/addressbook/inc/class.ipc_addressbook.inc.php
    trunk/addressbook/inc/class.remote.inc.php
    trunk/addressbook/inc/class.uiaddressbook.inc.php
    trunk/addressbook/inc/class.uiaddressbook_prefs.inc.php
    trunk/addressbook/inc/class.uivcard.inc.php
    trunk/addressbook/inc/export/Netscape_LDIF
    trunk/addressbook/inc/export/OpenOffice_-_calc
    trunk/addressbook/inc/export/OpenOffice_-_writer
    trunk/addressbook/inc/export/Outlook_CSV_-_Deutsch
    trunk/addressbook/inc/export/Outlook_CSV_-_Dutch
    trunk/addressbook/inc/export/Outlook_CSV_-_English
    trunk/addressbook/inc/export/Outlook_CSV_-_Espa?\195?\177ol
    trunk/addressbook/inc/export/Outlook_CSV_-_Fran?\195?\167ais
    trunk/addressbook/inc/export/Palm_PDB
    trunk/addressbook/inc/export/phpgw_LDIF
    trunk/addressbook/inc/functions.inc.php
    trunk/addressbook/inc/hook_notifywindow.inc.php
    trunk/addressbook/inc/import/Import_Multiple_VCard
    trunk/addressbook/inc/import/Import_from_Outlook_-_Dutch
    trunk/addressbook/inc/import/Import_from_Outlook_-_Espa?\195?\177ol
    trunk/addressbook/inc/import/Import_from_Outlook_-_Fran?\195?\167ais
    trunk/admin/inc/class.boaccess_history.inc.php
    trunk/admin/inc/class.boconfig.inc.php
    trunk/admin/inc/class.html.inc.php
    trunk/admin/inc/class.uiaclmanager.inc.php
    trunk/admin/inc/class.uiconfig.inc.php
    trunk/admin/inc/class.uimenuclass.inc.php
    trunk/admin/inc/class.uiserver.inc.php
    trunk/admin/inc/hook_config.inc.php
    trunk/bim/inc/class.uiifc.inc.php
    trunk/calendar/inc/class.bocalendar.inc.php
    trunk/calendar/inc/class.boicalendar.inc.php
    trunk/calendar/inc/class.calendar_holiday.inc.php
    trunk/calendar/inc/class.html.inc.php
    trunk/calendar/inc/class.socalendar_sql.inc.php
    trunk/calendar/inc/class.soholiday.inc.php
    trunk/calendar/inc/class.uicalendar.inc.php
    trunk/calendar/inc/class.uiholiday.inc.php
    trunk/calendar/inc/class.uiicalendar.inc.php
    trunk/calendar/preferences.php
    trunk/calendar/setup/tables_update.inc.php
    trunk/catch/inc/class.boconfig.inc.php
    trunk/catch/inc/class.uiconfig.inc.php
    trunk/property/inc/class.bodocument.inc.php
    trunk/property/inc/class.boentity.inc.php
    trunk/property/inc/class.boevent.inc.php
    trunk/property/inc/class.bogab.inc.php
    trunk/property/inc/class.boifc.inc.php
    trunk/property/inc/class.boinvestment.inc.php
    trunk/property/inc/class.bopricebook.inc.php
    trunk/property/inc/class.boproject.inc.php
    trunk/property/inc/class.borequest.inc.php
    trunk/property/inc/class.bos_agreement.inc.php
    trunk/property/inc/class.botts.inc.php
    trunk/property/inc/class.bowo_hour.inc.php
    trunk/property/inc/class.boworkorder.inc.php
    trunk/property/inc/class.historylog.inc.php
    trunk/property/inc/class.soXport.inc.php
    trunk/property/inc/class.soadmin.inc.php
    trunk/property/inc/class.soagreement.inc.php
    trunk/property/inc/class.soalarm.inc.php
    trunk/property/inc/class.sodocument.inc.php
    trunk/property/inc/class.sogab.inc.php
    trunk/property/inc/class.soinvestment.inc.php
    trunk/property/inc/class.soinvoice.inc.php
    trunk/property/inc/class.solocation.inc.php
    trunk/property/inc/class.soproject.inc.php
    trunk/property/inc/class.sorequest.inc.php
    trunk/property/inc/class.sos_agreement.inc.php
    trunk/property/inc/class.uiadmin.inc.php
    trunk/property/inc/class.uialarm.inc.php
    trunk/property/inc/class.uiasync.inc.php
    trunk/property/inc/class.uicustom.inc.php
    trunk/property/inc/class.uientity.inc.php
    trunk/property/inc/class.uigab.inc.php
    trunk/property/inc/class.uigeneric.inc.php
    trunk/property/inc/class.uiifc.inc.php
    trunk/property/inc/class.uiinvestment.inc.php
    trunk/property/inc/class.uiinvoice.inc.php
    trunk/property/inc/class.uis_agreement.inc.php
    trunk/property/inc/class.uitemplate.inc.php
    trunk/property/login.php
    trunk/property/setup/tables_update.inc.php
    trunk/registration/inc/class.bomanagefields.inc.php
    trunk/registration/inc/class.boreg.inc.php
    trunk/registration/inc/class.uireg.inc.php

Property Changed:
----------------
    trunk/

Index: trunk
===================================================================
--- trunk       2018-01-20 12:28:33 UTC (rev 17654)
+++ trunk       2018-01-20 12:44:47 UTC (rev 17655)

Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
-/branches/dev-syncromind:13653
+/branches/dev-syncromind:13653,17484-17654
 /branches/dev-syncromind-2:14933-16846
 /branches/stavangerkommune:12743-12875,12986
\ No newline at end of property
Modified: trunk/addressbook/csv_import.php
===================================================================
--- trunk/addressbook/csv_import.php    2018-01-20 12:28:33 UTC (rev 17654)
+++ trunk/addressbook/csv_import.php    2018-01-20 12:44:47 UTC (rev 17655)
@@ -57,22 +57,30 @@
 
        function dump_array($arr)
        {
-               while(is_array($arr) && (list($key,$val) = each($arr)))
-               {
+               //while(is_array($arr) && (list($key,$val) = each($arr)))
+                if (is_array($arr))
+                {
+                    foreach($arr as $key => $val)
+                    {
                        $ret .= ($ret ? ',' : '(') . "'$key' => '$val'\n";
-               }
+                    }
+                }
                return $ret.')';
        }
 
        function index($value,$arr)
        {
-               while(is_array($arr) && (list($key,$val) = each($arr)))
-               {
+               //while(is_array($arr) && (list($key,$val) = each($arr)))
+                if (is_array($arr))
+                {
+                    foreach($arr as $key => $val)
+                    {
                        if($value == $val)
                        {
                                return $key;
                        }
-               }
+                    }
+                }
                return False;
        }
 
@@ -123,10 +131,14 @@
 
                        $config = CreateObject('phpgwapi.config','addressbook');
                        $config->read();
-                       while(list($name,$descr) = 
@each($config->config_data['custom_fields']))
-                       {
+                       //while(list($name,$descr) = 
@each($config->config_data['custom_fields']))
+                        if (is_array($config->config_data['custom_fields']))
+                        {
+                            foreach($config->config_data['custom_fields'] as 
$name => $descr)
+                            {
                                $addr_names[$name] = $descr;
-                       }
+                            }
+                        }
                        unset($config);
 
                        foreach($addr_names as $field => $name)
@@ -290,15 +302,21 @@
                                $log .= 
"\t</tr><tr><td>".($start+$anz)."</td>\n";
 
                                reset($addr_fields); $values = array();
-                               while(list($csv_idx,$addr) = each($addr_fields))
-                               {
+                               //while(list($csv_idx,$addr) = 
each($addr_fields))
+                                if (is_array($addr_fields))
+                                {
+                                    foreach($addr_fields as $csv_idx => $addr)
+                                    {
                                        //echo "<p>$csv: 
$addr".($_POST['trans'][$csv] ? ': '.$_POST['trans'][$csv] : '')."</p>";
                                        $val = $fields[$csv_idx];
                                        if(isset($_POST['trans'][$csv_idx]))
                                        {
                                                $trans_csv = 
$_POST['trans'][$csv_idx];
-                                               while(list($pattern,$replace) = 
each($trans_csv))
-                                               {
+                                               //while(list($pattern,$replace) 
= each($trans_csv))
+                                                if (is_array($trans_csv))
+                                                {
+                                                    foreach($trans_csv as 
$pattern => $replace)
+                                                    {
                                                        
if(preg_match("/$pattern/",$val))
                                                        {
                                                                // echo 
"<p>csv_idx='$csv_idx',info='$addr',trans_csv=".dump_array($trans_csv).",ereg_replace('$pattern','$replace','$val')
 = ";
@@ -332,7 +350,8 @@
                                                                        break; 
                                                                }
                                                        }
-                                               }
+                                                    }
+                                                }
                                        }
                                        //$values[$addr] = $val;
                                        if(in_array($addr, $comm_fields))
@@ -352,7 +371,8 @@
                                        }
 
                                        $log .= "\t\t<td>$val</td>\n";
-                               }
+                                    }
+                                }
                                $fields_to_add['categories'] = array($cat_id);
                                $fields_to_add['access'] = $access;
                                $fields_to_add['owner'] = $owner;

Modified: trunk/addressbook/inc/class.boXport.inc.php
===================================================================
--- trunk/addressbook/inc/class.boXport.inc.php 2018-01-20 12:28:33 UTC (rev 
17654)
+++ trunk/addressbook/inc/class.boXport.inc.php 2018-01-20 12:44:47 UTC (rev 
17655)
@@ -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);
                                }
 

Modified: trunk/addressbook/inc/class.boaddressbook.inc.php
===================================================================
--- trunk/addressbook/inc/class.boaddressbook.inc.php   2018-01-20 12:28:33 UTC 
(rev 17654)
+++ trunk/addressbook/inc/class.boaddressbook.inc.php   2018-01-20 12:44:47 UTC 
(rev 17655)
@@ -771,8 +771,11 @@
                        if (is_array($prefs))
                        {
                                /* _debug_array($prefs);exit; */
-                               while (list($pref,$x) = each($qfields))
-                               {
+                               //while (list($pref,$x) = each($qfields))
+                                if (is_array($qfields))
+                                {
+                                    foreach($qfields as $pref => $x)
+                                    {
                                        /* echo '<br />checking: ' . $pref . 
'=' . $prefs[$pref]; */
                                        if ($prefs[$pref] == 'on')
                                        {
@@ -782,7 +785,8 @@
                                        {
                                                
$GLOBALS['phpgw']->preferences->delete('addressbook',$pref);
                                        }
-                               }
+                                    }
+                                }
                        }
 
                        if(is_array($other))

Modified: trunk/addressbook/inc/class.ipc_addressbook.inc.php
===================================================================
--- trunk/addressbook/inc/class.ipc_addressbook.inc.php 2018-01-20 12:28:33 UTC 
(rev 17654)
+++ trunk/addressbook/inc/class.ipc_addressbook.inc.php 2018-01-20 12:44:47 UTC 
(rev 17655)
@@ -64,8 +64,11 @@
                        $buffer = array();
                        $temp_line = '';
 
-                       while(list(, $line) = each($data_lines))
-                       {
+                       //while(list(, $line) = each($data_lines))
+                        if (is_array($data_lines))
+                        {
+                            foreach($data_lines as $key => $line)
+                            {
                                $line = trim($line);
                                if(substr($line, -1) == '=')
                                {
@@ -86,7 +89,8 @@
                                }
 
                                $buffer += 
$this->vcard->parse_vcard_line($line);
-                       }
+                            }
+                        }
 
                        $fields = $this->vcard->in($buffer);
                        $fields['owner'] = 
$GLOBALS['phpgw_info']['user']['account_id'];
@@ -170,8 +174,9 @@
                        {
                                // locations[loc_id][type] is work or home
                                // loc_id is not  interested here, but the type 
is important!
-                               while ( list($loc_id, $loc_data) = 
each($fieldlist['locations']) )
-                               {
+                               //while ( list($loc_id, $loc_data) = 
each($fieldlist['locations']) )
+                                foreach($fieldlist['locations'] as $loc_id => 
$loc_data)
+                                {
                                        $loc_type_id = 
$this->contacts->search_location_type($loc_data['type']);
                                        switch($loc_type_id)
                                        {
@@ -191,7 +196,7 @@
                                        $fields[$adr.'region']       = 
$loc_data['state'];
                                        $fields[$adr.'postalcode']       = 
$loc_data['postal_code'];
                                        $fields[$adr.'countryname']      = 
$loc_data['country'];
-                               }
+                                }
                        }
 
                        $fields['tel_work']             = 
$fieldlist['comm_media']['work phone'];
@@ -228,14 +233,18 @@
                        $myexport = $this->vcard->export;
                        // check that each $fields exists in the export array 
and
                        // set a new array to equal the translation and 
original value
-                       while( list($name,$value) = each($fields) )
-                       {
+                       //while( list($name,$value) = each($fields) )
+                        if (is_array($fields))
+                        {
+                            foreach($fields as $name => $value)
+                            {
                                if ($myexport[$name] && ($value != "") )
                                {
                                        //echo '<br 
/>'.$name."=".$fields[$name]."\n";
                                        $buffer[$myexport[$name]] = $value;
                                }
-                       }
+                            }
+                        }
 
                        // create a vcard from this translated array
                        $data = $this->vcard->out($buffer);
@@ -340,8 +349,11 @@
                        $buffer = array();
                        $temp_line = '';
 
-                       while(list(, $line) = each($data_lines))
-                       {
+                       //while(list(, $line) = each($data_lines))
+                        if (is_array($data_lines))
+                        {
+                            foreach($data_lines as $key => $line)
+                            {
                                $line = trim($line);
                                if(substr($line, -1) == '=')
                                {
@@ -362,7 +374,8 @@
                                }
 
                                $buffer += 
$this->vcard->parse_vcard_line($line);
-                       }
+                            }
+                        }
 
                        $fields = $this->vcard->in($buffer);
                        $fields['owner'] = 
$GLOBALS['phpgw_info']['user']['account_id'];

Modified: trunk/addressbook/inc/class.remote.inc.php
===================================================================
--- trunk/addressbook/inc/class.remote.inc.php  2018-01-20 12:28:33 UTC (rev 
17654)
+++ trunk/addressbook/inc/class.remote.inc.php  2018-01-20 12:44:47 UTC (rev 
17655)
@@ -94,7 +94,8 @@
                        {
                                if(is_array($value))
                                {
-                                       while(list($x,$y) = @each($value))
+                                       //while(list($x,$y) = @each($value))
+                                        foreach($value as $x => $y)
                                        {
                                                /* Fill a new output array, but 
do not include things like array( 0 => mail) */
                                                
if(isset($this->servers[$this->serverid]['attrs']) &&
@@ -117,7 +118,8 @@
                {
                        if(is_array($in))
                        {
-                               while(list($key,$value) = each($in))
+                               //while(list($key,$value) = each($in))
+                                foreach($in as $key => $value)
                                {
                                        $out[] = array(
                                                'fn'       => $value['cn'][0],

Modified: trunk/addressbook/inc/class.uiaddressbook.inc.php
===================================================================
--- trunk/addressbook/inc/class.uiaddressbook.inc.php   2018-01-20 12:28:33 UTC 
(rev 17654)
+++ trunk/addressbook/inc/class.uiaddressbook.inc.php   2018-01-20 12:44:47 UTC 
(rev 17655)
@@ -387,29 +387,37 @@
 
                $total_records = $this->bo->total;
                $cols='';
-               while ($column = @each($columns_to_display))
-               {
-                       $showcol = $this->bo->display_name($column[0]);
+               //while ($column = @each($columns_to_display))
+                if (is_array($columns_to_display))
+                {
+                    foreach($columns_to_display as $key => $value)
+                    {
+                       $showcol = $this->bo->display_name($key);
 
-                       if (!$showcol) { $showcol = $column[1]; }
+                       if (!$showcol) { $showcol = $value; }
                        $cols .= '<td>';
                        $cols .= 
$GLOBALS['phpgw']->nextmatchs->show_sort_order($this->sort,
-                                       
$column[0],$this->order,"/index.php",$showcol,
+                                       $key,$this->order,"/index.php",$showcol,
                                        
'&menuaction=addressbook.uiaddressbook.index&section='.$this->section.'&fcat_id='.$this->cat_id.'&nonavbar='.$this->nonavbar);
                        $cols .= '</td>';
                        $cols .= "\n";
-               }
+                    }
+                }
                //FIXME: NEeed to determine how are we going to handle comm 
types translations
-               while ($column = @each($comms_array))
-               {
-                       $showcol = $column[0]; 
+               //while ($column = @each($comms_array))
+                if (is_array($comms_array))
+                {
+                    foreach($comms_array as $key => $value)
+                    {
+                       $showcol = $key; 
                        $cols .= '<td>';
                        $cols .= 
$GLOBALS['phpgw']->nextmatchs->show_sort_order($this->sort,
-                                       
$column[0],$this->order,"/index.php",$showcol,
+                                       $key,$this->order,"/index.php",$showcol,
                                        
'&menuaction=addressbook.uiaddressbook.index&section='.$this->section.'&fcat_id='.$this->cat_id
 .'&nonavbar='.$this->nonavbar);
                        $cols .= '</td>';
                        $cols .= "\n";
-               }
+                    }
+                }
 
                /* set basic vars and parse the header */
                
//$this->template->set_var('principal_tab',$this->get_principal_tabs($this->section));

Modified: trunk/addressbook/inc/class.uiaddressbook_prefs.inc.php
===================================================================
--- trunk/addressbook/inc/class.uiaddressbook_prefs.inc.php     2018-01-20 
12:28:33 UTC (rev 17654)
+++ trunk/addressbook/inc/class.uiaddressbook_prefs.inc.php     2018-01-20 
12:44:47 UTC (rev 17655)
@@ -179,7 +179,8 @@
                        if(is_array($ar))
                        {
                                reset($ar);
-                               while(list($k,$v)=each($ar))
+                               //while(list($k,$v)=each($ar))
+                                foreach($ar as $k => $v)
                                {
                                        if(!is_array($v))
                                        {
@@ -360,8 +361,11 @@
                        //now go translating each field
                        reset($this->contacts->stock_contact_fields);
                        //Constructing simple 'showable' fields
-                       
while(list($falsefield,$english)=each($this->contacts->stock_contact_fields))
-                       {
+                       
//while(list($falsefield,$english)=each($this->contacts->stock_contact_fields))
+                        if (is_array($this->contacts->stock_contact_fields))
+                        {
+                            foreach($this->contacts->stock_contact_fields as 
$falsefield => $english)
+                            {
                                //If it in selected_fields, then it has been 
selected, and it doesnt go into
                                //the fields_show_selectbox array
                                
if(!isset($this->selected_fields[$this->org_or_person][$falsefield]) || 
!$this->selected_fields[$this->org_or_person][$falsefield])
@@ -395,13 +399,15 @@
 
                                }
                        //Constructing commtype descriptions
-                       }
+                            }
+                        }
 
                        
$possible_comtypes=$this->linearize_query($this->contacts->get_contact_comm_descr(),'comm_description');
 
                        
if(isset($this->selected_fields[$this->org_or_person]['comm_types']) && 
is_array($possible_comtypes))
                        {
-                               while(list($k,$v)=each($possible_comtypes))
+                               //while(list($k,$v)=each($possible_comtypes))
+                                foreach($possible_comtypes as $k => $v)
                                {
                                        
if(!$this->selected_fields[$this->org_or_person]['comm_types'][$v])
                                        {
@@ -735,8 +741,11 @@
                //print "<br /><B>Selected</B><br />";
                //print_r($this->selected_fields[$this->org_or_person]);
                reset($this->selected_fields[$this->org_or_person]);
-               
while(list($k,$v)=each($this->selected_fields[$this->org_or_person]))
-               {
+               
//while(list($k,$v)=each($this->selected_fields[$this->org_or_person]))
+                if (is_array($this->selected_fields[$this->org_or_person]))
+                {
+                    foreach($this->selected_fields[$this->org_or_person] as $k 
=> $v)
+                    {
                        if(!is_array($v))
                        {
                                
$this->template->set_var('lang_selected_contact_field',$this->lang_fields[$k]);
@@ -766,7 +775,8 @@
                                $arrays[]=$v;
                        }
                                
-               }
+                    }
+                }
                if(is_array($arrays))
                {
                        if($this->current_columns_value_is_forced() && 
$this->map_tpl_to_real['adm_pref_type'] != 'forced')
@@ -779,10 +789,14 @@
                                $removelink=true;
                        }
 
-                       while(list($k,$v)=each($arrays))
+                       //while(list($k,$v)=each($arrays))
+                        foreach($arrays as $k => $v)
                        {
-                               while(list($ok,$ov)=each($v))
-                               {
+                               //while(list($ok,$ov)=each($v))
+                                if (is_array($v))
+                                {
+                                    foreach($v as $ok => $ov)
+                                    {
                                        if($removelink)
                                        {
                                                
$removelink=$GLOBALS['phpgw']->link
@@ -800,7 +814,8 @@
                                        
$this->template->set_var('lang_selected_contact_field',$this->lang_fields[$ok]);
                                        
$this->template->set_var('remove_me_link',$removelink);
                                        
$this->template->parse('V_selected_rows','B_selected_rows',True);
-                               }
+                                    }
+                                }
                        }
                }
 

Modified: trunk/addressbook/inc/class.uivcard.inc.php
===================================================================
--- trunk/addressbook/inc/class.uivcard.inc.php 2018-01-20 12:28:33 UTC (rev 
17654)
+++ trunk/addressbook/inc/class.uivcard.inc.php 2018-01-20 12:44:47 UTC (rev 
17655)
@@ -130,7 +130,8 @@
                        {
                                // locations[loc_id][type] is work or home
                                // loc_id is not  interested here, but the type 
is important!
-                               while ( list($loc_id, $loc_data) = 
each($fieldlist['locations']) )
+                               //while ( list($loc_id, $loc_data) = 
each($fieldlist['locations']) )
+                                foreach($fieldlist['locations'] as $loc_id => 
$loc_data)
                                {
                                        $loc_type_id = 
$this->contacts->search_location_type($loc_data['type']);
                                        switch($loc_type_id)
@@ -219,7 +220,8 @@
                                $myexport = $this->vcard->export;
                                // check that each $fields exists in the export 
array and
                                // set a new array to equal the translation and 
original value
-                               while( list($name,$value) = each($fields) )
+                               //while( list($name,$value) = each($fields) )
+                                foreach($fields as $name => $value)
                                {
                                        if ($myexport[$name] && ($value != "") )
                                        {

Modified: trunk/addressbook/inc/export/Netscape_LDIF
===================================================================
--- trunk/addressbook/inc/export/Netscape_LDIF  2018-01-20 12:28:33 UTC (rev 
17654)
+++ trunk/addressbook/inc/export/Netscape_LDIF  2018-01-20 12:44:47 UTC (rev 
17655)
@@ -179,13 +179,17 @@
                        {
                                $entries .= 'dn: ' . $buffer[$i]['dn'] . "\n";
                                reset($this->export);
-                               while (list($name,$value)=each($this->export))
-                               {
+                               //while (list($name,$value)=each($this->export))
+                                if (is_array($this->export))
+                                {
+                                    foreach($this->export as $name => $value)
+                                    {
                                        if ($value != 'dn')
                                        {
                                                $entries .= $value . ":" . 
$buffer[$i][$value] . "\n";
                                        }
-                               }
+                                    }
+                                }
                                $entries .= 'xmozillauseconferenceserver: ' . 
$buffer[$i]['xmozillauseconferenceserver'] . "\n";
                                $entries .= 'xmozillanickname: '            . 
$buffer[$i]['xmozillanickname'] . "\n";
                                $entries .= 'xmozillausehtmlmail: '         . 
$buffer[$i]['xmozillausehtmlmail'] . "\n";

Modified: trunk/addressbook/inc/export/OpenOffice_-_calc
===================================================================
--- trunk/addressbook/inc/export/OpenOffice_-_calc      2018-01-20 12:28:33 UTC 
(rev 17654)
+++ trunk/addressbook/inc/export/OpenOffice_-_calc      2018-01-20 12:44:47 UTC 
(rev 17655)
@@ -256,8 +256,11 @@
                                                {
                                                        $subcats = array();
                                                }
-                                               while (list($key,$contactscat) 
= each($cats))
-                                               {
+                                               //while 
(list($key,$contactscat) = each($cats))
+                                                if (is_array($cats))
+                                                {
+                                                    foreach($cats as $key => 
$contactscat)
+                                                    {
                                                        if ($contactscat && 
in_array(intval($contactscat),$subcats))
                                                        {
                                                                //$catinfo = 
$this->cat->return_single(intval($contactscat));
@@ -267,7 +270,8 @@
                                                                $catname .= 
$categories->id2name(intval($contactscat)) . '; ';
                                                        }
                                                        //$c++;
-                                               }
+                                                    }
+                                                }
                                                //echo "<pre>cat_info: "; 
print_r($catname); echo "</pre> \n";
                                                
//$entries[$entry['contact_id']]['cat_id'] = explode(',',$cats);
                                                
$entries[$entry['contact_id']]['cat_id'] = $catname;

Modified: trunk/addressbook/inc/export/OpenOffice_-_writer
===================================================================
--- trunk/addressbook/inc/export/OpenOffice_-_writer    2018-01-20 12:28:33 UTC 
(rev 17654)
+++ trunk/addressbook/inc/export/OpenOffice_-_writer    2018-01-20 12:44:47 UTC 
(rev 17655)
@@ -224,8 +224,11 @@
                                                {
                                                        $subcats = array();
                                                }
-                                               while (list($key,$contactscat) 
= each($cats))
-                                               {
+                                               //while 
(list($key,$contactscat) = each($cats))
+                                                if (is_array($cats))
+                                                {
+                                                    foreach($cats as $key => 
$contactscat)
+                                                    {
                                                        if ($contactscat && 
in_array(intval($contactscat),$subcats))
                                                        {
                                                                //$catinfo = 
$this->cat->return_single(intval($contactscat));
@@ -235,7 +238,8 @@
                                                                $catname .= 
$categories->id2name(intval($contactscat)) . '; ';
                                                        }
                                                        //$c++;
-                                               }
+                                                    }
+                                                }
                                                //echo "<pre>cat_info: "; 
print_r($catname); echo "</pre> \n";
                                                
//$entries[$entry['contact_id']]['cat_id'] = explode(',',$cats);
                                                
$entries[$entry['contact_id']]['cat_id'] = $catname;

Modified: trunk/addressbook/inc/export/Outlook_CSV_-_Deutsch
===================================================================
--- trunk/addressbook/inc/export/Outlook_CSV_-_Deutsch  2018-01-20 12:28:33 UTC 
(rev 17654)
+++ trunk/addressbook/inc/export/Outlook_CSV_-_Deutsch  2018-01-20 12:44:47 UTC 
(rev 17655)
@@ -185,10 +185,14 @@
                {
                        // Build the header for the file (field list)
                        reset($this->export);
-                       while (list($name,$value)=each($this->export))
-                       {
+                       //while (list($name,$value)=each($this->export))
+                        if (is_array($this->export))
+                        {
+                            foreach($this->export as $name => $value)
+                            {
                                $entries .= $value . ',';
-                       }
+                            }
+                        }
                        $entries = substr($entries,0,-1);
                        $entries .= "\r\n";
 
@@ -197,10 +201,14 @@
                        for ($i=0;$i<count($this->ids);$i++)
                        {
                                reset($this->export);
-                               while (list($name,$value)=each($this->export))
-                               {
+                               //while (list($name,$value)=each($this->export))
+                                if (is_array($this->export))
+                                {
+                                    foreach($this->export as $name => $value)
+                                    {
                                        $entries .= '"'.$buffer[$i][$value] . 
'",';
-                               }
+                                    }
+                                }
                                $entries = substr($entries,0,-1);
                                $entries .= "\r\n";
                        }

Modified: trunk/addressbook/inc/export/Outlook_CSV_-_Dutch
===================================================================
--- trunk/addressbook/inc/export/Outlook_CSV_-_Dutch    2018-01-20 12:28:33 UTC 
(rev 17654)
+++ trunk/addressbook/inc/export/Outlook_CSV_-_Dutch    2018-01-20 12:44:47 UTC 
(rev 17655)
@@ -93,11 +93,15 @@
                function import_end_record($buffer)
                {
                        $buffer[$this->id]='';
-                       while ( list($name, $value) = 
each($this->currentrecord))
-                       {
+                       //while ( list($name, $value) = 
each($this->currentrecord))
+                        if (is_array($this->currentrecord))
+                        {
+                            foreach($this->currentrecord as $name => $value)
+                            {
                                $buffer[$this->id][$name] = $value;
                                //echo '<br>'.$name.' => '.$value;
-                       }
+                            }
+                        }
                        return $buffer;
                }
 
@@ -107,11 +111,15 @@
                        //echo '<br>'; 
                        for ($i=1;$i<=count($buffer);$i++)
                        {
-                               while ( list($name,$value) = @each($buffer[$i]) 
)
-                               {
+                               //while ( list($name,$value) = 
@each($buffer[$i]) )
+                                if (is_array($buffer[$i]))
+                                {
+                                    foreach($buffer[$i] as $name => $value)
+                                    {
                                        //echo '<br>'.$i.': '.$name.' => 
'.$value;
                                        $entry[$i][$name] = $value;
-                               }
+                                    }
+                                }
                                $entry[$i]['email_type']      = 'INTERNET';
                                $entry[$i]['email_home_type'] = 'INTERNET';
                                $entry[$i]['adr_one_type']    = 'intl';

Modified: trunk/addressbook/inc/export/Outlook_CSV_-_English
===================================================================
--- trunk/addressbook/inc/export/Outlook_CSV_-_English  2018-01-20 12:28:33 UTC 
(rev 17654)
+++ trunk/addressbook/inc/export/Outlook_CSV_-_English  2018-01-20 12:44:47 UTC 
(rev 17655)
@@ -188,10 +188,14 @@
                {
                        // Build the header for the file (field list)
                        reset($this->export);
-                       while (list($name,$value)=each($this->export))
-                       {
+                       //while (list($name,$value)=each($this->export))
+                        if (is_array($this->export))
+                        {
+                            foreach($this->export as $name => $value)
+                            {
                                $entries .= $value . ',';
-                       }
+                            }
+                        }
                        $entries = substr($entries,0,-1);
                        $entries .= "\r\n";
 
@@ -200,10 +204,14 @@
                        for ($i=0;$i<count($this->ids);$i++)
                        {
                                reset($this->export);
-                               while (list($name,$value)=each($this->export))
-                               {
+                               //while (list($name,$value)=each($this->export))
+                                if (is_array($this->export))
+                                {
+                                    foreach($this->export as $name => $value)
+                                    {
                                        $entries .= '"'.$buffer[$i][$value] . 
'",';
-                               }
+                                    }
+                                }
                                $entries = substr($entries,0,-1);
                                $entries .= "\r\n";
                        }




reply via email to

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