setDebugMode() 정적인 공개 메소드

Switch error mode for GLPI
static public setDebugMode ( $mode = NULL, $debug_sql = NULL, $debug_vars = NULL, $log_in_files = NULL )
$mode Integer from Session::*_MODE (default NULL)
$debug_sql Boolean (default NULL)
$debug_vars Boolean (default NULL)
$log_in_files Boolean (default NULL)
     header_html(__('Beginning of the installation'));
     step0();
     break;
 case "Etape_0":
     // choice ok , go check system
     checkConfigFile();
     //TRANS %s is step number
     header_html(sprintf(__('Step %d'), 0));
     $_SESSION["Test_session_GLPI"] = 1;
     step1($_POST["update"]);
     break;
 case "Etape_1":
     // check ok, go import mysql settings.
     checkConfigFile();
     // check system ok, we can use specific parameters for debug
     Toolbox::setDebugMode(Session::DEBUG_MODE, 0, 0, 1);
     header_html(sprintf(__('Step %d'), 1));
     step2($_POST["update"]);
     break;
 case "Etape_2":
     // mysql settings ok, go test mysql settings and select database.
     checkConfigFile();
     header_html(sprintf(__('Step %d'), 2));
     step3($_POST["db_host"], $_POST["db_user"], $_POST["db_pass"], $_POST["update"]);
     break;
 case "Etape_3":
     // Create and fill database
     checkConfigFile();
     header_html(sprintf(__('Step %d'), 3));
     if (empty($_POST["databasename"])) {
         $_POST["databasename"] = "";
예제 #2
0
         $CFG_GLPI["typedoc_icon_dir"] = $CFG_GLPI["root_doc"] . "/pics/icones";
     }
 } else {
     echo "Error accessing config table";
     exit;
 }
 if (isCommandLine() && isset($_SERVER['argv'])) {
     $key = array_search('--debug', $_SERVER['argv']);
     if ($key) {
         $_SESSION['glpi_use_mode'] = Session::DEBUG_MODE;
         unset($_SERVER['argv'][$key]);
         $_SERVER['argv'] = array_values($_SERVER['argv']);
         $_SERVER['argc']--;
     }
 }
 Toolbox::setDebugMode();
 if (isset($_SESSION["glpiroot"]) && $CFG_GLPI["root_doc"] != $_SESSION["glpiroot"]) {
     Html::redirect($_SESSION["glpiroot"]);
 }
 // Override cfg_features by session value
 foreach ($CFG_GLPI['user_pref_field'] as $field) {
     if (!isset($_SESSION["glpi{$field}"]) && isset($CFG_GLPI[$field])) {
         $_SESSION["glpi{$field}"] = $CFG_GLPI[$field];
     }
 }
 // Check maintenance mode
 if (isset($CFG_GLPI["maintenance_mode"]) && $CFG_GLPI["maintenance_mode"]) {
     if (isset($_GET['skipMaintenance']) && $_GET['skipMaintenance']) {
         $_SESSION["glpiskipMaintenance"] = 1;
     }
     if (!isset($_SESSION["glpiskipMaintenance"]) || !$_SESSION["glpiskipMaintenance"]) {