From 9a6482d86b668245b39f42f8656ce996dfe0af84 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Tue, 13 Feb 2001 01:38:16 +0000 Subject: [PATCH] Added old access field if anyone needs it --- addressbook/setup/upgrade.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/addressbook/setup/upgrade.php b/addressbook/setup/upgrade.php index ecf7a14f10..438868c67a 100644 --- a/addressbook/setup/upgrade.php +++ b/addressbook/setup/upgrade.php @@ -15,12 +15,15 @@ global $phpgw_info, $phpgw_setup; $phpgw_setup->loaddb(); + // create db objects for the main and two nested queries below + $db1 = $db2 = $phpgw_setup->db; + // create new contacts class tables $sql = "DROP TABLE IF EXISTS phpgw_addressbook"; - $phpgw_setup->db->query($sql); + $db1->query($sql); $sql = "DROP TABLE IF EXISTS phpgw_addressbook_extra"; - $phpgw_setup->db->query($sql); + $db1->query($sql); $sql = "CREATE TABLE phpgw_addressbook ( id int(8) DEFAULT '0' NOT NULL, @@ -80,7 +83,7 @@ UNIQUE id (id) )"; - $phpgw_setup->db->query($sql); + $db1->query($sql); $sql = "CREATE TABLE phpgw_addressbook_extra ( contact_id int(11), @@ -89,11 +92,8 @@ contact_value varchar(255) )"; - $phpgw_setup->db->query($sql); + $db1->query($sql); - // create db objects for the main and two nested queries below - $db1 = $db2 = $phpgw_setup->db; - // read in old addressbook $db1->query("select * from addressbook"); @@ -126,6 +126,7 @@ $extra["bday"] = $db1->f("ab_bday"); $extra["url"] = $db1->f("ab_url"); $extra["notes"] = $db1->f("ab_notes"); + $extra["access"] = $db1->f("ab_access"); // add this record's standard with current entry's owner as owner $sql="INSERT INTO phpgw_addressbook ("