phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/setup default_records.inc.php, 1.4.2.6.2.6,


From: Alejandro Borges (lex) <address@hidden>
Subject: [Phpgroupware-cvs] phpgwapi/setup default_records.inc.php, 1.4.2.6.2.6, 1.4.2.6.2.7 setup.inc.php, 1.37.2.6.2.15, 1.37.2.6.2.16 tables_update.inc.php, 1.53.2.9.2.23, 1.53.2.9.2.24
Date: Sun, 26 Oct 2003 03:24:45 +0000

Update of /cvsroot/phpgroupware/phpgwapi/setup
In directory subversions:/tmp/cvs-serv11274/phpgwapi/setup

Modified Files:
      Tag: Version-0_9_16-branch
        default_records.inc.php setup.inc.php tables_update.inc.php 
Log Message:
Addressmaster fixup.... one more is pending, this one is known to crash apache 
in large pgsql updates from 14


Index: default_records.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/setup/default_records.inc.php,v
retrieving revision 1.4.2.6.2.6
retrieving revision 1.4.2.6.2.7
diff -C2 -d -r1.4.2.6.2.6 -r1.4.2.6.2.7
*** default_records.inc.php     19 Oct 2003 01:34:03 -0000      1.4.2.6.2.6
--- default_records.inc.php     26 Oct 2003 03:24:43 -0000      1.4.2.6.2.7
***************
*** 155,158 ****
--- 155,159 ----
  
        $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config 
(config_app, config_name, config_value) VALUES ('phpgwapi','log_levels', '" . 
serialize(array( 'global_level' => 'E', 'module' => array(), 'user' => 
array())) ."')");
+       $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config 
(config_app, config_name, config_value) VALUES 
('phpgwapi','addressmaster','-3')");
  
        $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO 
phpgw_interserv(server_name,server_host,server_url,trust_level,trust_rel,server_mode)
 VALUES ('phpGW 
cvsdemo',NULL,'http://www.phpgroupware.org/cvsdemo/xmlrpc.php',99,0,'xmlrpc')");

Index: setup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/setup/setup.inc.php,v
retrieving revision 1.37.2.6.2.15
retrieving revision 1.37.2.6.2.16
diff -C2 -d -r1.37.2.6.2.15 -r1.37.2.6.2.16
*** setup.inc.php       24 Oct 2003 01:06:11 -0000      1.37.2.6.2.15
--- setup.inc.php       26 Oct 2003 03:24:43 -0000      1.37.2.6.2.16
***************
*** 16,20 ****
        $setup_info['phpgwapi']['name']      = 'phpgwapi';
        $setup_info['phpgwapi']['title']     = 'phpgwapi';
!       $setup_info['phpgwapi']['version']   = '0.9.14.511';
        $setup_info['phpgwapi']['versions']['current_header'] = '1.24';
        $setup_info['phpgwapi']['enable']    = 3;
--- 16,20 ----
        $setup_info['phpgwapi']['name']      = 'phpgwapi';
        $setup_info['phpgwapi']['title']     = 'phpgwapi';
!       $setup_info['phpgwapi']['version']   = '0.9.14.512';
        $setup_info['phpgwapi']['versions']['current_header'] = '1.24';
        $setup_info['phpgwapi']['enable']    = 3;

Index: tables_update.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/setup/tables_update.inc.php,v
retrieving revision 1.53.2.9.2.23
retrieving revision 1.53.2.9.2.24
diff -C2 -d -r1.53.2.9.2.23 -r1.53.2.9.2.24
*** tables_update.inc.php       24 Oct 2003 00:36:31 -0000      1.53.2.9.2.23
--- tables_update.inc.php       26 Oct 2003 03:24:43 -0000      1.53.2.9.2.24
***************
*** 1713,1716 ****
--- 1713,1771 ----
                // remove temporary ab_id field in phpgw_contact, 
phpgw_contact_person, and phpgw_contact_org
                //OR NOT! On 512!
+ //            
$GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_contact',array(
+ //                    'fd' => array(
+ //                            'contact_id' => array('type' => 
'auto','precision' => '4','nullable' => False),
+ //                            'owner' => array('type' => 'int','precision' => 
'4','nullable' => False),
+ //                            'access' => array('type' => 
'varchar','precision' => '7','nullable' => True),
+ //                            'cat_id' => array('type' => 
'varchar','precision' => '32','nullable' => True),
+ //                            'contact_type_id' => array('type' => 
'int','precision' => '4','nullable' => False)
+ //                    ),
+ //                    'pk' => array('contact_id'),
+ //                    'fk' => array(),
+ //                    'ix' => array(),
+ //                    'uc' => array()
+ //                    ),'ab_id');
+ 
+ //            
$GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_contact_person',array(
+ //                    'fd' => array(
+ //                            'person_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+ //                            'first_name' => array('type' => 
'varchar','precision' => '64','nullable' => False),
+ //                            'last_name' => array('type' => 
'varchar','precision' => '64','nullable' => False),
+ //                            'middle_name' => array('type' => 
'varchar','precision' => '64','nullable' => True),
+ //                            'prefix' => array('type' => 
'varchar','precision' => '64','nullable' => True),
+ //                            'suffix' => array('type' => 
'varchar','precision' => '64','nullable' => True),
+ //                            'birthday' => array('type' => 
'varchar','precision' => '32','nullable' => True),
+ //                            'pubkey' => array('type' => 'text','nullable' 
=> True),
+ //                            'title' => array('type' => 
'varchar','precision' => '64','nullable' => True),
+ //                            'department' => array('type' => 
'varchar','precision' => '64','nullable' => True),
+ //                            'initials' => array('type' => 
'varchar','precision' => '10','nullable' => True),
+ //                            'sound' => array('type' => 
'varchar','precision' => '64','nullable' => True),
+ //                            'active' => array('type' => 'char','precision' 
=> '1','nullable' => True,'default' => 'Y'),
+ //                            'created_on' => array('type' => 
'int','precision' => '4','nullable' => False),
+ //                            'created_by' => array('type' => 
'int','precision' => '4','nullable' => False),
+ //                            'modified_on' => array('type' => 
'int','precision' => '4','nullable' => False),
+ //                            'modified_by' => array('type' => 
'int','precision' => '4','nullable' => False)
+ //                    ),
+ //                    'pk' => array(),
+ //                    'fk' => array(),
+ //                    'ix' => array(),
+ //                    'uc' => array()
+ //                    ),'ab_id');
+ //            
$GLOBALS['phpgw_setup']->oProc->DropColumn('phpgw_contact_org',array(
+ //                    'fd' => array(
+ //                            'org_id' => array('type' => 'int','precision' 
=> '4','nullable' => False),
+ //                            'name' => array('type' => 'varchar','precision' 
=> '80','nullable' => False),
+ //                            'active' => array('type' => 'char','precision' 
=> '1','nullable' => False,'default' => 'Y'),
+ //                            'parent' => array('type' => 'int','precision' 
=> '4','nullable' => True),
+ //                            'created_on' => array('type' => 
'int','precision' => '4','nullable' => False),
+ //                            'created_by' => array('type' => 
'int','precision' => '4','nullable' => False),
+ //                            'modified_on' => array('type' => 
'int','precision' => '4','nullable' => False),
+ //                            'modified_by' => array('type' => 
'int','precision' => '4','nullable' => False)
+ //                    ),
+ //                    'pk' => array(),
+ //                    'fk' => array(),
+ //                    'ix' => array(),
+ //                    'uc' => array()
+ //                    ),'ab_id');
  
                // Paste this below!!!
