logo       

mantisbt/admin upgrade_warning.php,1.4,1.5: msg#00002

Subject: mantisbt/admin upgrade_warning.php,1.4,1.5
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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe