[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: sitemgr/setup tables_update.inc.php,1.11.2.1,1.
From: |
Michael Totschnig <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: sitemgr/setup tables_update.inc.php,1.11.2.1,1.11.2.2 |
Date: |
Mon, 23 Jun 2003 16:43:09 -0400 |
Update of /cvsroot/phpgroupware/sitemgr/setup
In directory subversions:/tmp/cvs-serv16382
Modified Files:
Tag: Version-0_9_16-branch
tables_update.inc.php
Log Message:
oproc does not know get_last_insert_id
Index: tables_update.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/setup/tables_update.inc.php,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -C2 -r1.11.2.1 -r1.11.2.2
*** tables_update.inc.php 23 Jun 2003 20:31:21 -0000 1.11.2.1
--- tables_update.inc.php 23 Jun 2003 20:43:06 -0000 1.11.2.2
***************
*** 431,443 ****
));
- //Create default site and hang all existing categories into it
- $phpgw_setup->oProc->query("INSERT INTO phpgw_categories
(cat_parent,cat_owner,cat_access,cat_appname,cat_name,cat_description,last_mod)
VALUES (0,-1,'public','sitemgr','Default Website','This website has been added
by setup',0)");
- $site_id =
$phpgw_setup->oProc->get_last_insert_id('phpgw_categories','cat_id');
- $phpgw_setup->oProc->query("UPDATE phpgw_categories SET
cat_main = $site_id WHERE cat_appname = 'sitemgr'",__LINE__,__FILE__);
- $phpgw_setup->oProc->query("UPDATE phpgw_categories SET
cat_parent = $site_id WHERE cat_appname = 'sitemgr' AND cat_parent = 0 AND
cat_id != $site_id",__LINE__,__FILE__);
- $phpgw_setup->oProc->query("UPDATE phpgw_categories SET
cat_level = cat_level +1 WHERE cat_appname = 'sitemgr' AND cat_id !=
$site_id",__LINE__,__FILE__);
- $phpgw_setup->oProc->query("INSERT INTO phpgw_sitemgr_sites
(site_id,site_name) VALUES ($site_id,'Default Website')");
-
$db2 = $phpgw_setup->db;
--- 431,443 ----
));
$db2 = $phpgw_setup->db;
+
+ //Create default site and hang all existing categories into it
+ $db2->query("INSERT INTO phpgw_categories
(cat_parent,cat_owner,cat_access,cat_appname,cat_name,cat_description,last_mod)
VALUES (0,-1,'public','sitemgr','Default Website','This website has been added
by setup',0)");
+ $site_id =
$db2->get_last_insert_id('phpgw_categories','cat_id');
+ $db2->query("UPDATE phpgw_categories SET cat_main = $site_id
WHERE cat_appname = 'sitemgr'",__LINE__,__FILE__);
+ $db2->query("UPDATE phpgw_categories SET cat_parent = $site_id
WHERE cat_appname = 'sitemgr' AND cat_parent = 0 AND cat_id !=
$site_id",__LINE__,__FILE__);
+ $db2->query("UPDATE phpgw_categories SET cat_level = cat_level
+1 WHERE cat_appname = 'sitemgr' AND cat_id != $site_id",__LINE__,__FILE__);
+ $db2->query("INSERT INTO phpgw_sitemgr_sites
(site_id,site_name) VALUES ($site_id,'Default Website')");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: sitemgr/setup tables_update.inc.php,1.11.2.1,1.11.2.2,
Michael Totschnig <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: sitemgr/modules/sitemgr_module_guestbook/inc class.guestbook_BO.inc.php,NONE,1.1.2.1 class.guestbook_SO.inc.php,NONE,1.1.2.1
- Next by Date:
[Phpgroupware-cvs] CVS: sitemgr/modules/sitemgr_module_guestbook INSTALL,NONE,1.1.2.1 README,NONE,1.1.2.1
- Previous by thread:
[Phpgroupware-cvs] CVS: sitemgr/modules/sitemgr_module_guestbook/inc class.guestbook_BO.inc.php,NONE,1.1.2.1 class.guestbook_SO.inc.php,NONE,1.1.2.1
- Next by thread:
[Phpgroupware-cvs] CVS: sitemgr/modules/sitemgr_module_guestbook INSTALL,NONE,1.1.2.1 README,NONE,1.1.2.1
- Index(es):