[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZStepSystemCheck class 4 // 5 // Created on: <08-Aug-2003 16:46:32 kk> 6 // 7 // SOFTWARE NAME: eZ publish 8 // SOFTWARE RELEASE: 3.9.0 9 // BUILD VERSION: 17785 10 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 11 // SOFTWARE LICENSE: GNU General Public License v2.0 12 // NOTICE: > 13 // This program is free software; you can redistribute it and/or 14 // modify it under the terms of version 2.0 of the GNU General 15 // Public License as published by the Free Software Foundation. 16 // 17 // This program is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 // GNU General Public License for more details. 21 // 22 // You should have received a copy of version 2.0 of the GNU General 23 // Public License along with this program; if not, write to the Free 24 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 // MA 02110-1301, USA. 26 // 27 // 28 29 /*! \file ezstep_system_check.php 30 */ 31 include_once ( "kernel/setup/ezsetuptests.php" ); 32 include_once ( 'kernel/setup/steps/ezstep_installer.php' ); 33 include_once ( "kernel/common/i18n.php" ); 34 35 /*! 36 \class eZStepSystemCheck ezstep_system_check.php 37 \brief The class eZStepSystemCheck does 38 39 */ 40 41 class eZStepSystemCheck extends eZStepInstaller 42 { 43 /*! 44 Constructor 45 */ 46 function eZStepSystemCheck( &$tpl, &$http, &$ini, &$persistenceList ) 47 { 48 $this->eZStepInstaller( $tpl, $http, $ini, $persistenceList, 49 'system_check', 'System check' ); 50 } 51 52 /*! 53 */ 54 function processPostData() 55 { 56 $return = $this->init(); 57 if ( $this->Http->hasPostVariable( 'eZSetup_finetune_button' ) ) 58 { 59 $this->PersistenceList['run_finetune'] = true; 60 } 61 return $return; 62 } 63 64 /*! 65 */ 66 function init() 67 { 68 $criticalTests = eZSetupCriticalTests(); 69 $optionalTests = eZSetupOptionalTests(); 70 $testTable = eZSetupTestTable(); 71 72 $arguments = array(); 73 $runResult = eZSetupRunTests( $criticalTests, $arguments, 'eZSetup:init:system_check', $this->PersistenceList ); 74 $optionalRunResult = eZSetupRunTests( $optionalTests, $arguments, 'eZSetup:init:system_check', $this->PersistenceList ); 75 $this->Results = $runResult['results']; 76 $this->Result = $runResult['result']; 77 $this->OptionalResults = $optionalRunResult['results']; 78 $this->OptionalResult = $optionalRunResult['result']; 79 $persistenceData = $runResult['persistence_list']; 80 81 $testsRun = array(); 82 foreach ( $this->Results as $testResultItem ) 83 { 84 $testsRun[$testResultItem[1]] = $testResultItem[0]; 85 } 86 87 eZSetupMergePersistenceList( $this->PersistenceList, $persistenceData ); 88 89 $this->PersistenceList['tests_run'] = $testsRun; 90 $this->PersistenceList['optional_tests_run'] = $testsRun; 91 92 return ( $this->Result == EZ_SETUP_TEST_SUCCESS ); 93 } 94 95 /*! 96 */ 97 function &display() 98 { 99 $this->Tpl->setVariable( 'test', array( 'result' => $this->Result, 100 'results' => $this->Results ) ); 101 $this->Tpl->setVariable( 'optional_test', array( 'result' => $this->OptionalResult, 102 'results' => $this->OptionalResults ) ); 103 $this->Tpl->setVariable( 'persistence_data', $this->PersistenceList ); 104 $result = array(); 105 // Display template 106 $result['content'] = $this->Tpl->fetch( "design:setup/init/system_check.tpl" ); 107 $result['path'] = array( array( 'text' => ezi18n( 'design/standard/setup/init', 108 'System check' ), 109 'url' => false ) ); 110 return $result; 111 } 112 113 /*! 114 */ 115 function showMessage() 116 { 117 return false; 118 } 119 120 // Variables for storing results from tests 121 var $Result = null; 122 var $Results = null; 123 } 124 125 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |