forked from extern/egroupware
Downgrade the config table back to the old format. We are going to use a different approch on it.
This commit is contained in:
parent
3abcd4897c
commit
5394d8212d
@ -21,7 +21,7 @@
|
||||
{
|
||||
global $phpgw;
|
||||
|
||||
$phpgw->common->preferences_add($account_id,"maxmatchs","common","15");
|
||||
/* $phpgw->common->preferences_add($account_id,"maxmatchs","common","15");
|
||||
$phpgw->common->preferences_add($account_id,"theme","common","default");
|
||||
$phpgw->common->preferences_add($account_id,"tz_offset","common","0");
|
||||
$phpgw->common->preferences_add($account_id,"dateformat","common","m/d/Y");
|
||||
@ -29,14 +29,14 @@
|
||||
$phpgw->common->preferences_add($account_id,"lang","common","en");
|
||||
$phpgw->common->preferences_add($account_id,"company","addressbook","True");
|
||||
$phpgw->common->preferences_add($account_id,"lastname","addressbook","True");
|
||||
$phpgw->common->preferences_add($account_id,"firstname","addressbook","True");
|
||||
$phpgw->common->preferences_add($account_id,"firstname","addressbook","True"); */
|
||||
|
||||
// Even if they don't have access to the calendar, we will add these.
|
||||
// Its better then the calendar being all messed up, they will be deleted
|
||||
// the next time the update there preferences.
|
||||
$phpgw->common->preferences_add($account_id,"weekstarts","calendar","Monday");
|
||||
/* $phpgw->common->preferences_add($account_id,"weekstarts","calendar","Monday");
|
||||
$phpgw->common->preferences_add($account_id,"workdaystarts","calendar","9");
|
||||
$phpgw->common->preferences_add($account_id,"workdayends","calendar","17");
|
||||
$phpgw->common->preferences_add($account_id,"workdayends","calendar","17"); */
|
||||
}
|
||||
|
||||
|
||||
|
@ -11,12 +11,9 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "home",
|
||||
"noapi" => True);
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "home", "noapi" => True);
|
||||
include("./inc/functions.inc.php");
|
||||
include("../header.inc.php");
|
||||
include($phpgw_info["server"]["include_root"] . "/phpgwapi/phpgw_common.inc.php");
|
||||
$common = new common;
|
||||
|
||||
// Authorize the user to use setup app and load the database
|
||||
// Does not return unless user is authorized
|
||||
@ -36,12 +33,7 @@
|
||||
|
||||
if ($submit) {
|
||||
@$db->query("delete from config");
|
||||
$phpgw_info["server"] = $newsettings;
|
||||
//$config_string = addslashes(serialize($t_array));
|
||||
|
||||
$db->query("insert into config values ('" . addslashes(serialize($newsettings)) . "')",__LINE__,__FILE__);
|
||||
|
||||
/* while ($newsetting = each($newsettings)) {
|
||||
while ($newsetting = each($newsettings)) {
|
||||
if ($newsetting[0] == "nntp_server") {
|
||||
$db->query("select config_value FROM config WHERE config_name='nntp_server'");
|
||||
if ($db->num_rows()) {
|
||||
@ -54,7 +46,7 @@
|
||||
}
|
||||
$db->query("insert into config (config_name, config_value) values ('" . addslashes($newsetting[0])
|
||||
. "','" . addslashes($newsetting[1]) . "')");
|
||||
} */
|
||||
}
|
||||
if ($newsettings["auth_type"] == "ldap") {
|
||||
Header("Location: ldap.php");
|
||||
exit;
|
||||
@ -70,12 +62,9 @@
|
||||
}
|
||||
|
||||
@$db->query("select * from config");
|
||||
@$db->next_record();
|
||||
$current_config = unserialize($db->f(0));
|
||||
// $current_config = $phpgw_info["server"];
|
||||
|
||||
// $current_config[$db->f("config_name")] = $db->f("config_value");
|
||||
// }
|
||||
while (@$db->next_record()) {
|
||||
$current_config[$db->f("config_name")] = $db->f("config_value");
|
||||
}
|
||||
|
||||
if ($current_config["files_dir"] == "/path/to/dir/phpgroupware/files") {
|
||||
$current_config["files_dir"] = $phpgw_info["server"]["server_root"] . "/files";
|
||||
|
@ -13,46 +13,7 @@
|
||||
|
||||
function add_default_server_config(){
|
||||
global $db, $phpgw_info, $currentver;
|
||||
|
||||
$phpgw_info["server"]["default_tplset"] = "default";
|
||||
$phpgw_info["server"]["temp_dir"]="/path/to/tmp";
|
||||
$phpgw_info["server"]["files_dir"]="/path/to/phpgroupware/files";
|
||||
$phpgw_info["server"]["webserver_url"]="/phpgroupware";
|
||||
$phpgw_info["server"]["mail_server"]="localhost";
|
||||
$phpgw_info["server"]["mail_server_type"]="imap";
|
||||
$phpgw_info["server"]["imap_server_type"]="UWash";
|
||||
$phpgw_info["server"]["mail_suffix"]="yourdomain.com";
|
||||
$phpgw_info["server"]["mail_login_type"]="standard";
|
||||
$phpgw_info["server"]["smtp_server"]="localhost";
|
||||
$phpgw_info["server"]["smtp_port"]="25";
|
||||
$phpgw_info["server"]["auth_type"]="sql";
|
||||
$phpgw_info["server"]["account_repository"]="sql";
|
||||
$phpgw_info["server"]["ldap_host"]="localhost";
|
||||
$phpgw_info["server"]["ldap_context"]="ou=People,dc=my-domain,dc=com";
|
||||
$phpgw_info["server"]["ldap_root_dn"]="cn=Manager,dc=my-domain,dc=com";
|
||||
$phpgw_info["server"]["ldap_root_pw"]="secret";
|
||||
$phpgw_info["server"]["ldap_encryption_type"]="DES";
|
||||
$phpgw_info["server"]["usecookies"]="True";
|
||||
$phpgw_info["server"]["encryptkey"]="change this phrase 2 something else";
|
||||
$phpgw_info["server"]["default_ftp_server"]="localhost";
|
||||
$phpgw_info["server"]["httpproxy_server"]="";
|
||||
$phpgw_info["server"]["httpproxy_port"]="";
|
||||
$phpgw_info["server"]["showpoweredbyon"]="top";
|
||||
$phpgw_info["server"]["site_title"]="phpGroupWare";
|
||||
$phpgw_info["server"]["hostname"]="localhost";
|
||||
$phpgw_info["server"]["nntp_server"]="yournewsserver.com";
|
||||
$phpgw_info["server"]["nntp_port"]="119";
|
||||
$phpgw_info["server"]["nntp_sender"]="complaints@yourserver.com";
|
||||
$phpgw_info["server"]["nntp_organization"]="phpGroupWare";
|
||||
$phpgw_info["server"]["nntp_admin"]="admin@yourserver.com";
|
||||
$phpgw_info["server"]["nntp_login_username"]="";
|
||||
$phpgw_info["server"]["nntp_login_password"]="";
|
||||
|
||||
$db->query("insert into config values('" . serialize($phpgw_info["server"]) . "')");
|
||||
|
||||
// I disabled a lot of this for temp. (jengo)
|
||||
|
||||
/* $db->query("insert into config (config_name, config_value) values ('default_tplset', 'default')");
|
||||
$db->query("insert into config (config_name, config_value) values ('default_tplset', 'default')");
|
||||
$db->query("insert into config (config_name, config_value) values ('temp_dir', '/path/to/tmp')");
|
||||
$db->query("insert into config (config_name, config_value) values ('files_dir', '/path/to/dir/phpgroupware/files')");
|
||||
$db->query("insert into config (config_name, config_value) values ('encryptkey', 'change this phrase 2 something else')");
|
||||
@ -135,10 +96,9 @@
|
||||
echo "</table>\n";
|
||||
add_default_server_config();
|
||||
}
|
||||
}else{ */
|
||||
}
|
||||
}else{
|
||||
add_default_server_config();
|
||||
// }
|
||||
}
|
||||
|
||||
include($phpgw_info["server"]["server_root"] . "/setup/sql/default_applications.inc.php");
|
||||
|
||||
|
@ -14,7 +14,9 @@
|
||||
// NOTE: Please use spaces to seperate the field names. It makes copy and pasting easier.
|
||||
|
||||
$sql = "CREATE TABLE config (
|
||||
config_string blob
|
||||
config_name varchar(255) NOT NULL,
|
||||
config_value varchar(100),
|
||||
UNIQUE config_name (config_name)
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
@ -54,9 +56,11 @@
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
$sql = "create table preferences (
|
||||
preference_owner int,
|
||||
preference_value text
|
||||
$sql = "CREATE TABLE preferences (
|
||||
preference_owner varchar(20),
|
||||
preference_name varchar(50),
|
||||
preference_value varchar(50),
|
||||
preference_appname varchar(50)
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
@ -287,7 +291,7 @@
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
$currentver = "0.9.8pre3";
|
||||
$currentver = "0.9.7";
|
||||
$oldversion = $currentver;
|
||||
update_version_table();
|
||||
?>
|
||||
|
@ -732,9 +732,8 @@
|
||||
if ($currentver == "0.9.7") {
|
||||
// upgrade code starts here
|
||||
|
||||
$db->query("drop table config");
|
||||
$db->query("CREATE TABLE config ( config_string blob )");
|
||||
echo "<b>Note: You will need to re-submit your config data.</b>";
|
||||
/* The format completly changed, so I just removed these sections. */
|
||||
|
||||
// upgrade code ends here
|
||||
$currentver = "0.9.8pre2";
|
||||
update_version_table();
|
||||
@ -762,6 +761,20 @@
|
||||
$currentver = "0.9.8pre3";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.8pre3") {
|
||||
// upgrade code starts here
|
||||
|
||||
$sql = "CREATE TABLE config (
|
||||
config_name varchar(255) NOT NULL UNIQUE,
|
||||
config_value varchar(100) NOT NULL
|
||||
)";
|
||||
@$db->query($sql);
|
||||
|
||||
// upgrade code ends here
|
||||
$currentver = "0.9.8pre3";
|
||||
update_version_table();
|
||||
}
|
||||
|
||||
if ($oldversion != $currentver){
|
||||
echo " </tr><td>\n";
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
|
@ -30,11 +30,9 @@
|
||||
$db->query("drop sequence todo_todo_id_seq");
|
||||
$db->query("DROP TABLE todo");
|
||||
$db->query("DROP TABLE calendar_entry");
|
||||
$db->query("DROP TABLE webcal_entry_repeats");
|
||||
$db->query("DROP TABLE calendar_entry_user");
|
||||
$db->query("drop sequence newsgroups_con_seq");
|
||||
$db->query("DROP TABLE newsgroups");
|
||||
/* $db->query("DROP TABLE users_newsgroups");*/
|
||||
$db->query("DROP TABLE lang");
|
||||
$db->query("drop sequence news_msg_con_seq");
|
||||
$db->query("DROP TABLE news_msg");
|
||||
|
@ -14,7 +14,8 @@
|
||||
// NOTE: Please use spaces to seperate the field names. It makes copy and pasting easier.
|
||||
|
||||
$sql = "CREATE TABLE config (
|
||||
config_string text
|
||||
config_name varchar(255) NOT NULL UNIQUE,
|
||||
config_value varchar(100) NOT NULL
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
@ -91,8 +92,10 @@
|
||||
$db->query($sql);
|
||||
|
||||
$sql = "create table preferences (
|
||||
preference_owner int,
|
||||
preference_value text
|
||||
preference_owner varchar(20),
|
||||
preference_name varchar(50),
|
||||
preference_value varchar(50),
|
||||
preference_appname varchar(50)
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
@ -259,7 +262,7 @@
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
$currentver = "0.9.8pre3";
|
||||
$currentver = "0.9.7";
|
||||
$oldversion = $currentver;
|
||||
update_version_table();
|
||||
?>
|
||||
|
@ -745,9 +745,9 @@
|
||||
if ($currentver == "0.9.7" || ereg ("^0\.9\.8pre", $currentver)){
|
||||
if ($currentver == "0.9.7") {
|
||||
// upgrade code starts here
|
||||
$db->query("drop table config");
|
||||
$db->query("CREATE TABLE config ( config_string text )");
|
||||
echo "<b>Note: You will need to re-submit your config data.</b>";
|
||||
|
||||
/* The format completly changed, so I just removed these sections. */
|
||||
|
||||
// upgrade code ends here
|
||||
$currentver = "0.9.8pre2";
|
||||
update_version_table();
|
||||
@ -775,6 +775,20 @@
|
||||
$currentver = "0.9.8pre3";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.8pre3") {
|
||||
// upgrade code starts here
|
||||
|
||||
$sql = "CREATE TABLE config (
|
||||
config_name varchar(255) NOT NULL UNIQUE,
|
||||
config_value varchar(100) NOT NULL
|
||||
)";
|
||||
@$db->query($sql);
|
||||
|
||||
// upgrade code ends here
|
||||
$currentver = "0.9.8pre3";
|
||||
update_version_table();
|
||||
}
|
||||
|
||||
if ($oldversion != $currentver){
|
||||
echo " </tr><td>\n";
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
|
Loading…
Reference in New Issue
Block a user