2000-11-02 10:01:06 +01:00
< ? php
/************************************************************************** \
2000-11-05 07:47:24 +01:00
* phpGroupWare - Setup *
2000-11-02 10:01:06 +01:00
* http :// www . phpgroupware . org *
* -------------------------------------------- *
* This program is free software ; you can redistribute it and / or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation ; either version 2 of the License , or ( at your *
* option ) any later version . *
\ **************************************************************************/
2000-11-05 07:47:24 +01:00
/* $Id$ */
2000-11-02 10:01:06 +01:00
function update_version_table ( $tableschanged = True ){
global $currentver , $phpgw_info , $db , $tablechanges ;
if ( $tableschanged == True ){ $tablechanges = True ;}
2000-11-18 02:11:48 +01:00
$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') " );
2000-11-02 10:01:06 +01:00
}
if ( $currentver == " drop " ){
2000-11-21 19:17:27 +01:00
include ( " ./sql/ " . $phpgw_domain [ $SetupDomain ][ " db_type " ] . " _droptables.inc.php " );
2000-11-02 10:01:06 +01:00
$currentver = " new " ;
}
if ( $currentver == " new " ) {
2000-11-21 19:17:27 +01:00
include ( " ./sql/ " . $phpgw_domain [ $SetupDomain ][ " db_type " ] . " _newtables.inc.php " );
2000-11-13 02:36:53 +01:00
include ( " ./sql/common_default_records.inc.php " );
2000-11-15 18:42:30 +01:00
$included = True ;
2000-11-15 18:55:39 +01:00
include ( $phpgw_info [ " server " ][ " server_root " ] . " /setup/lang.php " );
2000-11-02 10:01:06 +01:00
}
echo " <table border= \" 0 \" align= \" center \" > \n " ;
echo " <tr bgcolor= \" 486591 \" > \n " ;
echo " <td colspan= \" 2 \" ><font color= \" fefefe \" > <b>Table Changes</b></font></td> \n " ;
echo " </tr> \n " ;
if ( $currentver == " 7122000 " || $currentver == " 8032000 " || $currentver == " 8072000 " || $currentver == " 8212000 " || $currentver == " 9052000 " || $currentver == " 9072000 " ) {
2000-11-21 19:17:27 +01:00
include ( " ./sql/ " . $phpgw_domain [ $SetupDomain ][ " db_type " ] . " _upgrade_prebeta.inc.php " );
2000-11-02 10:01:06 +01:00
}
2000-11-21 19:17:27 +01:00
include ( " ./sql/ " . $phpgw_domain [ $SetupDomain ][ " db_type " ] . " _upgrade_beta.inc.php " );
2000-11-02 10:01:06 +01:00
if ( ! $tablechanges == True ){
echo " <tr bgcolor= \" e6e6e6 \" > \n " ;
echo " <td>No table changes were needed. The script only updated your version setting.</td> \n " ;
echo " </tr> \n " ;
}
echo " </table> \n " ;
?>