forked from extern/egroupware
Added old access field if anyone needs it
This commit is contained in:
parent
5d877e2951
commit
9a6482d86b
@ -15,12 +15,15 @@
|
|||||||
global $phpgw_info, $phpgw_setup;
|
global $phpgw_info, $phpgw_setup;
|
||||||
$phpgw_setup->loaddb();
|
$phpgw_setup->loaddb();
|
||||||
|
|
||||||
|
// create db objects for the main and two nested queries below
|
||||||
|
$db1 = $db2 = $phpgw_setup->db;
|
||||||
|
|
||||||
// create new contacts class tables
|
// create new contacts class tables
|
||||||
$sql = "DROP TABLE IF EXISTS phpgw_addressbook";
|
$sql = "DROP TABLE IF EXISTS phpgw_addressbook";
|
||||||
$phpgw_setup->db->query($sql);
|
$db1->query($sql);
|
||||||
|
|
||||||
$sql = "DROP TABLE IF EXISTS phpgw_addressbook_extra";
|
$sql = "DROP TABLE IF EXISTS phpgw_addressbook_extra";
|
||||||
$phpgw_setup->db->query($sql);
|
$db1->query($sql);
|
||||||
|
|
||||||
$sql = "CREATE TABLE phpgw_addressbook (
|
$sql = "CREATE TABLE phpgw_addressbook (
|
||||||
id int(8) DEFAULT '0' NOT NULL,
|
id int(8) DEFAULT '0' NOT NULL,
|
||||||
@ -80,7 +83,7 @@
|
|||||||
UNIQUE id (id)
|
UNIQUE id (id)
|
||||||
)";
|
)";
|
||||||
|
|
||||||
$phpgw_setup->db->query($sql);
|
$db1->query($sql);
|
||||||
|
|
||||||
$sql = "CREATE TABLE phpgw_addressbook_extra (
|
$sql = "CREATE TABLE phpgw_addressbook_extra (
|
||||||
contact_id int(11),
|
contact_id int(11),
|
||||||
@ -89,11 +92,8 @@
|
|||||||
contact_value varchar(255)
|
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
|
// read in old addressbook
|
||||||
$db1->query("select * from addressbook");
|
$db1->query("select * from addressbook");
|
||||||
|
|
||||||
@ -126,6 +126,7 @@
|
|||||||
$extra["bday"] = $db1->f("ab_bday");
|
$extra["bday"] = $db1->f("ab_bday");
|
||||||
$extra["url"] = $db1->f("ab_url");
|
$extra["url"] = $db1->f("ab_url");
|
||||||
$extra["notes"] = $db1->f("ab_notes");
|
$extra["notes"] = $db1->f("ab_notes");
|
||||||
|
$extra["access"] = $db1->f("ab_access");
|
||||||
|
|
||||||
// add this record's standard with current entry's owner as owner
|
// add this record's standard with current entry's owner as owner
|
||||||
$sql="INSERT INTO phpgw_addressbook ("
|
$sql="INSERT INTO phpgw_addressbook ("
|
||||||
|
Loading…
Reference in New Issue
Block a user