$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')");
}
functionv7122000to8032000(){
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";
}
}
functionv8032000to8072000(){
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";
}
}
functionv8072000to8212000(){
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);
$db->query("insert into applications (app_name, app_title, app_enabled) values ('admin', 'Administration', 1)");
$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();
}
}
functionv0_9_1to0_9_2(){
global$currentver,$phpgw_info,$db;
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");