Exemplo n.º 1
0
 function ShowStepNoError()
 {
     $wizard = $this->GetWizard();
     $wizard->SetVar('status', '');
     $obCheck = new CClusterDBNodeCheck();
     $IsReplicationRunning = $obCheck->SlaveNodeIsReplicationRunning($wizard->GetVar("db_host"), $GLOBALS["DB"]->DBName, $wizard->GetVar("db_login"), $wizard->GetVar("db_password"), $wizard->GetVar("master_host", true), $wizard->GetVar("master_port", true));
     if (is_object($IsReplicationRunning)) {
         $this->content .= '<p>' . GetMessage("CLUWIZ_STEP4_SLAVE_IS_RUNNING") . '</p>';
         $arCheckList = array_merge($obCheck->SlaveNodeCommon($IsReplicationRunning), $obCheck->SlaveNodeForReplication($IsReplicationRunning));
         $this->ShowCheckList($arCheckList);
         $bNextStep = $this->CheckListHasNoError($arCheckList);
         if ($bNextStep) {
             $wizard->SetVar('status', 'online');
         }
     } elseif ($IsReplicationRunning === false) {
         $DB = $obCheck->SlaveNodeConnection($wizard->GetVar("db_host"), $GLOBALS["DB"]->DBName, $wizard->GetVar("db_login"), $wizard->GetVar("db_password"), $wizard->GetVar("master_host", true), $wizard->GetVar("master_port", true));
         if (is_object($DB)) {
             $arCheckList = array_merge($obCheck->SlaveNodeCommon($DB), $obCheck->SlaveNodeForReplication($DB), $obCheck->SlaveNodeForMaster($DB));
             $this->ShowCheckList($arCheckList);
             $bNextStep = $this->CheckListHasNoError($arCheckList);
         } else {
             $this->content .= '<p class="cluwiz_err">' . $DB . '</p><p>' . GetMessage("CLUWIZ_STEP4_CONN_ERROR") . '</p>';
             $bNextStep = false;
         }
     } else {
         $this->content .= '<p class="cluwiz_err">' . $IsReplicationRunning . '</p><p>' . GetMessage("CLUWIZ_STEP4_CONN_ERROR") . '</p>';
         $bNextStep = false;
     }
     if ($bNextStep) {
         $this->SetNextStep("final");
     } else {
         $this->SetNextStep("step4");
     }
 }