Finished adding in the new hooks code

This commit is contained in:
jengo 2000-12-18 01:44:42 +00:00
parent efe775d040
commit 3bb96fbf02
5 changed files with 49 additions and 3 deletions

View File

@ -289,7 +289,16 @@
)"; )";
$db->query($sql); $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; $oldversion = $currentver;
update_version_table(); update_version_table();
?> ?>

View File

@ -753,6 +753,21 @@
$currentver = "0.9.8pre4"; $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); reset ($test);
while (list ($key, $value) = each ($test)){ while (list ($key, $value) = each ($test)){
if ($currentver == $value) { if ($currentver == $value) {

View File

@ -260,7 +260,15 @@
)"; )";
$db->query($sql); $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; $oldversion = $currentver;
update_version_table(); update_version_table();
?> ?>

View File

@ -778,6 +778,20 @@
$currentver = "0.9.8pre4"; $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); reset ($test);
while (list ($key, $value) = each ($test)){ while (list ($key, $value) = each ($test)){
if ($currentver == $value) { if ($currentver == $value) {

View File

@ -11,5 +11,5 @@
/* $Id$ */ /* $Id$ */
$phpgw_info["server"]["version"] = "0.9.8pre4"; $phpgw_info["server"]["version"] = "0.9.8pre5";
$phpgw_info["server"]["current_header_version"] = "1.5"; $phpgw_info["server"]["current_header_version"] = "1.5";