From: <vb...@us...> - 2003-08-22 11:48:37
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs1:/tmp/cvs-serv13840/core Modified Files: html_api.php Log Message: Fix #3306: PHP error if unable to connect to database. M core/html_api.php - Disable calls to code that accesses the database if unable to connect. Index: html_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/html_api.php,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- html_api.php 21 Aug 2003 23:00:58 -0000 1.76 +++ html_api.php 22 Aug 2003 11:48:34 -0000 1.77 @@ -71,6 +71,11 @@ # actual page content function html_page_top2() { html_page_top2a(); + + if ( !db_is_connected() ) { + return; + } + html_login_info(); if( ON == config_get( 'show_project_menu_bar' ) ) { print_project_menu_bar(); @@ -95,6 +100,10 @@ # Print the part of the page that comes below the page content # $p_file should always be the __FILE__ variable. This is passed to show source function html_page_bottom1( $p_file = null ) { + if ( !db_is_connected() ) { + return; + } + if ( config_get( 'show_footer_menu' ) ) { echo '<br />'; print_menu(); |