[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/admin/check/ -> index.php (source)

   1  <?php
   2  # MantisBT - A PHP based bugtracking system
   3  
   4  # MantisBT is free software: you can redistribute it and/or modify
   5  # it under the terms of the GNU General Public License as published by
   6  # the Free Software Foundation, either version 2 of the License, or
   7  # (at your option) any later version.
   8  #
   9  # MantisBT is distributed in the hope that it will be useful,
  10  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  # GNU General Public License for more details.
  13  #
  14  # You should have received a copy of the GNU General Public License
  15  # along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  /**
  18   * @package MantisBT
  19   * @copyright Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
  20   * @copyright Copyright (C) 2002 - 2011  MantisBT Team - mantisbt-dev@lists.sourceforge.net
  21   * @link http://www.mantisbt.org
  22   *
  23   * @uses check_api.php
  24   * @uses gpc_api.php
  25   * @uses html_api.php
  26   */
  27  
  28  # Load the MantisDB core in maintenance mode. This mode will assume that
  29  # config_inc.php hasn't been specified. Thus the database will not be opened
  30  # and plugins will not be loaded.
  31  define( 'MANTIS_MAINTENANCE_MODE', true );
  32  
  33  # Disable output buffering and compression so that test results are returned to
  34  # the user in near real time. This ensures that the user can see the progress
  35  # of the tests, ensuring that the testing process hasn't frozen.
  36  define( 'COMPRESSION_DISABLED', true );
  37  
  38  require_once( dirname( dirname( dirname( __FILE__ ) ) ) . DIRECTORY_SEPARATOR . 'core.php' );
  39  
  40  require_once ( 'check_api.php' );
  41  
  42  require_api( 'gpc_api.php' );
  43  require_api( 'html_api.php' );
  44  require_api( 'http_api.php' );
  45  
  46  # Initialise a special error handler for use with check.php so that errors are
  47  # not treated as being fatal. Instead, integrate error handling inline with the
  48  # test results.
  49  check_init_error_handler();
  50  
  51  # Increase the time limit for this script to 5 minutes execution time as some
  52  # of the tests may take a long time to complete.
  53  set_time_limit( 60 * 5 );
  54  
  55  $g_show_all = gpc_get_bool( 'show_all', false );
  56  $g_show_errors = gpc_get_bool( 'show_errors', false );
  57  
  58  $t_show_all_mode_link = '<a href="index.php?show_all=' . ($g_show_all ? '0' : '1') . '&amp;show_errors=' . ($g_show_errors ? '1' : '0') . '">' . ($g_show_all ? 'Hide passed tests' : 'Show passed tests') . '</a>';
  59  $t_show_errors_mode_link = '<a href="index.php?show_all=' . ($g_show_all ? '1' : '0') . '&amp;show_errors=' . ($g_show_errors ? '0' : '1') . '">' . ($g_show_errors ? 'Hide verbose error messages' : 'Show verbose error messages') . '</a>';
  60  
  61  http_content_headers();
  62  echo '<?xml version="1.0" encoding="utf-8"?>';
  63  ?>
  64  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  65  <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" >
  66  <head>
  67  <meta http-equiv="Content-type" content="application/xhtml+xml; charset=UTF-8" />
  68  <title>MantisBT Administration - Check Installation</title>
  69  <link rel="stylesheet" href="../admin.css" type="text/css" />
  70  </head>
  71  <body>
  72  <div id="mantisbt-header-logo">
  73      <img src="../../images/mantis_logo.gif" alt="MantisBT Logo" />
  74  </div>
  75  <p class="notice">Verbosity: <?php echo $t_show_all_mode_link ?> | <?php echo $t_show_errors_mode_link ?></p>
  76  <table id="check-results">
  77      <thead>
  78          <td colspan="2" class="thead1"><strong>Checking your MantisBT installation...</strong></td>
  79      </thead>
  80  <?php
  81  
  82  define( 'CHECK_PHP_INC_ALLOW', true );
  83  include ( 'check_php_inc.php' );
  84  
  85  if( !$g_failed_test ) {
  86      define( 'CHECK_CONFIG_INC_ALLOW', true );
  87      include ( 'check_config_inc.php' );
  88  }
  89  
  90  if( !$g_failed_test ) {
  91      define( 'CHECK_PATHS_INC_ALLOW', true );
  92      include ( 'check_paths_inc.php' );
  93  }
  94  
  95  if( !$g_failed_test ) {
  96      define( 'CHECK_INTEGRITY_INC_ALLOW', true );
  97      include ( 'check_integrity_inc.php' );
  98  }
  99  
 100  if( !$g_failed_test ) {
 101      define( 'CHECK_DATABASE_INC_ALLOW', true );
 102      include ( 'check_database_inc.php' );
 103  }
 104  
 105  if( !$g_failed_test ) {
 106      define( 'CHECK_CRYPTO_INC_ALLOW', true );
 107      include ( 'check_crypto_inc.php' );
 108  
 109      define( 'CHECK_I18N_INC_ALLOW', true );
 110      include ( 'check_i18n_inc.php' );
 111  
 112      define( 'CHECK_L10N_INC_ALLOW', true );
 113      include ( 'check_L10n_inc.php' );
 114  
 115      define( 'CHECK_EMAIL_INC_ALLOW', true );
 116      include ( 'check_email_inc.php' );
 117  
 118      define( 'CHECK_ANONYMOUS_INC_ALLOW', true );
 119      include ( 'check_anonymous_inc.php' );
 120  
 121      define( 'CHECK_ATTACHMENTS_INC_ALLOW', true );
 122      include ( 'check_attachments_inc.php' );
 123  
 124      define( 'CHECK_DISPLAY_INC_ALLOW', true );
 125      include ( 'check_display_inc.php' );
 126  }
 127  
 128  ?>
 129  </table>
 130  <?php if( $g_failed_test ) { ?>
 131  <p class="notice fail2" id="check-notice-failed">Some tests failed. Please review and correct these failed tests before using MantisBT.</p>
 132  <?php } else if( $g_passed_test_with_warnings ) { ?>
 133  <p class="notice warn2" id="check-notice-warnings">Some warnings were encountered. Please review and consider correcting these warnings before using MantisBT.</p>
 134  <?php } else { ?>
 135  <p class="notice pass2" id="check-notice-passed">All tests passed.</p>
 136  <?php } ?>
 137  </body>
 138  </html>


Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7