***************
*** 1792,1794 ****
--- 1847,1897 ----
                return $GLOBALS['setup_info']['phpgwapi']['currentver'];
        }
+ 
+       $test[] = '0.9.14.511';
+       function phpgwapi_upgrade0_9_14_511()
+       {
+               global $setup_info,$phpgw_setup;
+ 
+               $db1 = $GLOBALS['phpgw_setup']->db; $db1->auto_stripslashes = 
False; $db1->Halt_On_Error = 'yes';
+               $addressmaster_id = -3;
+               $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_config 
(config_app, config_name, config_value) VALUES 
('phpgwapi','addressmaster','-3')");
+ 
+               /* Get the contact type id  */
+               $GLOBALS['phpgw_setup']->oProc->query("SELECT contact_type_id 
FROM phpgw_contact_types WHERE contact_type_table='phpgw_contact_person'");
+               $GLOBALS['phpgw_setup']->oProc->next_record();
+               $contact_type_id = 
$GLOBALS['phpgw_setup']->oProc->f('contact_type_id');
+ 
+               /* Get all user accounts for create his contact record   */
+               $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM 
phpgw_accounts WHERE account_type='u'");
+               while ($GLOBALS['phpgw_setup']->oProc->next_record())
+               {
+                       /* Insert in phpgw_contact  */
+                       $db1->query("INSERT INTO phpgw_contact (owner, access, 
contact_type_id) VALUES(-3"
+                                   . ", '".'public'. "', ". 
$contact_type_id.")");
+                       
+                       /* Get the contact_id  */
+                       $db1->query("SELECT max(contact_id) FROM 
phpgw_contact");
+                       $db1->next_record();
+                       $contact_id = $db1->f(0);
+                       
+                       /* Insert in phpgw_contact_person */
+                       $db1->query("INSERT INTO phpgw_contact_person 
(person_id,first_name,last_name,
+                               
prefix,created_by,modified_by,created_on,modified_on,ab_id) VALUES ("
+                               . $contact_id
+                               . ",'" . 
$db1->db_addslashes($GLOBALS['phpgw_setup']->oProc->f('account_firstname')) . 
"'"
+                               . ",'" . 
$db1->db_addslashes($GLOBALS['phpgw_setup']->oProc->f('account_lastname')) . "'"
+                               . ",'" . 
$db1->db_addslashes($GLOBALS['phpgw_setup']->oProc->f('account_lid')) . "'"
+                               . "," . $addressmaster_id 
+                               . "," . $addressmaster_id 
+                               . "," . time()
+                               . "," . time(). ')');
+ 
+                       $db1->query("UPDATE phpgw_accounts SET person_id = ". 
$contact_id .
+                                   " WHERE account_id = ". 
$GLOBALS['phpgw_setup']->oProc->f('account_id'));
+               }
+               
+               $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.14.512';
+               return $GLOBALS['setup_info']['phpgwapi']['currentver'];
+       }
+ 
  ?>





reply via email to

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