From 3bb96fbf023368e500d5c8112aa488863d968b8d Mon Sep 17 00:00:00 2001 From: jengo Date: Mon, 18 Dec 2000 01:44:42 +0000 Subject: [PATCH] Finished adding in the new hooks code --- setup/sql/mysql_newtables.inc.php | 11 ++++++++++- setup/sql/mysql_upgrade_beta.inc.php | 15 +++++++++++++++ setup/sql/pgsql_newtables.inc.php | 10 +++++++++- setup/sql/pgsql_upgrade_beta.inc.php | 14 ++++++++++++++ version.inc.php | 2 +- 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/setup/sql/mysql_newtables.inc.php b/setup/sql/mysql_newtables.inc.php index 530ba76e51..27cfc436d1 100644 --- a/setup/sql/mysql_newtables.inc.php +++ b/setup/sql/mysql_newtables.inc.php @@ -289,7 +289,16 @@ )"; $db->query($sql); - $currentver = "0.9.8pre4"; + $sql = "create table phpgw_hooks ( + hook_id int not null auto_increment, + hook_appname varchar(255), + hook_location varchar(255), + hook_filename varchar(255), + primary key hook_id (hook_id) + );"; + $db->query($sql); + + $currentver = "0.9.8pre5"; $oldversion = $currentver; update_version_table(); ?> diff --git a/setup/sql/mysql_upgrade_beta.inc.php b/setup/sql/mysql_upgrade_beta.inc.php index 07fba366ab..850e856450 100644 --- a/setup/sql/mysql_upgrade_beta.inc.php +++ b/setup/sql/mysql_upgrade_beta.inc.php @@ -753,6 +753,21 @@ $currentver = "0.9.8pre4"; } + $test[] = "0.9.8pre4"; + function upgrade0_9_8pre4(){ + global $currentver, $oldversion, $phpgw_info, $db; + + $sql = "create table phpgw_hooks ( + hook_id int not null auto_increment, + hook_appname varchar(255), + hook_location varchar(255), + hook_filename varchar(255), + primary key hook_id (hook_id) + );"; + $db->query($sql); + $currentver = "0.9.8pre5"; + } + reset ($test); while (list ($key, $value) = each ($test)){ if ($currentver == $value) { diff --git a/setup/sql/pgsql_newtables.inc.php b/setup/sql/pgsql_newtables.inc.php index 06ee3d94b8..1baad65056 100644 --- a/setup/sql/pgsql_newtables.inc.php +++ b/setup/sql/pgsql_newtables.inc.php @@ -260,7 +260,15 @@ )"; $db->query($sql); - $currentver = "0.9.8pre4"; + $sql = "create table phpgw_hooks ( + hook_id serial, + hook_appname varchar(255), + hook_location varchar(255), + hook_filename varchar(255) + );"; + $db->query($sql); + + $currentver = "0.9.8pre5"; $oldversion = $currentver; update_version_table(); ?> diff --git a/setup/sql/pgsql_upgrade_beta.inc.php b/setup/sql/pgsql_upgrade_beta.inc.php index 12e93282c7..5255f5d3f6 100644 --- a/setup/sql/pgsql_upgrade_beta.inc.php +++ b/setup/sql/pgsql_upgrade_beta.inc.php @@ -778,6 +778,20 @@ $currentver = "0.9.8pre4"; } + $test[] = "0.9.8pre4"; + function upgrade0_9_8pre4(){ + global $currentver, $oldversion, $phpgw_info, $db; + + $sql = "create table phpgw_hooks ( + hook_id serial, + hook_appname varchar(255), + hook_location varchar(255), + hook_filename varchar(255) + );"; + $db->query($sql); + $currentver = "0.9.8pre5"; + } + reset ($test); while (list ($key, $value) = each ($test)){ if ($currentver == $value) { diff --git a/version.inc.php b/version.inc.php index 2ff267d6e5..17bb3b34a0 100644 --- a/version.inc.php +++ b/version.inc.php @@ -11,5 +11,5 @@ /* $Id$ */ - $phpgw_info["server"]["version"] = "0.9.8pre4"; + $phpgw_info["server"]["version"] = "0.9.8pre5"; $phpgw_info["server"]["current_header_version"] = "1.5";