mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-06 05:20:40 +01:00
completely changed the upgrade script formats to be more managable
This commit is contained in:
parent
bd1675ea64
commit
4e1d51fdc1
@ -104,8 +104,9 @@
|
||||
|
||||
$db->query("insert into groups (group_name) values ('Default')");
|
||||
$db->query("insert into accounts (account_lid,account_pwd,account_firstname,account_lastname,account_permissions,account_groups,account_status) values ('demo','81dc9bdb52d04dc20036dbd8313ed055','Demo','Account',':admin:email:todo:addressbook:calendar:',',1:0,','A')");
|
||||
|
||||
$db->query("insert into preferences (preference_owner, preference_value) values ('1','a:5:{s:6:"common";a:1:{s:0:"";s:2:"en";}s:11:"addressbook";a:1:{s:0:"";s:4:"True";}i:8;a:1:{s:0:"";s:13:"workdaystarts";}i:15;a:1:{s:0:"";s:11:"workdayends";}s:6:"Monday";a:1:{s:0:"";s:13:"weekdaystarts";}}');
|
||||
|
||||
$defaultprefs = 'a:5:{s:6:"common";a:1:{s:0:"";s:2:"en";}s:11:"addressbook";a:1:{s:0:"";s:4:"True";}i:8;a:1:{s:0:"";s:13:"workdaystarts";}i:15;a:1:{s:0:"";s:11:"workdayends";}s:6:"Monday";a:1:{s:0:"";s:13:"weekdaystarts";}}';
|
||||
$db->query("insert into preferences (preference_owner, preference_value) values ('1', '$defaultprefs')");
|
||||
|
||||
@$db->query("INSERT INTO languages (lang_id, lang_name, available) values ('aa','Afar','No')");
|
||||
@$db->query("INSERT INTO languages (lang_id, lang_name, available) values ('ab','Abkhazian','No')");
|
||||
|
@ -289,7 +289,7 @@
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
$currentver = "0.9.8pre3";
|
||||
$currentver = "0.9.8pre4";
|
||||
$oldversion = $currentver;
|
||||
update_version_table();
|
||||
?>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,189 +11,163 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
function v7122000to8032000(){
|
||||
global $currentver, $db;
|
||||
if ($currentver == "7122000"){
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
// echo " <td>Upgrade from 7122000 to 8032000 is completed.</td>\n";
|
||||
echo " <td>Upgrading from 7122000 is not yet ready.<br> You can do this manually if you choose, otherwise dump your tables and start over.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "8032000";
|
||||
}
|
||||
$test[] = "7122000";
|
||||
function upgrade7122000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db, $prebeta;
|
||||
echo "Upgrading from 7122000 is not yet ready.<br> You can do this manually if you choose, otherwise dump your tables and start over.<br>\n";
|
||||
$prebeta = True;
|
||||
$currentver = "8032000";
|
||||
}
|
||||
function v8032000to8072000(){
|
||||
global $currentver, $db;
|
||||
if ($currentver == "8032000"){
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
// echo " <td>Upgrade from 8032000 to 8072000 is completed.</td>\n";
|
||||
echo " <td>Upgrading from 8032000 is not yet ready.<br> You can do this manually if you choose, otherwise dump your tables and start over.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "8072000";
|
||||
}
|
||||
|
||||
$test[] = "8032000";
|
||||
function upgrade8032000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db, $prebeta;
|
||||
echo "Upgrading from 8032000 is not yet ready.<br> You can do this manually if you choose, otherwise dump your tables and start over.<br>\n";
|
||||
$prebeta = True;
|
||||
$currentver = "8072000";
|
||||
}
|
||||
|
||||
function v8072000to8212000(){
|
||||
global $currentver, $db;
|
||||
if ($currentver == "8072000"){
|
||||
|
||||
$sql = "CREATE TABLE applications ("
|
||||
."app_name varchar(25) NOT NULL,"
|
||||
."app_title varchar(50),"
|
||||
."app_enabled int,"
|
||||
."UNIQUE app_name (app_name)"
|
||||
.")";
|
||||
$db->query($sql);
|
||||
$test[] = "8072000";
|
||||
function upgrade8072000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db, $prebeta;
|
||||
$sql = "CREATE TABLE applications ("
|
||||
."app_name varchar(25) NOT NULL,"
|
||||
."app_title varchar(50),"
|
||||
."app_enabled int,"
|
||||
."UNIQUE app_name (app_name)"
|
||||
.")";
|
||||
$db->query($sql);
|
||||
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('admin', 'Administration', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('tts', 'Trouble Ticket System', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('inv', 'Inventory', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('chat', 'Chat', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('headlines', 'Headlines', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('filemanager', 'File manager', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('ftp', 'FTP', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('addressbook', 'Address Book', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('todo', 'ToDo List', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('calendar', 'Calendar', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('email', 'Email', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('nntp', 'NNTP', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('bookmarks', 'Bookmarks', 0)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('cron_apps', 'cron_apps', 0)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('napster', 'Napster', 0)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('admin', 'Administration', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('tts', 'Trouble Ticket System', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('inv', 'Inventory', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('chat', 'Chat', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('headlines', 'Headlines', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('filemanager', 'File manager', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('ftp', 'FTP', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('addressbook', 'Address Book', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('todo', 'ToDo List', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('calendar', 'Calendar', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('email', 'Email', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('nntp', 'NNTP', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('bookmarks', 'Bookmarks', 0)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('cron_apps', 'cron_apps', 0)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('napster', 'Napster', 0)");
|
||||
$prebeta = True;
|
||||
$currentver = "8212000";
|
||||
}
|
||||
|
||||
$test[] = "8212000";
|
||||
function upgrade8212000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db, $prebeta;
|
||||
$db->query("alter table chat_channel change name name varchar(10) not null");
|
||||
$db->query("alter table chat_messages change channel channel char(20) not null");
|
||||
$db->query("alter table chat_messages change loginid loginid varchar(20) not null");
|
||||
$db->query("alter table chat_currentin change loginid loginid varchar(25) not null");
|
||||
$db->query("alter table chat_currentin change channel channel char(20)");
|
||||
$db->query("alter table chat_privatechat change user1 user1 varchar(25) not null");
|
||||
$db->query("alter table chat_privatechat change user2 user2 varchar(25) not null");
|
||||
$prebeta = True;
|
||||
$currentver = "9052000";
|
||||
}
|
||||
|
||||
$test[] = "9052000";
|
||||
function upgrade9052000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db, $prebeta;
|
||||
echo "Upgrading from 9052000 is not available.<br> I dont believe there were any changes, so this should be fine.<br>\n";
|
||||
$prebeta = True;
|
||||
$currentver = "9072000";
|
||||
}
|
||||
|
||||
$test[] = "9072000";
|
||||
function upgrade9072000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("alter table accounts change con account_id int(11) DEFAULT '0' NOT NULL auto_increment");
|
||||
$db->query("alter table accounts change loginid account_lid varchar(25) NOT NULL");
|
||||
$db->query("alter table accounts change passwd account_pwd varchar(32) NOT NULL");
|
||||
$db->query("alter table accounts change firstname account_firstname varchar(50)");
|
||||
$db->query("alter table accounts change lastname account_lastname varchar(50)");
|
||||
$db->query("alter table accounts change permissions account_permissions text");
|
||||
$db->query("alter table accounts change groups account_groups varchar(30)");
|
||||
$db->query("alter table accounts change lastlogin account_lastlogin int(11)");
|
||||
$db->query("alter table accounts change lastloginfrom account_lastloginfrom varchar(255)");
|
||||
$db->query("alter table accounts change lastpasswd_change account_lastpwd_change int(11)");
|
||||
$db->query("alter table accounts change status account_status enum('A','L') DEFAULT 'A' NOT NULL");
|
||||
$db->query("alter table applications add app_order int");
|
||||
$db->query("alter table applications add app_tables varchar(255)");
|
||||
$db->query("alter table applications add app_version varchar(20) not null default '0.0'");
|
||||
$db->query("alter table preferences change owner preference_owner varchar(20)");
|
||||
$db->query("alter table preferences change name preference_name varchar(50)");
|
||||
$db->query("alter table preferences change value preference_value varchar(50)");
|
||||
$db->query("alter table preferences add preference_appname varchar(50) default ''");
|
||||
$db->query("alter table sessions change sessionid session_id varchar(255) NOT NULL");
|
||||
$db->query("alter table sessions change loginid session_lid varchar(20)");
|
||||
$db->query("alter table sessions change passwd session_pwd varchar(255)");
|
||||
$db->query("alter table sessions change ip session_ip varchar(255)");
|
||||
$db->query("alter table sessions change logintime session_logintime int(11)");
|
||||
$db->query("alter table sessions change dla session_dla int(11)");
|
||||
|
||||
$db->query("alter table todo change con todo_id int(11)");
|
||||
$db->query("alter table todo change owner todo_owner varchar(25)");
|
||||
$db->query("alter table todo change access todo_access varchar(255)");
|
||||
$db->query("alter table todo change des todo_des text");
|
||||
$db->query("alter table todo change pri todo_pri int(11)");
|
||||
$db->query("alter table todo change status todo_status int(11)");
|
||||
$db->query("alter table todo change datecreated todo_datecreated int(11)");
|
||||
$db->query("alter table todo change datedue todo_datedue int(11)");
|
||||
|
||||
// The addressbook section is missing.
|
||||
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from 8072000 to 8212000 is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "8212000";
|
||||
}
|
||||
}
|
||||
function v8212000to9052000(){
|
||||
global $currentver, $db;
|
||||
if ($currentver == "8212000"){
|
||||
$db->query("alter table chat_channel change name name varchar(10) not null");
|
||||
$db->query("alter table chat_messages change channel channel char(20) not null");
|
||||
$db->query("alter table chat_messages change loginid loginid varchar(20) not null");
|
||||
$db->query("alter table chat_currentin change loginid loginid varchar(25) not null");
|
||||
$db->query("alter table chat_currentin change channel channel char(20)");
|
||||
$db->query("alter table chat_privatechat change user1 user1 varchar(25) not null");
|
||||
$db->query("alter table chat_privatechat change user2 user2 varchar(25) not null");
|
||||
$db->query("update applications set app_order=1,app_tables=NULL where app_name='admin'");
|
||||
$db->query("update applications set app_order=2,app_tables=NULL where app_name='tts'");
|
||||
$db->query("update applications set app_order=3,app_tables=NULL where app_name='inv'");
|
||||
$db->query("update applications set app_order=4,app_tables=NULL where app_name='chat'");
|
||||
$db->query("update applications set app_order=5,app_tables='news_sites,news_headlines,users_headlines' where app_name='headlines'");
|
||||
$db->query("update applications set app_order=6,app_tables=NULL where app_name='filemanager'");
|
||||
$db->query("update applications set app_order=7,app_tables='addressbook' where app_name='addressbook'");
|
||||
$db->query("update applications set app_order=8,app_tables='todo' where app_name='todo'");
|
||||
$db->query("update applications set app_order=9,app_tables='webcal_entry,webcal_entry_users,webcal_entry_groups,webcal_repeats' where app_name='calendar'");
|
||||
$db->query("update applications set app_order=10,app_tables=NULL where app_name='email'");
|
||||
$db->query("update applications set app_order=11,app_tables='newsgroups,users_newsgroups' where app_name='nntp'");
|
||||
$db->query("update applications set app_order=0,app_tables=NULL where app_name='cron_apps'");
|
||||
$sql = "CREATE TABLE config ("
|
||||
."config_name varchar(25) NOT NULL,"
|
||||
."config_value varchar(100),"
|
||||
."UNIQUE config_name (config_name)"
|
||||
.")";
|
||||
$db->query($sql);
|
||||
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from 8212000 to 9052000 is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "9052000";
|
||||
}
|
||||
}
|
||||
function v9052000to9072000(){
|
||||
global $currentver, $db;
|
||||
if ($currentver == "9052000"){
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
// echo " <td>Upgrade from 9052000 to 9072000 is completed.</td>\n";
|
||||
echo " <td>Upgrading from 9052000 is not available.<br> I dont believe there were any changes, so this should be fine.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "9072000";
|
||||
}
|
||||
}
|
||||
function v9072000to0_9_1(){
|
||||
global $currentver, $phpgw_info, $db;
|
||||
if ($currentver == "9072000"){
|
||||
$db->query("alter table accounts change con account_id int(11) DEFAULT '0' NOT NULL auto_increment");
|
||||
$db->query("alter table accounts change loginid account_lid varchar(25) NOT NULL");
|
||||
$db->query("alter table accounts change passwd account_pwd varchar(32) NOT NULL");
|
||||
$db->query("alter table accounts change firstname account_firstname varchar(50)");
|
||||
$db->query("alter table accounts change lastname account_lastname varchar(50)");
|
||||
$db->query("alter table accounts change permissions account_permissions text");
|
||||
$db->query("alter table accounts change groups account_groups varchar(30)");
|
||||
$db->query("alter table accounts change lastlogin account_lastlogin int(11)");
|
||||
$db->query("alter table accounts change lastloginfrom account_lastloginfrom varchar(255)");
|
||||
$db->query("alter table accounts change lastpasswd_change account_lastpwd_change int(11)");
|
||||
$db->query("alter table accounts change status account_status enum('A','L') DEFAULT 'A' NOT NULL");
|
||||
$db->query("alter table applications add app_order int");
|
||||
$db->query("alter table applications add app_tables varchar(255)");
|
||||
$db->query("alter table applications add app_version varchar(20) not null default '0.0'");
|
||||
$db->query("alter table preferences change owner preference_owner varchar(20)");
|
||||
$db->query("alter table preferences change name preference_name varchar(50)");
|
||||
$db->query("alter table preferences change value preference_value varchar(50)");
|
||||
$db->query("alter table preferences add preference_appname varchar(50) default ''");
|
||||
$db->query("alter table sessions change sessionid session_id varchar(255) NOT NULL");
|
||||
$db->query("alter table sessions change loginid session_lid varchar(20)");
|
||||
$db->query("alter table sessions change passwd session_pwd varchar(255)");
|
||||
$db->query("alter table sessions change ip session_ip varchar(255)");
|
||||
$db->query("alter table sessions change logintime session_logintime int(11)");
|
||||
$db->query("alter table sessions change dla session_dla int(11)");
|
||||
|
||||
$db->query("alter table todo change con todo_id int(11)");
|
||||
$db->query("alter table todo change owner todo_owner varchar(25)");
|
||||
$db->query("alter table todo change access todo_access varchar(255)");
|
||||
$db->query("alter table todo change des todo_des text");
|
||||
$db->query("alter table todo change pri todo_pri int(11)");
|
||||
$db->query("alter table todo change status todo_status int(11)");
|
||||
$db->query("alter table todo change datecreated todo_datecreated int(11)");
|
||||
$db->query("alter table todo change datedue todo_datedue int(11)");
|
||||
|
||||
// The addressbook section is missing.
|
||||
|
||||
$db->query("update applications set app_order=1,app_tables=NULL where app_name='admin'");
|
||||
$db->query("update applications set app_order=2,app_tables=NULL where app_name='tts'");
|
||||
$db->query("update applications set app_order=3,app_tables=NULL where app_name='inv'");
|
||||
$db->query("update applications set app_order=4,app_tables=NULL where app_name='chat'");
|
||||
$db->query("update applications set app_order=5,app_tables='news_sites,news_headlines,users_headlines' where app_name='headlines'");
|
||||
$db->query("update applications set app_order=6,app_tables=NULL where app_name='filemanager'");
|
||||
$db->query("update applications set app_order=7,app_tables='addressbook' where app_name='addressbook'");
|
||||
$db->query("update applications set app_order=8,app_tables='todo' where app_name='todo'");
|
||||
$db->query("update applications set app_order=9,app_tables='webcal_entry,webcal_entry_users,webcal_entry_groups,webcal_repeats' where app_name='calendar'");
|
||||
$db->query("update applications set app_order=10,app_tables=NULL where app_name='email'");
|
||||
$db->query("update applications set app_order=11,app_tables='newsgroups,users_newsgroups' where app_name='nntp'");
|
||||
$db->query("update applications set app_order=0,app_tables=NULL where app_name='cron_apps'");
|
||||
$sql = "CREATE TABLE config ("
|
||||
."config_name varchar(25) NOT NULL,"
|
||||
."config_value varchar(100),"
|
||||
."UNIQUE config_name (config_name)"
|
||||
.")";
|
||||
$db->query($sql);
|
||||
|
||||
$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'");
|
||||
$db->query("insert into config (config_name, config_value) values ('site_title', 'phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('hostname', 'local.machine.name')");
|
||||
$db->query("insert into config (config_name, config_value) values ('webserver_url', '/phpgroupware')");
|
||||
$db->query("insert into config (config_name, config_value) values ('auth_type', 'sql')");
|
||||
$db->query("insert into config (config_name, config_value) values ('ldap_host', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('ldap_context', 'o=phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('usecookies', 'True')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_server_type', 'imap')");
|
||||
$db->query("insert into config (config_name, config_value) values ('imap_server_type', 'Cyrus')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_suffix', 'yourdomain.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_login_type', 'standard')");
|
||||
$db->query("insert into config (config_name, config_value) values ('smtp_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('smtp_port', '25')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_server', 'yournewsserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_port', '119')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_sender', 'complaints@yourserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_organization', 'phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_admin', 'admin@yourserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_login_username', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_login_password', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('default_ftp_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('httpproxy_server', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('httpproxy_port', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('showpoweredbyon', 'bottom')");
|
||||
$db->query("insert into config (config_name, config_value) values ('checkfornewversion', 'False')");
|
||||
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from 9072000 to 0.9.1 is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "0.9.1";
|
||||
update_version_table();
|
||||
}
|
||||
$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'");
|
||||
$db->query("insert into config (config_name, config_value) values ('site_title', 'phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('hostname', 'local.machine.name')");
|
||||
$db->query("insert into config (config_name, config_value) values ('webserver_url', '/phpgroupware')");
|
||||
$db->query("insert into config (config_name, config_value) values ('auth_type', 'sql')");
|
||||
$db->query("insert into config (config_name, config_value) values ('ldap_host', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('ldap_context', 'o=phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('usecookies', 'True')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_server_type', 'imap')");
|
||||
$db->query("insert into config (config_name, config_value) values ('imap_server_type', 'Cyrus')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_suffix', 'yourdomain.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_login_type', 'standard')");
|
||||
$db->query("insert into config (config_name, config_value) values ('smtp_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('smtp_port', '25')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_server', 'yournewsserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_port', '119')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_sender', 'complaints@yourserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_organization', 'phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_admin', 'admin@yourserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_login_username', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_login_password', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('default_ftp_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('httpproxy_server', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('httpproxy_port', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('showpoweredbyon', 'bottom')");
|
||||
$db->query("insert into config (config_name, config_value) values ('checkfornewversion', 'False')");
|
||||
$currentver = "0.9.1";
|
||||
}
|
||||
|
||||
v7122000to8032000();
|
||||
v8032000to8072000();
|
||||
v8072000to8212000();
|
||||
v8212000to9052000();
|
||||
v9052000to9072000();
|
||||
v9072000to0_9_1();
|
||||
?>
|
@ -260,7 +260,7 @@
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
$currentver = "0.9.8pre3";
|
||||
$currentver = "0.9.8pre4";
|
||||
$oldversion = $currentver;
|
||||
update_version_table();
|
||||
?>
|
||||
|
@ -11,11 +11,9 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
function v0_9_1to0_9_2(){
|
||||
$test[] = "0.9.1";
|
||||
function upgrade0_9_1(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$didupgrade = True;
|
||||
if ($currentver == "0.9.1"){
|
||||
|
||||
$db->query("alter table access_log change lo lo varchar(255)");
|
||||
$db->query("alter table addressbook change ab_id ab_id int(11) NOT NULL auto_increment");
|
||||
$db->query("alter table addressbook add ab_company_id int(10) unsigned");
|
||||
@ -44,18 +42,13 @@
|
||||
$db->query("update preferences set preference_name='da' where preference_name='dk'");
|
||||
$db->query("update preferences set preference_name='ko' where preference_name='kr'");
|
||||
|
||||
//add weather support
|
||||
//add weather support
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('weather', 'Weather', 1, 12, NULL, '".$phpgw_info["server"]["version"]."')");
|
||||
$db->query("INSERT INTO lang (message_id, app_name, lang, content) VALUES( 'weather','Weather','en','weather')");
|
||||
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from 0.9.1 to 0.9.2 is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "0.9.2";
|
||||
}
|
||||
$currentver = "0.9.2";
|
||||
}
|
||||
|
||||
function update_owner($table,$field){
|
||||
function v0_9_2to0_9_3update_owner($table,$field){
|
||||
global $db;
|
||||
$db->query("select distinct($field) from $table");
|
||||
if ($db->num_rows()) {
|
||||
@ -71,75 +64,88 @@
|
||||
$db->query("alter table $table change $field $field int(11) NOT NULL");
|
||||
}
|
||||
|
||||
function v0_9_2to0_9_3()
|
||||
{
|
||||
$test[] = "0.9.2";
|
||||
function upgrade0_9_2(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
v0_9_2to0_9_3update_owner("addressbook","ab_owner");
|
||||
v0_9_2to0_9_3update_owner("todo","todo_owner");
|
||||
v0_9_2to0_9_3update_owner("webcal_entry","cal_create_by");
|
||||
v0_9_2to0_9_3update_owner("webcal_entry_user","cal_login");
|
||||
$currentver = "0.9.3pre1";
|
||||
}
|
||||
|
||||
// The 0.9.3pre1 is only temp until release
|
||||
if ($currentver == "0.9.2" || ereg ("^0\.9\.3pre", $currentver)){
|
||||
if ($currentver == "0.9.2" || $currentver == "0.9.3pre1") {
|
||||
update_owner("addressbook","ab_owner");
|
||||
update_owner("todo","todo_owner");
|
||||
update_owner("webcal_entry","cal_create_by");
|
||||
update_owner("webcal_entry_user","cal_login");
|
||||
$currentver = "0.9.3pre2";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.3pre2") {
|
||||
$db->query("select owner, newsgroup from users_newsgroups");
|
||||
if ($db->num_rows()) {
|
||||
while($db->next_record()) {
|
||||
$owner[count($owner)] = $db->f("owner");
|
||||
$newsgroup[count($newsgroup)] = $db->f("newsgroup");
|
||||
}
|
||||
for ($i=0;$i<count($owner);$i++) {
|
||||
$db->query("insert into preferences (preference_owner,preference_name,"
|
||||
."preference_value,preference_appname) values ('".$owner[$i]."','".$newsgroup[$i]."','True',"
|
||||
."'nntp')");
|
||||
}
|
||||
$db->query("drop table users_newsgroups");
|
||||
$db->query("update applications set app_tables='newsgroups' where app_name='nntp'");
|
||||
$test[] = "0.9.3pre1";
|
||||
function upgrade0_9_3pre1(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
v0_9_2to0_9_3update_owner("addressbook","ab_owner");
|
||||
v0_9_2to0_9_3update_owner("todo","todo_owner");
|
||||
v0_9_2to0_9_3update_owner("webcal_entry","cal_create_by");
|
||||
v0_9_2to0_9_3update_owner("webcal_entry_user","cal_login");
|
||||
$currentver = "0.9.3pre2";
|
||||
}
|
||||
|
||||
$test[] = "0.9.3pre2";
|
||||
function upgrade0_9_3pre2(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("select owner, newsgroup from users_newsgroups");
|
||||
if($db->num_rows()) {
|
||||
while($db->next_record()) {
|
||||
$owner[count($owner)] = $db->f("owner");
|
||||
$newsgroup[count($newsgroup)] = $db->f("newsgroup");
|
||||
}
|
||||
for($i=0;$i<count($owner);$i++) {
|
||||
$db->query("insert into preferences (preference_owner,preference_name,"
|
||||
."preference_value,preference_appname) values ('".$owner[$i]."','".$newsgroup[$i]."','True',"
|
||||
."'nntp')");
|
||||
}
|
||||
$db->query("drop table users_newsgroups");
|
||||
$db->query("update applications set app_tables='newsgroups' where app_name='nntp'");
|
||||
}
|
||||
$currentver = "0.9.3pre3";
|
||||
update_version_table();
|
||||
}
|
||||
$currentver = "0.9.3pre3";
|
||||
}
|
||||
|
||||
if ($currentver == "0.9.3pre3") {
|
||||
$db->query("alter table todo add todo_id_parent int DEFAULT 0 NOT NULL");
|
||||
$currentver = "0.9.3pre4";
|
||||
update_version_table();
|
||||
}
|
||||
|
||||
if ($currentver == "0.9.3pre4") {
|
||||
$test[] = "0.9.3pre3";
|
||||
function upgrade0_9_3pre3(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("alter table todo add todo_id_parent int(11) DEFAULT '0' NOT NULL");
|
||||
$currentver = "0.9.3pre4";
|
||||
}
|
||||
|
||||
$test[] = "0.9.3pre4";
|
||||
function upgrade0_9_3pre4(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("create table temp as select * from config");
|
||||
$db->query("drop table config");
|
||||
$db->query("create table config config_name varchar(255) NOT NULL UNIQUE, config_value varchar(100) NOT NULL");
|
||||
$db->query("insert into config select * from temp");
|
||||
$db->query("drop table config");
|
||||
$currentver = "0.9.3pre5";
|
||||
update_version_table();
|
||||
}
|
||||
$currentver = "0.9.3pre5";
|
||||
}
|
||||
|
||||
if ($currentver == "0.9.3pre5") {
|
||||
$db->query("CREATE TABLE categories (
|
||||
cat_id serial,
|
||||
account_id int DEFAULT '0' NOT NULL,
|
||||
app_name varchar(25) NOT NULL,
|
||||
cat_name varchar(150) NOT NULL,
|
||||
cat_description text NOT NULL)"
|
||||
);
|
||||
$currentver = "0.9.3pre6";
|
||||
update_version_table();
|
||||
}
|
||||
$test[] = "0.9.3pre5";
|
||||
function upgrade0_9_3pre5(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("CREATE TABLE categories (
|
||||
cat_id serial,
|
||||
account_id int DEFAULT '0' NOT NULL,
|
||||
app_name varchar(25) NOT NULL,
|
||||
cat_name varchar(150) NOT NULL,
|
||||
cat_description text NOT NULL)"
|
||||
);
|
||||
$currentver = "0.9.3pre6";
|
||||
}
|
||||
|
||||
if ($currentver == "0.9.3pre6") {
|
||||
$db->query("alter table addressbook add ab_url varchar(255)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 0, 13, NULL, '".$phpgw_info["server"]["version"]."')");
|
||||
$currentver = "0.9.3pre7";
|
||||
update_version_table();
|
||||
}
|
||||
|
||||
if ($currentver == "0.9.3pre7") {
|
||||
$test[] = "0.9.3pre6";
|
||||
function upgrade0_9_3pre6(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("alter table addressbook add ab_url varchar(255)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('transy', 'Translation Management', 0, 13, NULL, '".$phpgw_info["server"]["version"]."')");
|
||||
$currentver = "0.9.3pre7";
|
||||
}
|
||||
|
||||
$test[] = "0.9.3pre7";
|
||||
function upgrade0_9_3pre7(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("CREATE TABLE languages (
|
||||
lang_id varchar(2) NOT NULL,
|
||||
lang_name varchar(50) NOT NULL,
|
||||
@ -282,38 +288,37 @@
|
||||
@$db->query("INSERT INTO languages (lang_id, lang_name, available) values ('YO','Yoruba','No')");
|
||||
@$db->query("INSERT INTO languages (lang_id, lang_name, available) values ('ZH','Chinese','No')");
|
||||
@$db->query("INSERT INTO languages (lang_id, lang_name, available) values ('ZU','Zulu','No')");
|
||||
|
||||
$currentver = "0.9.3pre8";
|
||||
update_version_table();
|
||||
}
|
||||
|
||||
if ($currentver == "0.9.3pre8") {
|
||||
$currentver = "0.9.3pre9";
|
||||
update_version_table();
|
||||
}
|
||||
|
||||
if ($currentver == "0.9.3pre9") {
|
||||
$currentver = "0.9.3pre10";
|
||||
update_version_table();
|
||||
}
|
||||
|
||||
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from $oldversion to $currentver is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
}
|
||||
$currentver = "0.9.3pre8";
|
||||
}
|
||||
|
||||
function v0_9_3to0_9_4(){
|
||||
|
||||
$test[] = "0.9.3pre8";
|
||||
function upgrade0_9_3pre8(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$currentver = "0.9.3pre9";
|
||||
}
|
||||
|
||||
// The 0.9.3pre1 is only temp until release
|
||||
if ($currentver == "0.9.3" || ereg ("^0\.9\.4pre", $currentver)){
|
||||
if ($currentver == "0.9.3") {
|
||||
$currentver = "0.9.4pre1";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.4pre1") {
|
||||
$test[] = "0.9.3pre9";
|
||||
function upgrade0_9_3pre9(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$currentver = "0.9.3pre10";
|
||||
}
|
||||
|
||||
$test[] = "0.9.3pre10";
|
||||
function upgrade0_9_3pre10(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$currentver = "0.9.3";
|
||||
}
|
||||
|
||||
$test[] = "0.9.3";
|
||||
function upgrade0_9_3(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$currentver = "0.9.4pre1";
|
||||
}
|
||||
|
||||
$test[] = "0.9.4pre1";
|
||||
function upgrade0_9_4pre1(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$sql = "CREATE TABLE notes (
|
||||
note_id serial,
|
||||
note_owner int,
|
||||
@ -322,23 +327,29 @@
|
||||
)";
|
||||
$db->query($sql);
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled, app_order, app_tables, app_version) values ('notes', 'Notes', 1, 13, NULL, '".$phpgw_info["server"]["version"]."')");
|
||||
$currentver = "0.9.4pre2";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.4pre2") {
|
||||
$currentver = "0.9.4pre2";
|
||||
}
|
||||
|
||||
$test[] = "0.9.4pre2";
|
||||
function upgrade0_9_4pre2(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("alter table webcal_entry change cal_create_by cal_owner int NOT NULL");
|
||||
$currentver = "0.9.4pre3";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.4pre3") {
|
||||
$currentver = "0.9.4pre3";
|
||||
}
|
||||
|
||||
$test[] = "0.9.4pre3";
|
||||
function upgrade0_9_4pre3(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$sql = "ALTER TABLE todo ADD todo_startdate int not null";
|
||||
$db->query($sql);
|
||||
$sql = "ALTER TABLE todo CHANGE todo_datedue todo_enddate int not null";
|
||||
$db->query($sql);
|
||||
$currentver = "0.9.4pre4";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.4pre4") {
|
||||
$currentver = "0.9.4pre4";
|
||||
}
|
||||
|
||||
$test[] = "0.9.4pre4";
|
||||
function upgrade0_9_4pre4(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$sql = "DROP TABLE sessions";
|
||||
$db->query($sql);
|
||||
$sql = "create table sessions (
|
||||
@ -351,27 +362,18 @@
|
||||
unique(session_id)
|
||||
)";
|
||||
$db->query($sql);
|
||||
$currentver = "0.9.4pre5";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.4pre5") {
|
||||
$currentver = "0.9.4";
|
||||
update_version_table();
|
||||
}
|
||||
if ($oldversion != $currentver){
|
||||
echo " </tr><td>\n";
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from $oldversion to $currentver is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
}
|
||||
}
|
||||
$currentver = "0.9.4pre5";
|
||||
}
|
||||
function v0_9_4to0_9_5(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
|
||||
// The 0.9.4pre1 is only temp until release
|
||||
if ($currentver == "0.9.4" || ereg ("^0\.9\.5pre", $currentver)){
|
||||
if ($currentver == "0.9.4") {
|
||||
$test[] = "0.9.4pre5";
|
||||
function upgrade0_9_4pre5(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$currentver = "0.9.4";
|
||||
}
|
||||
|
||||
$test[] = "0.9.4";
|
||||
function upgrade0_9_4(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("delete from languages");
|
||||
@$db->query("INSERT INTO languages (lang_id, lang_name, available) values ('aa','Afar','No')");
|
||||
@$db->query("INSERT INTO languages (lang_id, lang_name, available) values ('ab','Abkhazian','No')");
|
||||
@ -509,11 +511,12 @@
|
||||
@$db->query("INSERT INTO languages (lang_id, lang_name, available) values ('yo','Yoruba','No')");
|
||||
@$db->query("INSERT INTO languages (lang_id, lang_name, available) values ('zh','Chinese','No')");
|
||||
@$db->query("INSERT INTO languages (lang_id, lang_name, available) values ('zu','Zulu','No')");
|
||||
$currentver = "0.9.5pre1";
|
||||
}
|
||||
|
||||
$currentver = "0.9.5pre1";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.5pre1") {
|
||||
$test[] = "0.9.5pre1";
|
||||
function upgrade0_9_5pre1(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("DROP TABLE sessions");
|
||||
$sql = "create table phpgw_sessions (
|
||||
session_id varchar(255),
|
||||
@ -553,44 +556,30 @@
|
||||
lo varchar(255)
|
||||
)";
|
||||
$db->query($sql);
|
||||
|
||||
$currentver = "0.9.5pre2";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.5pre2") {
|
||||
$currentver = "0.9.5";
|
||||
update_version_table();
|
||||
}
|
||||
if ($oldversion != $currentver){
|
||||
echo " </tr><td>\n";
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from $oldversion to $currentver is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
}
|
||||
}
|
||||
$currentver = "0.9.5pre2";
|
||||
}
|
||||
|
||||
function v0_9_5to0_9_6()
|
||||
{
|
||||
$test[] = "0.9.5pre2";
|
||||
function upgrade0_9_5pre2(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$currentver = "0.9.5";
|
||||
}
|
||||
|
||||
$test[] = "0.9.5";
|
||||
function upgrade0_9_5(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$currentver = "0.9.6";
|
||||
update_version_table();
|
||||
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from $oldversion to $currentver is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
}
|
||||
|
||||
function v0_9_6to0_9_7(){
|
||||
$test[] = "0.9.6";
|
||||
function upgrade0_9_6(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$currentver = "0.9.7pre1";
|
||||
}
|
||||
|
||||
if ($currentver == "0.9.6" || ereg ("^0\.9\.7pre", $currentver)){
|
||||
if ($currentver == "0.9.6") {
|
||||
$currentver = "0.9.7pre1";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.7pre1") {
|
||||
$test[] = "0.9.7pre1";
|
||||
function upgrade0_9_7pre1(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db2 = $db;
|
||||
$db3 = $db;
|
||||
$sql = "CREATE TABLE calendar_entry (
|
||||
@ -678,11 +667,12 @@
|
||||
$db->query("DROP TABLE webcal_entry_repeats",__LINE__,__FILE__);
|
||||
$db->query("UPDATE applications SET app_tables='calendar_entry,calendar_entry_user,calendar_entry_repeats' WHERE app_name='calendar'",__LINE__,__FILE__);
|
||||
|
||||
$currentver = "0.9.7pre2";
|
||||
update_version_table();
|
||||
}
|
||||
$currentver = "0.9.7pre2";
|
||||
}
|
||||
|
||||
if ($currentver == "0.9.7pre2") {
|
||||
$test[] = "0.9.7pre2";
|
||||
function upgrade0_9_7pre2(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db2 = $db;
|
||||
$sql = "CREATE TABLE TEMP AS SELECT * FROM calendar_entry";
|
||||
$db->query($sql,__LINE__,__FILE__);
|
||||
@ -723,38 +713,24 @@
|
||||
}
|
||||
$sql = "DROP TABLE TEMP";
|
||||
$db->query($sql,__LINE__,__FILE__);
|
||||
$currentver = "0.9.7pre3";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.7pre3") {
|
||||
$currentver = "0.9.7";
|
||||
update_version_table();
|
||||
}
|
||||
if ($oldversion != $currentver){
|
||||
echo " </tr><td>\n";
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from $oldversion to $currentver is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
}
|
||||
}
|
||||
$currentver = "0.9.7pre3";
|
||||
}
|
||||
|
||||
function v0_9_7to0_9_8(){
|
||||
$test[] = "0.9.7pre3";
|
||||
function upgrade0_9_7pre3(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$currentver = "0.9.7";
|
||||
}
|
||||
|
||||
if ($currentver == "0.9.7" || ereg ("^0\.9\.8pre", $currentver)){
|
||||
if ($currentver == "0.9.7") {
|
||||
// upgrade code starts here
|
||||
|
||||
/* The format completly changed, so I just removed these sections. */
|
||||
|
||||
// upgrade code ends here
|
||||
$currentver = "0.9.8pre2";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.8pre2") {
|
||||
// upgrade code starts here
|
||||
$test[] = "0.9.7";
|
||||
function upgrade0_9_7(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$currentver = "0.9.8pre1";
|
||||
}
|
||||
|
||||
$test[] = "0.9.8pre1";
|
||||
function upgrade0_9_8pre1(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("select * from preferences order by preference_owner");
|
||||
while ($db->next_record()) {
|
||||
$t[$db->f("preference_owner")][$db->f("preference_appname")][$db->f("preference_var")] = $db->f("preference_value");
|
||||
@ -770,19 +746,23 @@
|
||||
while ($tt = each($t)) {
|
||||
$db->query("insert into preferences values ('$tt[0]','" . serialize($tt[1]) . "')");
|
||||
}
|
||||
$currentver = "0.9.8pre2";
|
||||
}
|
||||
|
||||
// upgrade code ends here
|
||||
$currentver = "0.9.8pre3";
|
||||
update_version_table();
|
||||
}
|
||||
if ($currentver == "0.9.8pre3") {
|
||||
// upgrade code starts here
|
||||
|
||||
$test[] = "0.9.8pre2";
|
||||
function upgrade0_9_8pre2(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$sql = "CREATE TABLE config (
|
||||
config_name varchar(255) NOT NULL UNIQUE,
|
||||
config_value varchar(100) NOT NULL
|
||||
)";
|
||||
@$db->query($sql);
|
||||
$currentver = "0.9.8pre3";
|
||||
}
|
||||
|
||||
$test[] = "0.9.8pre3";
|
||||
function upgrade0_9_8pre3(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
|
||||
$db->query("DROP TABLE phpgw_sessions",__LINE__,__FILE__);
|
||||
$sql = "create table phpgw_sessions (
|
||||
@ -795,58 +775,24 @@
|
||||
unique(session_id)
|
||||
)";
|
||||
$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";
|
||||
echo " <td>Upgrade from $oldversion to $currentver is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
}
|
||||
}
|
||||
$currentver = "0.9.8pre4";
|
||||
}
|
||||
function v0_9_8to0_9_9(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
|
||||
if ($currentver == "0.9.8" || ereg ("^0\.9\.9pre", $currentver)){
|
||||
/*
|
||||
if ($currentver == "0.9.8") {
|
||||
// upgrade code starts here
|
||||
|
||||
// upgrade code ends here
|
||||
$currentver = "0.9.9pre1";
|
||||
update_version_table();
|
||||
}
|
||||
*/
|
||||
/*
|
||||
if ($currentver == "0.9.9pre1") {
|
||||
// upgrade code starts here
|
||||
|
||||
// upgrade code ends here
|
||||
$currentver = "0.9.9pre2";
|
||||
update_version_table();
|
||||
}
|
||||
*/
|
||||
if ($oldversion != $currentver){
|
||||
echo " </tr><td>\n";
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from $oldversion to $currentver is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
reset ($test);
|
||||
while (list ($key, $value) = each ($test)){
|
||||
if ($currentver == $value) {
|
||||
$ver = "upgrade".ereg_replace("\.","_",$value);
|
||||
$ver();
|
||||
echo "<table>";
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from $value to $currentver is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>";
|
||||
if ($tableschanged == True){$tablechanges = True;}
|
||||
if (!$prebeta){
|
||||
$db->query("update applications set app_version='".$currentver."' where (app_name='admin' or app_name='filemanager' or app_name='addressbook' or app_name='todo' or app_name='calendar' or app_name='email' or app_name='nntp' or app_name='cron_apps' or app_name='notes')");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
v0_9_1to0_9_2();
|
||||
v0_9_2to0_9_3();
|
||||
v0_9_3to0_9_4();
|
||||
v0_9_4to0_9_5();
|
||||
v0_9_5to0_9_6();
|
||||
v0_9_6to0_9_7();
|
||||
v0_9_7to0_9_8();
|
||||
v0_9_8to0_9_9();
|
||||
//v0_9_9to0_9_10();
|
||||
?>
|
||||
?>
|
@ -11,185 +11,152 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
function v7122000to8032000(){
|
||||
global $currentver, $db;
|
||||
$didupgrade = True;
|
||||
if ($currentver == "7122000"){
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
// echo " <td>Upgrade from 7122000 to 8032000 is completed.</td>\n";
|
||||
echo " <td>Upgrading from 7122000 is not yet ready.<br> You can do this manually if you choose, otherwise dump your tables and start over.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "8032000";
|
||||
}
|
||||
}
|
||||
function v8032000to8072000(){
|
||||
global $currentver, $db;
|
||||
$didupgrade = True;
|
||||
if ($currentver == "8032000"){
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
// echo " <td>Upgrade from 8032000 to 8072000 is completed.</td>\n";
|
||||
echo " <td>Upgrading from 8032000 is not yet ready.<br> You can do this manually if you choose, otherwise dump your tables and start over.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "8072000";
|
||||
}
|
||||
}
|
||||
|
||||
function v8072000to8212000(){
|
||||
global $currentver, $db;
|
||||
$didupgrade = True;
|
||||
if ($currentver == "8072000"){
|
||||
|
||||
$sql = "CREATE TABLE applications ("
|
||||
."app_name varchar(25) NOT NULL,"
|
||||
."app_title varchar(50),"
|
||||
."app_enabled int,"
|
||||
."UNIQUE app_name (app_name)"
|
||||
.")";
|
||||
$db->query($sql);
|
||||
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('admin', 'Administration', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('tts', 'Trouble Ticket System', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('inv', 'Inventory', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('chat', 'Chat', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('headlines', 'Headlines', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('filemanager', 'File manager', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('ftp', 'FTP', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('addressbook', 'Address Book', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('todo', 'ToDo List', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('calendar', 'Calendar', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('email', 'Email', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('nntp', 'NNTP', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('bookmarks', 'Bookmarks', 0)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('cron_apps', 'cron_apps', 0)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('napster', 'Napster', 0)");
|
||||
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from 8072000 to 8212000 is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "8212000";
|
||||
}
|
||||
}
|
||||
function v8212000to9052000(){
|
||||
global $currentver, $db;
|
||||
$didupgrade = True;
|
||||
if ($currentver == "8212000"){
|
||||
$db->query("alter table chat_channel change name name varchar(10) not null");
|
||||
$db->query("alter table chat_messages change channel channel char(20) not null");
|
||||
$db->query("alter table chat_messages change loginid loginid varchar(20) not null");
|
||||
$db->query("alter table chat_currentin change loginid loginid varchar(25) not null");
|
||||
$db->query("alter table chat_currentin change channel channel char(20)");
|
||||
$db->query("alter table chat_privatechat change user1 user1 varchar(25) not null");
|
||||
$db->query("alter table chat_privatechat change user2 user2 varchar(25) not null");
|
||||
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from 8212000 to 9052000 is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "9052000";
|
||||
}
|
||||
}
|
||||
function v9052000to9072000(){
|
||||
global $currentver, $db;
|
||||
$didupgrade = True;
|
||||
if ($currentver == "9052000"){
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
// echo " <td>Upgrade from 9052000 to 9072000 is completed.</td>\n";
|
||||
echo " <td>Upgrading from 9052000 is not available.<br> I dont believe there were any changes, so this should be fine.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "9072000";
|
||||
}
|
||||
}
|
||||
function v9072000to0_9_1(){
|
||||
global $currentver, $phpgw_info, $db;
|
||||
$didupgrade = True;
|
||||
if ($currentver == "9072000"){
|
||||
|
||||
$db->query("alter table accounts change con account_id int(11) DEFAULT '0' NOT NULL auto_increment");
|
||||
$db->query("alter table accounts change loginid account_lid varchar(25) NOT NULL");
|
||||
$db->query("alter table accounts change passwd account_pwd varchar(32) NOT NULL");
|
||||
$db->query("alter table accounts change firstname account_firstname varchar(50)");
|
||||
$db->query("alter table accounts change lastname account_lastname varchar(50)");
|
||||
$db->query("alter table accounts change permissions account_permissions text");
|
||||
$db->query("alter table accounts change groups account_groups varchar(30)");
|
||||
$db->query("alter table accounts change lastlogin account_lastlogin int(11)");
|
||||
$db->query("alter table accounts change lastloginfrom account_lastloginfrom varchar(255)");
|
||||
$db->query("alter table accounts change lastpasswd_change account_lastpwd_change int(11)");
|
||||
$db->query("alter table accounts change status account_status enum('A','L') DEFAULT 'A' NOT NULL");
|
||||
$db->query("alter table applications add app_order int");
|
||||
$db->query("alter table applications add app_tables varchar(255)");
|
||||
$db->query("alter table applications add app_version varchar(20) not null default '0.0'");
|
||||
$db->query("alter table preferences change owner preference_owner varchar(20)");
|
||||
$db->query("alter table preferences change name preference_name varchar(50)");
|
||||
$db->query("alter table preferences change value preference_value varchar(50)");
|
||||
$db->query("alter table preferences add preference_appname varchar(50) default ''");
|
||||
$db->query("alter table sessions change sessionid session_id varchar(255) NOT NULL");
|
||||
$db->query("alter table sessions change loginid session_lid varchar(20)");
|
||||
$db->query("alter table sessions change passwd session_pwd varchar(255)");
|
||||
$db->query("alter table sessions change ip session_ip varchar(255)");
|
||||
$db->query("alter table sessions change logintime session_logintime int(11)");
|
||||
$db->query("alter table sessions change dla session_dla int(11)");
|
||||
|
||||
$db->query("update applications set app_order=1,app_tables=NULL where app_name='admin'");
|
||||
$db->query("update applications set app_order=2,app_tables=NULL where app_name='tts'");
|
||||
$db->query("update applications set app_order=3,app_tables=NULL where app_name='inv'");
|
||||
$db->query("update applications set app_order=4,app_tables=NULL where app_name='chat'");
|
||||
$db->query("update applications set app_order=5,app_tables='news_sites,news_headlines,users_headlines' where app_name='headlines'");
|
||||
$db->query("update applications set app_order=6,app_tables=NULL where app_name='filemanager'");
|
||||
$db->query("update applications set app_order=7,app_tables='addressbook' where app_name='addressbook'");
|
||||
$db->query("update applications set app_order=8,app_tables='todo' where app_name='todo'");
|
||||
$db->query("update applications set app_order=9,app_tables='webcal_entry,webcal_entry_users,webcal_entry_groups,webcal_repeats' where app_name='calendar'");
|
||||
$db->query("update applications set app_order=10,app_tables=NULL where app_name='email'");
|
||||
$db->query("update applications set app_order=11,app_tables='newsgroups,users_newsgroups' where app_name='nntp'");
|
||||
$db->query("update applications set app_order=0,app_tables=NULL where app_name='cron_apps'");
|
||||
$sql = "CREATE TABLE config ("
|
||||
."config_name varchar(25) NOT NULL,"
|
||||
."config_value varchar(100),"
|
||||
."UNIQUE config_name (config_name)"
|
||||
.")";
|
||||
$db->query($sql);
|
||||
|
||||
$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'");
|
||||
$db->query("insert into config (config_name, config_value) values ('site_title', 'phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('hostname', 'local.machine.name')");
|
||||
$db->query("insert into config (config_name, config_value) values ('webserver_url', '/phpgroupware')");
|
||||
$db->query("insert into config (config_name, config_value) values ('auth_type', 'sql')");
|
||||
$db->query("insert into config (config_name, config_value) values ('ldap_host', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('ldap_context', 'o=phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('usecookies', 'True')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_server_type', 'imap')");
|
||||
$db->query("insert into config (config_name, config_value) values ('imap_server_type', 'Cyrus')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_suffix', 'yourdomain.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_login_type', 'standard')");
|
||||
$db->query("insert into config (config_name, config_value) values ('smtp_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('smtp_port', '25')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_server', 'yournewsserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_port', '119')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_sender', 'complaints@yourserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_organization', 'phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_admin', 'admin@yourserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_login_username', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_login_password', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('default_ftp_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('httpproxy_server', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('httpproxy_port', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('showpoweredbyon', 'bottom')");
|
||||
$db->query("insert into config (config_name, config_value) values ('checkfornewversion', 'False')");
|
||||
|
||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||
echo " <td>Upgrade from 9072000 to 0.9.1 is completed.</td>\n";
|
||||
echo " </tr>\n";
|
||||
$currentver = "0.9.1";
|
||||
}
|
||||
$test[] = "7122000";
|
||||
function upgrade7122000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db, $prebeta;
|
||||
echo "Upgrading from 7122000 is not yet ready.<br> You can do this manually if you choose, otherwise dump your tables and start over.<br>\n";
|
||||
$prebeta = True;
|
||||
$currentver = "8032000";
|
||||
}
|
||||
|
||||
v7122000to8032000();
|
||||
v8032000to8072000();
|
||||
v8072000to8212000();
|
||||
v8212000to9052000();
|
||||
v9052000to9072000();
|
||||
v9072000to0_9_1();
|
||||
$test[] = "8032000";
|
||||
function upgrade8032000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db, $prebeta;
|
||||
echo "Upgrading from 8032000 is not yet ready.<br> You can do this manually if you choose, otherwise dump your tables and start over.<br>\n";
|
||||
$prebeta = True;
|
||||
$currentver = "8072000";
|
||||
}
|
||||
|
||||
$test[] = "8072000";
|
||||
function upgrade8072000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db, $prebeta;
|
||||
$sql = "CREATE TABLE applications ("
|
||||
."app_name varchar(25) NOT NULL,"
|
||||
."app_title varchar(50),"
|
||||
."app_enabled int,"
|
||||
."UNIQUE app_name (app_name)"
|
||||
.")";
|
||||
$db->query($sql);
|
||||
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('admin', 'Administration', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('tts', 'Trouble Ticket System', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('inv', 'Inventory', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('chat', 'Chat', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('headlines', 'Headlines', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('filemanager', 'File manager', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('ftp', 'FTP', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('addressbook', 'Address Book', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('todo', 'ToDo List', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('calendar', 'Calendar', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('email', 'Email', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('nntp', 'NNTP', 1)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('bookmarks', 'Bookmarks', 0)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('cron_apps', 'cron_apps', 0)");
|
||||
$db->query("insert into applications (app_name, app_title, app_enabled) values ('napster', 'Napster', 0)");
|
||||
$prebeta = True;
|
||||
$currentver = "8212000";
|
||||
}
|
||||
|
||||
$test[] = "8212000";
|
||||
function upgrade8212000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db, $prebeta;
|
||||
$db->query("alter table chat_channel change name name varchar(10) not null");
|
||||
$db->query("alter table chat_messages change channel channel char(20) not null");
|
||||
$db->query("alter table chat_messages change loginid loginid varchar(20) not null");
|
||||
$db->query("alter table chat_currentin change loginid loginid varchar(25) not null");
|
||||
$db->query("alter table chat_currentin change channel channel char(20)");
|
||||
$db->query("alter table chat_privatechat change user1 user1 varchar(25) not null");
|
||||
$db->query("alter table chat_privatechat change user2 user2 varchar(25) not null");
|
||||
$prebeta = True;
|
||||
$currentver = "9052000";
|
||||
}
|
||||
|
||||
$test[] = "9052000";
|
||||
function upgrade9052000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db, $prebeta;
|
||||
echo "Upgrading from 9052000 is not available.<br> I dont believe there were any changes, so this should be fine.<br>\n";
|
||||
$prebeta = True;
|
||||
$currentver = "9072000";
|
||||
}
|
||||
|
||||
$test[] = "9072000";
|
||||
function upgrade9072000(){
|
||||
global $currentver, $oldversion, $phpgw_info, $db;
|
||||
$db->query("alter table accounts change con account_id int(11) DEFAULT '0' NOT NULL auto_increment");
|
||||
$db->query("alter table accounts change loginid account_lid varchar(25) NOT NULL");
|
||||
$db->query("alter table accounts change passwd account_pwd varchar(32) NOT NULL");
|
||||
$db->query("alter table accounts change firstname account_firstname varchar(50)");
|
||||
$db->query("alter table accounts change lastname account_lastname varchar(50)");
|
||||
$db->query("alter table accounts change permissions account_permissions text");
|
||||
$db->query("alter table accounts change groups account_groups varchar(30)");
|
||||
$db->query("alter table accounts change lastlogin account_lastlogin int(11)");
|
||||
$db->query("alter table accounts change lastloginfrom account_lastloginfrom varchar(255)");
|
||||
$db->query("alter table accounts change lastpasswd_change account_lastpwd_change int(11)");
|
||||
$db->query("alter table accounts change status account_status enum('A','L') DEFAULT 'A' NOT NULL");
|
||||
$db->query("alter table applications add app_order int");
|
||||
$db->query("alter table applications add app_tables varchar(255)");
|
||||
$db->query("alter table applications add app_version varchar(20) not null default '0.0'");
|
||||
$db->query("alter table preferences change owner preference_owner varchar(20)");
|
||||
$db->query("alter table preferences change name preference_name varchar(50)");
|
||||
$db->query("alter table preferences change value preference_value varchar(50)");
|
||||
$db->query("alter table preferences add preference_appname varchar(50) default ''");
|
||||
$db->query("alter table sessions change sessionid session_id varchar(255) NOT NULL");
|
||||
$db->query("alter table sessions change loginid session_lid varchar(20)");
|
||||
$db->query("alter table sessions change passwd session_pwd varchar(255)");
|
||||
$db->query("alter table sessions change ip session_ip varchar(255)");
|
||||
$db->query("alter table sessions change logintime session_logintime int(11)");
|
||||
$db->query("alter table sessions change dla session_dla int(11)");
|
||||
|
||||
$db->query("update applications set app_order=1,app_tables=NULL where app_name='admin'");
|
||||
$db->query("update applications set app_order=2,app_tables=NULL where app_name='tts'");
|
||||
$db->query("update applications set app_order=3,app_tables=NULL where app_name='inv'");
|
||||
$db->query("update applications set app_order=4,app_tables=NULL where app_name='chat'");
|
||||
$db->query("update applications set app_order=5,app_tables='news_sites,news_headlines,users_headlines' where app_name='headlines'");
|
||||
$db->query("update applications set app_order=6,app_tables=NULL where app_name='filemanager'");
|
||||
$db->query("update applications set app_order=7,app_tables='addressbook' where app_name='addressbook'");
|
||||
$db->query("update applications set app_order=8,app_tables='todo' where app_name='todo'");
|
||||
$db->query("update applications set app_order=9,app_tables='webcal_entry,webcal_entry_users,webcal_entry_groups,webcal_repeats' where app_name='calendar'");
|
||||
$db->query("update applications set app_order=10,app_tables=NULL where app_name='email'");
|
||||
$db->query("update applications set app_order=11,app_tables='newsgroups,users_newsgroups' where app_name='nntp'");
|
||||
$db->query("update applications set app_order=0,app_tables=NULL where app_name='cron_apps'");
|
||||
$sql = "CREATE TABLE config ("
|
||||
."config_name varchar(25) NOT NULL,"
|
||||
."config_value varchar(100),"
|
||||
."UNIQUE config_name (config_name)"
|
||||
.")";
|
||||
$db->query($sql);
|
||||
|
||||
$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'");
|
||||
$db->query("insert into config (config_name, config_value) values ('site_title', 'phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('hostname', 'local.machine.name')");
|
||||
$db->query("insert into config (config_name, config_value) values ('webserver_url', '/phpgroupware')");
|
||||
$db->query("insert into config (config_name, config_value) values ('auth_type', 'sql')");
|
||||
$db->query("insert into config (config_name, config_value) values ('ldap_host', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('ldap_context', 'o=phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('usecookies', 'True')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_server_type', 'imap')");
|
||||
$db->query("insert into config (config_name, config_value) values ('imap_server_type', 'Cyrus')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_suffix', 'yourdomain.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('mail_login_type', 'standard')");
|
||||
$db->query("insert into config (config_name, config_value) values ('smtp_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('smtp_port', '25')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_server', 'yournewsserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_port', '119')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_sender', 'complaints@yourserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_organization', 'phpGroupWare')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_admin', 'admin@yourserver.com')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_login_username', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('nntp_login_password', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('default_ftp_server', 'localhost')");
|
||||
$db->query("insert into config (config_name, config_value) values ('httpproxy_server', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('httpproxy_port', '')");
|
||||
$db->query("insert into config (config_name, config_value) values ('showpoweredbyon', 'bottom')");
|
||||
$db->query("insert into config (config_name, config_value) values ('checkfornewversion', 'False')");
|
||||
$currentver = "0.9.1";
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user