From c51f21db61d3295143da40f3871a397781eeb8cd Mon Sep 17 00:00:00 2001 From: bettina Date: Thu, 22 Feb 2001 16:23:00 +0000 Subject: [PATCH] renamed table notes -> phpgw_notes --- header.inc.php.template | 22 +++++++++++----------- setup/sql/mysql_newtables.inc.php | 3 ++- setup/sql/mysql_upgrade_beta.inc.php | 12 ++++++++++++ setup/sql/pgsql_newtables.inc.php | 3 ++- setup/sql/pgsql_upgrade_beta.inc.php | 27 +++++++++++++++++++++++++++ version.inc.php | 2 +- 6 files changed, 55 insertions(+), 14 deletions(-) diff --git a/header.inc.php.template b/header.inc.php.template index 0984c03233..d359d2a09c 100644 --- a/header.inc.php.template +++ b/header.inc.php.template @@ -19,26 +19,26 @@ * the absolute path to fit your site, and you should be up and running. * \**************************************************************************/ - define("PHPGW_SERVER_ROOT", "{SERVER_ROOT}"); - define("PHPGW_INCLUDE_ROOT", "{INCLUDE_ROOT}"); - $phpgw_info["server"]["header_admin_password"] = "{HEADER_ADMIN_PASSWORD}"; + define("PHPGW_SERVER_ROOT", "/usr/local/www/phpgroupware"); + define("PHPGW_INCLUDE_ROOT", "/usr/local/www/phpgroupware"); + $phpgw_info["server"]["header_admin_password"] = "bla"; $phpgw_domain["default"] = array ( - "db_host" => "{DB_HOST}", - "db_name" => "{DB_NAME}", - "db_user" => "{DB_USER}", - "db_pass" => "{DB_PASS}", + "db_host" => "localhost", + "db_name" => "phpgw", + "db_user" => "root", + "db_pass" => "", /* Look at the README file */ - "db_type" => "{DB_TYPE}", + "db_type" => "mysql", /* This will limit who is allowed to make configuration modifcations */ - "config_passwd" => "{CONFIG_PASS}" + "config_passwd" => "bla" ); /* If you want to have your domains in a select box, change to True */ - $phpgw_info["server"]["show_domain_selectbox"] = {DOMAIN_SELECTBOX}; + $phpgw_info["server"]["show_domain_selectbox"] = False; /* This is used to control mcrypt's use */ - $phpgw_info["server"]["mcrypt_enabled"] = {ENABLE_MCRYPT}; + $phpgw_info["server"]["mcrypt_enabled"] = False; /* Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use. */ $phpgw_info["server"]["versions"]["mcrypt"] = "{MCRYPT_VERSION}"; diff --git a/setup/sql/mysql_newtables.inc.php b/setup/sql/mysql_newtables.inc.php index dcf6683431..d90b42a99d 100644 --- a/setup/sql/mysql_newtables.inc.php +++ b/setup/sql/mysql_newtables.inc.php @@ -273,10 +273,11 @@ )"; $phpgw_setup->db->query($sql); - $sql = "CREATE TABLE notes ( + $sql = "CREATE TABLE phpgw_notes ( note_id int(20) NOT NULL auto_increment, note_owner int(11), note_date int(11), + note_category int(9), note_content text, PRIMARY KEY (note_id) )"; diff --git a/setup/sql/mysql_upgrade_beta.inc.php b/setup/sql/mysql_upgrade_beta.inc.php index 8fbc5845c8..d39d9c213f 100644 --- a/setup/sql/mysql_upgrade_beta.inc.php +++ b/setup/sql/mysql_upgrade_beta.inc.php @@ -1010,6 +1010,18 @@ $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre11'; } + $test[] = '0.9.10pre11'; + function upgrade0_9_10pre11() + { + global $phpgw_info, $phpgw_setup; + + $phpgw_setup->db->query("alter table notes rename phpgw_notes",__LINE__,__FILE__); + + $phpgw_setup->db->query("alter table phpgw_notes add column note_category int(9) after note_date",__LINE__,__FILE__); + + $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre12'; + } + reset ($test); while (list ($key, $value) = each ($test)){ if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) { diff --git a/setup/sql/pgsql_newtables.inc.php b/setup/sql/pgsql_newtables.inc.php index dc91c8d388..bf271bf230 100644 --- a/setup/sql/pgsql_newtables.inc.php +++ b/setup/sql/pgsql_newtables.inc.php @@ -248,10 +248,11 @@ )"; $phpgw_setup->db->query($sql); - $sql = "CREATE TABLE notes ( + $sql = "CREATE TABLE phpgw_notes ( note_id serial, note_owner int, note_date int, + note_category int, note_content text )"; $phpgw_setup->db->query($sql); diff --git a/setup/sql/pgsql_upgrade_beta.inc.php b/setup/sql/pgsql_upgrade_beta.inc.php index fd4e0e7827..a2ce2a2a55 100644 --- a/setup/sql/pgsql_upgrade_beta.inc.php +++ b/setup/sql/pgsql_upgrade_beta.inc.php @@ -1088,6 +1088,33 @@ $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre11'; } + $test[] = '0.9.10pre10'; + function upgrade0_9_10pre10() + { + global $phpgw_info, $phpgw_setup; + + $phpgw_setup->db->query("create table phpgw_temp as select * from notes",__LINE__,__FILE__); + + $phpgw_setup->db->query("drop sequence notes_note_id_seq"); + + $phpgw_setup->db->query("drop table notes",__LINE__,__FILE__); + + $sql = "CREATE TABLE phpgw_notes ( + note_id serial, + note_owner int, + note_date int, + note_category int, + note_content text + )"; + $phpgw_setup->db->query($sql); + + $phpgw_setup->db->query("insert into phpgw_notes select * from phpgw_temp",__LINE__,__FILE__); + + $phpgw_setup->db->query("drop table phpgw_temp",__LINE__,__FILE__); + + $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre12'; + } + reset ($test); while (list ($key, $value) = each ($test)){ if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) { diff --git a/version.inc.php b/version.inc.php index 2ea75b8506..070775de75 100644 --- a/version.inc.php +++ b/version.inc.php @@ -11,5 +11,5 @@ /* $Id$ */ - $phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre11"; + $phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre12"; $phpgw_info["server"]["versions"]["current_header"] = "1.11";