mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 04:11:49 +02:00
added access field to categories table
This commit is contained in:
parent
130d7411b0
commit
f0458b1acd
@ -303,6 +303,7 @@
|
|||||||
cat_id int(9) DEFAULT '0' NOT NULL auto_increment,
|
cat_id int(9) DEFAULT '0' NOT NULL auto_increment,
|
||||||
cat_parent int(9) DEFAULT '0' NOT NULL,
|
cat_parent int(9) DEFAULT '0' NOT NULL,
|
||||||
cat_owner int(11) DEFAULT '0' NOT NULL,
|
cat_owner int(11) DEFAULT '0' NOT NULL,
|
||||||
|
cat_access char(7),
|
||||||
cat_appname varchar(50) NOT NULL,
|
cat_appname varchar(50) NOT NULL,
|
||||||
cat_name varchar(150) NOT NULL,
|
cat_name varchar(150) NOT NULL,
|
||||||
cat_description varchar(255) NOT NULL,
|
cat_description varchar(255) NOT NULL,
|
||||||
@ -345,7 +346,7 @@
|
|||||||
)";
|
)";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre24';
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre25';
|
||||||
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||||
update_version_table();
|
update_version_table();
|
||||||
// $phpgw_setup->update_version_table();
|
// $phpgw_setup->update_version_table();
|
||||||
|
@ -1396,6 +1396,18 @@
|
|||||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre24';
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre24';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$test[] = '0.9.10pre24';
|
||||||
|
function upgrade0_9_10pre24()
|
||||||
|
{
|
||||||
|
global $phpgw_info, $phpgw_setup;
|
||||||
|
|
||||||
|
$sql = "alter table phpgw_categories add column cat_access char(7) after cat_owner";
|
||||||
|
|
||||||
|
$phpgw_setup->db->query($sql,__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre25';
|
||||||
|
}
|
||||||
|
|
||||||
reset ($test);
|
reset ($test);
|
||||||
while (list ($key, $value) = each ($test)){
|
while (list ($key, $value) = each ($test)){
|
||||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||||
|
@ -275,6 +275,7 @@
|
|||||||
cat_id serial,
|
cat_id serial,
|
||||||
cat_parent int,
|
cat_parent int,
|
||||||
cat_owner int,
|
cat_owner int,
|
||||||
|
cat_access char(7),
|
||||||
cat_appname varchar(50) NOT NULL,
|
cat_appname varchar(50) NOT NULL,
|
||||||
cat_name varchar(150) NOT NULL,
|
cat_name varchar(150) NOT NULL,
|
||||||
cat_description varchar(255) NOT NULL,
|
cat_description varchar(255) NOT NULL,
|
||||||
@ -313,7 +314,7 @@
|
|||||||
)";
|
)";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre24';
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre25';
|
||||||
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||||
update_version_table();
|
update_version_table();
|
||||||
?>
|
?>
|
||||||
|
@ -1754,8 +1754,39 @@
|
|||||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre24';
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre24';
|
||||||
}
|
}
|
||||||
|
|
||||||
reset ($test);
|
$test[] = '0.9.10pre24';
|
||||||
while (list ($key, $value) = each ($test)){
|
function upgrade0_9_10pre24()
|
||||||
|
{
|
||||||
|
global $phpgw_info, $phpgw_setup;
|
||||||
|
|
||||||
|
$phpgw_setup->db->query("create table temp as select * from phpgw_categories",__LINE__,FILE__);
|
||||||
|
|
||||||
|
$phpgw_setup->db->query("drop sequence phpgw_categories_cat_id_seq",__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$phpgw_setup->db->query("drop table phpgw_categories",__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$sql = "CREATE TABLE phpgw_categories (
|
||||||
|
cat_id serial,
|
||||||
|
cat_parent int,
|
||||||
|
cat_owner int,
|
||||||
|
cat_access char(7),
|
||||||
|
cat_appname varchar(50) NOT NULL,
|
||||||
|
cat_name varchar(150) NOT NULL,
|
||||||
|
cat_description varchar(255) NOT NULL,
|
||||||
|
cat_data text
|
||||||
|
)";
|
||||||
|
|
||||||
|
$phpgw_setup->db->query($sql,__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$phpgw_setup->db->query("insert into phpgw_categories select * from temp",__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$phpgw_setup->db->query("drop table temp",__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre25";
|
||||||
|
}
|
||||||
|
|
||||||
|
reset ($test);
|
||||||
|
while (list ($key, $value) = each ($test)){
|
||||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||||
$ver = "upgrade".ereg_replace("\.","_",$value);
|
$ver = "upgrade".ereg_replace("\.","_",$value);
|
||||||
$ver();
|
$ver();
|
||||||
|
@ -11,5 +11,5 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre24";
|
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre25";
|
||||||
$phpgw_info["server"]["versions"]["current_header"] = "1.11";
|
$phpgw_info["server"]["versions"]["current_header"] = "1.11";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user