phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] addressbook/inc class.uiaddressbook.inc.php, 1.36.2.1


From: Jonathan Rivera <address@hidden>
Subject: [Phpgroupware-cvs] addressbook/inc class.uiaddressbook.inc.php, 1.36.2.15.2.36, 1.36.2.15.2.37
Date: Mon, 01 Dec 2003 18:37:22 +0000

Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv28969/addressbook/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.uiaddressbook.inc.php 
Log Message:
more about bugfix #6768


Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.36.2.15.2.36
retrieving revision 1.36.2.15.2.37
diff -C2 -d -r1.36.2.15.2.36 -r1.36.2.15.2.37
*** class.uiaddressbook.inc.php 29 Nov 2003 04:51:13 -0000      1.36.2.15.2.36
--- class.uiaddressbook.inc.php 1 Dec 2003 18:37:19 -0000       1.36.2.15.2.37
***************
*** 1644,1647 ****
--- 1644,1672 ----
                }
  
+               /**
+               * Strip slashes from all elements of array
+               *
+               * @param array $data The array with all data what you want
+               * @return array The same array with stripslashes
+               */
+               function stripslashes_from_array($data=array())
+               {
+                       if(is_array($data))
+                       {
+                               foreach($data as $key => $value)
+                               {
+                                       if(is_array($value))
+                                       {
+                                               $record[$key] = 
$this->stripslashes_from_array($value);
+                                       }
+                                       else
+                                       {
+                                               $record[$key] = 
stripslashes($value);
+                                       }
+                               }
+                       }
+                       return $record;
+               }
+ 
                /*************************************************************\
                * Management tabs sessions functions                          *
***************
*** 1820,1824 ****
                                        $data = 
$this->bo->get_comm_contact_data($this->contact_id,'',True);
                                        foreach($data as $key => $value)
!                                       {
                                                
$entry['comm_data'][$value['comm_description']] = $value['comm_data'];
                                                
if($value['comm_preferred']=='Y')
--- 1845,1849 ----
                                        $data = 
$this->bo->get_comm_contact_data($this->contact_id,'',True);
                                        foreach($data as $key => $value)
!                                       {                                       
        
                                                
$entry['comm_data'][$value['comm_description']] = $value['comm_data'];
                                                
if($value['comm_preferred']=='Y')
***************
*** 1920,1933 ****
                        
$GLOBALS['phpgw']->session->appsession('load_vars','addressbook', $load_vars);
  
!                       if(is_array($entry))
!                       {
!                               foreach($entry as $key => $data)
!                               {
!                                       $record[$key] = stripslashes($data);
!                               }
!                       }
                        return $record;
                }
! 
                /**
                * Save the data of the correct tab
--- 1945,1952 ----
                        
$GLOBALS['phpgw']->session->appsession('load_vars','addressbook', $load_vars);
  
!                       $record = $this->stripslashes_from_array($entry);
                        return $record;
                }
!               
                /**
                * Save the data of the correct tab





reply via email to

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