phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: infolog/setup setup.inc.php,1.24,1.25 tables_up


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: infolog/setup setup.inc.php,1.24,1.25 tables_update.inc.php,1.5,1.6
Date: Sat, 14 Jun 2003 09:52:48 -0400

Update of /cvsroot/phpgroupware/infolog/setup
In directory subversions:/tmp/cvs-serv12954

Modified Files:
        setup.inc.php tables_update.inc.php 
Log Message:
1) corrected the escapeing of " and '
2) added the wiki page

Index: setup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/setup/setup.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** setup.inc.php       27 Apr 2003 22:33:35 -0000      1.24
--- setup.inc.php       14 Jun 2003 13:52:45 -0000      1.25
***************
*** 13,18 ****
  
        $setup_info['infolog']['name']      = 'infolog';
!       $setup_info['infolog']['title']     = 'InfoLog';        // still needed 
to run in 0.9.14/6
!       $setup_info['infolog']['version']   = '0.9.15.004';
        $setup_info['infolog']['app_order'] = 4;
        $setup_info['infolog']['tables']    = 
array('phpgw_infolog','phpgw_links');
--- 13,17 ----
  
        $setup_info['infolog']['name']      = 'infolog';
!       $setup_info['infolog']['version']   = '0.9.15.005';
        $setup_info['infolog']['app_order'] = 4;
        $setup_info['infolog']['tables']    = 
array('phpgw_infolog','phpgw_links');
***************
*** 44,48 ****
                It allows to interactivly assign fields, customize the values 
with regular 
                expressions and direct calls to php-functions (e.g. to link the 
phone calls 
!               (again) to the addressbook entrys).';
  
        /* The hooks this app includes, needed for hooks registration */
--- 43,49 ----
                It allows to interactivly assign fields, customize the values 
with regular 
                expressions and direct calls to php-functions (e.g. to link the 
phone calls 
!               (again) to the addressbook entrys).<p>
!               <b>More information</b> about InfoLog and the current 
development-status can be found on the 
!               <a href="http://www.phpgroupware.org/wiki/InfoLog"; 
target="_blank">InfoLog page in our Wiki</a>.';
  
        /* The hooks this app includes, needed for hooks registration */
***************
*** 61,69 ****
        $setup_info['infolog']['depends'][] = array(
                 'appname' => 'phpgwapi',
!                'versions' => Array('0.9.13','0.9.14','0.9.15')
        );
        $setup_info['infolog']['depends'][] = array(
                 'appname' => 'etemplate',
!                'versions' => Array('0.9.15')
        );
  ?>
--- 62,70 ----
        $setup_info['infolog']['depends'][] = array(
                 'appname' => 'phpgwapi',
!                'versions' => Array('0.9.13','0.9.14','0.9.15','0.9.16')
        );
        $setup_info['infolog']['depends'][] = array(
                 'appname' => 'etemplate',
!                'versions' => Array('0.9.15','0.9.16')
        );
  ?>

Index: tables_update.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/infolog/setup/tables_update.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** tables_update.inc.php       17 Oct 2002 22:00:43 -0000      1.5
--- tables_update.inc.php       14 Jun 2003 13:52:45 -0000      1.6
***************
*** 58,71 ****
        function infolog_upgrade0_9_15_002()
        {
!               echo "<p>infolog_upgrade0_9_15_002</p>\n";
                $insert = 'INSERT INTO phpgw_links 
(link_app1,link_id1,link_app2,link_id2,link_remark,link_lastmod,link_owner) ';
                $select = "SELECT 
'infolog',info_id,'addressbook',info_addr_id,info_from,info_datemodified,info_owner
 FROM phpgw_infolog WHERE info_addr_id != 0";
!               echo "<p>copying address-links: $insert.$select</p>\n";
                $GLOBALS['phpgw_setup']->oProc->query($insert.$select);
                $select = "SELECT 
'infolog',info_id,'projects',info_proj_id,'',info_datemodified,info_owner FROM 
phpgw_infolog WHERE info_proj_id != 0";
!               echo "<p>copying projects-links: $insert.$select</p>\n";
                $GLOBALS['phpgw_setup']->oProc->query($insert.$select);
                $select = "SELECT 
'infolog',info_id,'calendar',info_event_id,'',info_datemodified,info_owner FROM 
phpgw_infolog WHERE info_event_id != 0";
!               echo "<p>copying calendar-links: $insert.$select</p>\n";
                $GLOBALS['phpgw_setup']->oProc->query($insert.$select);
  
--- 58,71 ----
        function infolog_upgrade0_9_15_002()
        {
!               //echo "<p>infolog_upgrade0_9_15_002</p>\n";
                $insert = 'INSERT INTO phpgw_links 
(link_app1,link_id1,link_app2,link_id2,link_remark,link_lastmod,link_owner) ';
                $select = "SELECT 
'infolog',info_id,'addressbook',info_addr_id,info_from,info_datemodified,info_owner
 FROM phpgw_infolog WHERE info_addr_id != 0";
!               //echo "<p>copying address-links: $insert.$select</p>\n";
                $GLOBALS['phpgw_setup']->oProc->query($insert.$select);
                $select = "SELECT 
'infolog',info_id,'projects',info_proj_id,'',info_datemodified,info_owner FROM 
phpgw_infolog WHERE info_proj_id != 0";
!               //echo "<p>copying projects-links: $insert.$select</p>\n";
                $GLOBALS['phpgw_setup']->oProc->query($insert.$select);
                $select = "SELECT 
'infolog',info_id,'calendar',info_event_id,'',info_datemodified,info_owner FROM 
phpgw_infolog WHERE info_event_id != 0";
!               //echo "<p>copying calendar-links: $insert.$select</p>\n";
                $GLOBALS['phpgw_setup']->oProc->query($insert.$select);
  
***************
*** 215,218 ****
--- 215,240 ----
  
                $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.004';
+               return $GLOBALS['setup_info']['infolog']['currentver'];
+       }
+       
+       $test[] = '0.9.15.004';
+       function infolog_upgrade0_9_15_004()
+       {
+               // this update correctes wrong escapes of ' and " in the past
+               //
+               $db2 = $GLOBALS['phpgw_setup']->db;     // we need a 2. 
result-set
+               
+               $to_correct = array('info_from','info_subject','info_des');
+               foreach ($to_correct as $col)
+               {
+                       $GLOBALS['phpgw_setup']->oProc->query("SELECT 
info_id,$col FROM phpgw_infolog WHERE $col LIKE '%\\'%' OR $col LIKE '%\"%'");
+                       while ($GLOBALS['phpgw_setup']->oProc->next_record())
+                       {
+                               $db2->query("UPDATE phpgw_infolog SET 
$col='".$db2->db_addslashes(stripslashes($GLOBALS['phpgw_setup']->oProc->f($col))).
+                                       "' WHERE 
info_id=".$GLOBALS['phpgw_setup']->oProc->f('info_id'));
+                       }
+               }
+               
+               $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.005';
                return $GLOBALS['setup_info']['infolog']['currentver'];
        }





reply via email to

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