mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Added the new config class
This commit is contained in:
parent
f26a92cea4
commit
ebee550db7
@ -34,7 +34,7 @@
|
||||
if ($submit) {
|
||||
@$phpgw_setup->db->query("delete from phpgw_config");
|
||||
// This is only temp.
|
||||
$phpgw_setup->db->query("insert into phpgw_config (config_name, config_value) values ('useframes','never')");
|
||||
$phpgw_setup->db->query("insert into phpgw_config (config_app,config_name, config_value) values ('phpgwapi','useframes','never')");
|
||||
while ($newsetting = each($newsettings)) {
|
||||
if ($newsetting[0] == "nntp_server") {
|
||||
$phpgw_setup->db->query("select config_value FROM phpgw_config WHERE config_name='nntp_server'");
|
||||
@ -46,7 +46,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
$phpgw_setup->db->query("insert into phpgw_config (config_name, config_value) values ('" . addslashes($newsetting[0])
|
||||
$phpgw_setup->db->query("insert into phpgw_config (config_app,config_name, config_value) values ('phpgwapi','" . addslashes($newsetting[0])
|
||||
. "','" . addslashes($newsetting[1]) . "')");
|
||||
}
|
||||
if ($newsettings["auth_type"] == "ldap") {
|
||||
|
@ -49,6 +49,9 @@
|
||||
$phpgw_setup->db->query("insert into phpgw_config (config_name, config_value) values ('htmlcompliant', 'False')");
|
||||
$phpgw_setup->db->query("insert into phpgw_config (config_name, config_value) values ('checkfornewversion', 'False')");
|
||||
$phpgw_setup->db->query("insert into phpgw_config (config_name, config_value) values ('freshinstall', 'True')");
|
||||
|
||||
// I didn't want to change all of these becuase of setup2 (jengo)
|
||||
$phpgw_setup->db->query("update phpgw_config set config_app='phpgwapi'",__LINE__,__FILE__);
|
||||
}
|
||||
|
||||
if ($useglobalconfigsettings == "on"){
|
||||
@ -85,6 +88,10 @@
|
||||
$phpgw_setup->db->query("insert into phpgw_config (config_name, config_value) values ('httpproxy_port', '".$phpgw_info["server"]["httpproxy_port"]."')");
|
||||
$phpgw_setup->db->query("insert into phpgw_config (config_name, config_value) values ('showpoweredbyon', '".$phpgw_info["server"]["showpoweredbyon"]."')");
|
||||
$phpgw_setup->db->query("insert into phpgw_config (config_name, config_value) values ('checkfornewversion', '".$phpgw_info["server"]["checkfornewversion"]."')");
|
||||
|
||||
// I didn't want to change all of these becuase of setup2 (jengo)
|
||||
$phpgw_setup->db->query("update phpgw_config set config_app='phpgwapi'",__LINE__,__FILE__);
|
||||
|
||||
}else{
|
||||
echo "<table border=\"0\" align=\"center\">\n";
|
||||
echo " <tr bgcolor=\"486591\">\n";
|
||||
|
@ -14,6 +14,7 @@
|
||||
// NOTE: Please use spaces to seperate the field names. It makes copy and pasting easier.
|
||||
|
||||
$sql = "CREATE TABLE phpgw_config (
|
||||
config_app varchar(50),
|
||||
config_name varchar(255) NOT NULL,
|
||||
config_value varchar(100),
|
||||
UNIQUE config_name (config_name)
|
||||
@ -360,7 +361,7 @@
|
||||
)";
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.003';
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.005';
|
||||
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||
update_version_table();
|
||||
// $phpgw_setup->update_version_table();
|
||||
|
@ -1589,7 +1589,17 @@
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.004';
|
||||
}
|
||||
|
||||
|
||||
$test[] = '0.9.11.004';
|
||||
function upgrade0_9_11_004()
|
||||
{
|
||||
global $phpgw_info,$phpgw_setup;
|
||||
|
||||
$phpgw_setup->db->query("alter table phpgw_config add column config_app varchar(50) first",__LINE__,__FILE__);
|
||||
$phpgw_setup->db->query("update phpgw_config set config_app='phpgwapi'",__LINE__,__FILE__);
|
||||
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.005';
|
||||
}
|
||||
|
||||
reset ($test);
|
||||
while (list ($key, $value) = each ($test)){
|
||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||
|
@ -14,6 +14,7 @@
|
||||
// NOTE: Please use spaces to seperate the field names. It makes copy and pasting easier.
|
||||
|
||||
$sql = "CREATE TABLE phpgw_config (
|
||||
config_app varchar(50),
|
||||
config_name varchar(255) NOT NULL UNIQUE,
|
||||
config_value varchar(100) NOT NULL
|
||||
)";
|
||||
@ -328,7 +329,7 @@
|
||||
)";
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.003';
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.005';
|
||||
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||
update_version_table();
|
||||
?>
|
||||
|
@ -2034,6 +2034,29 @@
|
||||
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.11.004";
|
||||
}
|
||||
|
||||
$test[] = '0.9.11.004';
|
||||
function upgrade0_9_11_004()
|
||||
{
|
||||
global $phpgw_info, $phpgw_setup;
|
||||
|
||||
$phpgw_setup->db->query("create table phpgw_config_temp as select * from phpgw_config",__LINE__,__FILE__);
|
||||
$phpgw_setup->db->query("drop table phpgw_config",__LINE__,__FILE__);
|
||||
|
||||
$sql = "CREATE TABLE phpgw_config (
|
||||
config_app varchar(50),
|
||||
config_name varchar(255) NOT NULL UNIQUE,
|
||||
config_value varchar(100) NOT NULL
|
||||
)";
|
||||
$phpgw_setup->db->query($sql,__LINE,__FILE__);
|
||||
|
||||
$phpgw_setup->db->query("insert into phpgw_config select * from phpgw_config_temp",__LINE__,__FILE__);
|
||||
$phpgw_setup->db->query("drop table phpgw_config_temp",__LINE__,__FILE__);
|
||||
$phpgw_setup->db->query("update phpgw_config set config_app='phpgwapi'",__LINE__,__FILE__);
|
||||
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.005';
|
||||
}
|
||||
|
||||
|
||||
reset ($test);
|
||||
while (list ($key, $value) = each ($test)){
|
||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||
|
@ -11,5 +11,5 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info['server']['versions']['phpgwapi'] = '0.9.11.004';
|
||||
$phpgw_info['server']['versions']['phpgwapi'] = '0.9.11.005';
|
||||
$phpgw_info['server']['versions']['current_header'] = '1.11';
|
||||
|
Loading…
Reference in New Issue
Block a user