phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.config.inc.php,1.7,1.7.2.1


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.config.inc.php,1.7,1.7.2.1
Date: Fri, 12 Apr 2002 23:22:45 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv3008/phpgwapi/inc

Modified Files:
      Tag: Version-0_9_14-branch
        class.config.inc.php 
Log Message:
Fix for addressbook custom fields



Index: class.config.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.config.inc.php,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -C2 -r1.7 -r1.7.2.1
*** class.config.inc.php        23 Nov 2001 19:19:04 -0000      1.7
--- class.config.inc.php        13 Apr 2002 03:22:43 -0000      1.7.2.1
***************
*** 45,49 ****
                        while ($this->db->next_record())
                        {
!                               $this->config_data[$this->db->f('config_name')] 
= $this->db->f('config_value');
                        }
                }
--- 45,57 ----
                        while ($this->db->next_record())
                        {
!                               $test = 
@unserialize($this->db->f('config_value'));
!                               if($test)
!                               {
!                                       
$this->config_data[$this->db->f('config_name')] = $test;
!                               }
!                               else
!                               {
!                                       
$this->config_data[$this->db->f('config_name')] = $this->db->f('config_value');
!                               }
                        }
                }
***************
*** 63,71 ****
                                while (list($name,$value) = each($config_data))
                                {
                                        $name  = addslashes($name);
                                        $value = addslashes($value);
                                        $this->db->query("delete from 
phpgw_config where config_name='" . $name . "'",__LINE__,__FILE__);
!                                       $this->db->query("insert into 
phpgw_config (config_app,config_name,config_value) "
!                                               . "values ('" . $this->appname 
. "','" . $name . "','" . $value . "')",__LINE__,__FILE__);
                                }
                                $this->db->unlock();
--- 71,84 ----
                                while (list($name,$value) = each($config_data))
                                {
+                                       if(is_array($value))
+                                       {
+                                               $value = serialize($value);
+                                       }
                                        $name  = addslashes($name);
                                        $value = addslashes($value);
                                        $this->db->query("delete from 
phpgw_config where config_name='" . $name . "'",__LINE__,__FILE__);
!                                       $query = "insert into phpgw_config 
(config_app,config_name,config_value) "
!                                               . "values ('" . $this->appname 
. "','" . $name . "','" . $value . "')";
!                                       
$this->db->query($query,__LINE__,__FILE__);
                                }
                                $this->db->unlock();




reply via email to

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