コード例 #1
0
    function init()
    {
        if ( !isset( $this->PersistenceList['run_finetune'] ) )
            $this->PersistenceList['run_finetune'] = false;
        if ( $this->PersistenceList['run_finetune'] )
        {
            $criticalTests = eZSetupCriticalTests();
            $optionalTests = eZSetupOptionalTests();
            $testTable = eZSetupTestTable();

            $runResult = eZSetupRunTests( $criticalTests, 'eZSetup:init:system_check', $this->PersistenceList );
            $optionalRunResult = eZSetupRunTests( $optionalTests, 'eZSetup:init:system_check', $this->PersistenceList );
            $this->Results = $runResult['results'];
            $this->Result = $runResult['result'];
            $this->OptionalResults = $optionalRunResult['results'];
            $this->OptionalResult = $optionalRunResult['result'];
            $persistenceData = $runResult['persistence_list'];

            $testsRun = array();
            foreach ( $this->Results as $testResultItem )
            {
                $testsRun[$testResultItem[1]] = $testResultItem[0];
            }

            eZSetupMergePersistenceList( $this->PersistenceList, $persistenceData );

            $this->PersistenceList['tests_run'] = $testsRun;
            $this->PersistenceList['optional_tests_run'] = $testsRun;

            return ( $this->OptionalResult == EZ_SETUP_TEST_SUCCESS );
        }
        return true;
    }
コード例 #2
0
ファイル: systemchecker.php プロジェクト: gggeek/ggsysinfo
 /**
  * Executes checks for system requirements taken from setup wizard
  * @see eZStepSystemCheck::init
  */
 static function checkSetupRequirements()
 {
     $criticalTests = eZSetupCriticalTests();
     $optionalTests = eZSetupOptionalTests();
     //$testTable = eZSetupTestTable();
     // run all tests
     $list = null;
     $runResult = eZSetupRunTests($criticalTests, 'eZSetup:init:system_check', $list);
     $optionalRunResult = eZSetupRunTests($optionalTests, 'eZSetup:init:system_check', $list);
     // extract failed ones
     $warnings = array();
     foreach (array($runResult['results'], $optionalRunResult['results']) as $tests) {
         foreach ($tests as $test) {
             if ($test[0] != 1) {
                 $warnings[$test[1]] = $test[2];
             }
         }
     }
     // remove failures we don't care about
     foreach ($warnings as $testName => $error) {
         switch ($testName) {
             // this test is useless: if we get here, at least 1 db connection is working (nb: is it really true? to be checked for anon uer...)
             case 'database_all_extensions':
                 // this test should (imho) just be removed from the setup wizard
             // this test should (imho) just be removed from the setup wizard
             case 'accept_path_info':
                 unset($warnings[$testName]);
                 break;
             default:
                 break;
         }
     }
     return $warnings;
 }