Update of /cvsroot/mantisbt/mantisbt/admin
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv14767
Modified Files:
upgrade_warning.php
Log Message:
goto install.php earlier if someone goes to /admin area.
Index: upgrade_warning.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/admin/upgrade_warning.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- upgrade_warning.php 15 Aug 2006 07:11:22 -0000 1.4
+++ upgrade_warning.php 10 Feb 2007 12:38:32 -0000 1.5
@@ -9,6 +9,17 @@
# $Id$
# --------------------------------------------------------
?>
+<?php
+ $g_skip_open_db = true; # don't open the database in database_api.php
+ require_once ( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR .
'core.php' );
+ $g_error_send_page_header = false; # suppress page headers in the error
handler
+
+ # @@@ upgrade list moved to the bottom of upgrade_inc.php
+
+ $f_advanced = gpc_get_bool( 'advanced', false );
+
+ $result = @db_connect( config_get_global( 'dsn', false ),
config_get_global( 'hostname' ), config_get_global( 'db_username' ),
config_get_global( 'db_password' ), config_get_global( 'database_name' ) );
+?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
@@ -29,7 +40,7 @@
</table>
<br /><br />
-<p><b>WARNING:</b> - Always backup your database data before upgrading. From
the command line you can do this with the mysqldump command.</p>
+<p><b>WARNING:</b> - Always backup your database data before upgrading. For
example, if you use a mysql database, From the command line you can do this
with the mysqldump command.</p>
<p>eg:</p>
<p><tt>mysqldump -u[username] -p[password] [database_name] >
[filename]</tt></p>
<p>This will dump the contents of the specified database into the specified
filename.</p>
@@ -41,7 +52,17 @@
<div align="center">
<table width="80%" bgcolor="#222222" border="0" cellpadding="10"
cellspacing="1">
<tr bgcolor="#ffffff">
- <td align="center" nowrap="nowrap"><p>When you have
backed up your database click the link below to continue</p>[ <a
href="upgrade_list.php">Upgrade Now</a> ]</td>
+ <?php if ( false == $result ) { ?>
+ <td align="center" nowrap="nowrap"><p>Opening
connection to database [<?php echo config_get_global( 'database_name' ) ?>] on
host [<?php echo config_get_global( 'hostname' ) ?>] with username [<?php echo
config_get_global( 'db_username' ) ?>] failed ( <?php echo db_error_msg() ?>
).</p></td>
+ <?php } else {
+ # check to see if the new installer was used
+ if ( -1 != config_get( 'database_version', -1 ) ) {
+ ?>
+ <td align="center" nowrap="nowrap"><p>When you
have backed up your database click the link below to continue</p>[ <a
href="install.php">Upgrade Now</a> ]</td>
+ <?php } else { ?>
+ <td align="center" nowrap="nowrap"><p>When you
have backed up your database click the link below to continue</p>[ <a
href="upgrade_list.php">Upgrade Now</a> ]</td>
+ <?php } ?>
+ <?php } ?>
</tr>
</table>
</div>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
|