egroupware_official/setup/sql/common_main.inc.php

52 lines
2.9 KiB
PHP
Raw Normal View History

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
$d1 = strtolower(substr($phpgw_info["server"]["server_root"],0,3));
if($d1 == "htt" || $d1 == "ftp" ) {
echo "Failed attempt to break in via an old Security Hole!<br>\n";
exit;
} unset($d1);
2000-11-02 10:01:06 +01:00
function update_version_table($tableschanged = True){
global $phpgw_info, $phpgw_setup;
if ($tableschanged == True){$phpgw_info["setup"]["tableschanged"] = True;}
2001-02-10 05:50:21 +01:00
$phpgw_setup->db->query("update phpgw_applications set app_version='".$phpgw_info["setup"]["currentver"]["phpgwapi"]."' 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 ($phpgw_info["setup"]["currentver"]["phpgwapi"] == "drop"){
2000-12-28 08:50:06 +01:00
include("./sql/".$phpgw_domain[$ConfigDomain]["db_type"]."_droptables.inc.php");
2000-11-02 10:01:06 +01:00
}
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == "new") {
2000-12-28 08:50:06 +01:00
include("./sql/".$phpgw_domain[$ConfigDomain]["db_type"]."_newtables.inc.php");
2000-11-13 02:36:53 +01:00
include("./sql/common_default_records.inc.php");
$included = True;
2001-02-10 05:50:21 +01:00
include(PHPGW_SERVER_ROOT . "/setup/lang.php");
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "oldversion";
2000-12-01 23:26:12 +01:00
}
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == "oldversion") {
$phpgw_info["setup"]["currentver"]["phpgwapi"] = $phpgw_info["setup"]["oldver"]["phpgwapi"];
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == "7122000" || $phpgw_info["setup"]["currentver"]["phpgwapi"] == "8032000" || $phpgw_info["setup"]["currentver"]["phpgwapi"] == "8072000" || $phpgw_info["setup"]["currentver"]["phpgwapi"] == "8212000" || $phpgw_info["setup"]["currentver"]["phpgwapi"] == "9052000" || $phpgw_info["setup"]["currentver"]["phpgwapi"] == "9072000") {
2000-12-28 08:50:06 +01:00
include("./sql/".$phpgw_domain[$ConfigDomain]["db_type"]."_upgrade_prebeta.inc.php");
}
2000-12-28 08:50:06 +01:00
include("./sql/".$phpgw_domain[$ConfigDomain]["db_type"]."_upgrade_beta.inc.php");
2000-11-02 10:01:06 +01:00
}
/* Not yet implemented
if (!$phpgw_info["setup"]["tableschanged"] == True){
2000-11-02 10:01:06 +01:00
echo " <tr bgcolor=\"e6e6e6\">\n";
echo " <td>No table changes were needed. The script only updated your version setting.</td>\n";
echo " </tr>\n";
}
*/
?>