[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZSetupSummary class 4 // 5 // Created on: <13-Aug-2003 17:49:28 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 ezsetup_summary.php 30 */ 31 include_once ( "kernel/setup/ezsetuptests.php" ); 32 33 /*! 34 \class eZSetupSummary ezsetup_summary.php 35 \brief The class eZSetupSummary does 36 37 */ 38 39 class eZSetupSummary 40 { 41 /*! 42 Constructor 43 44 Create new object for generating summary 45 46 \param template 47 \param persistence list 48 */ 49 function eZSetupSummary( &$tpl, &$persistenceList ) 50 { 51 $this->Tpl =& $tpl; 52 $this->PersistenceList =& $persistenceList; 53 } 54 55 /*! 56 Get summary 57 58 \return Summary 59 */ 60 function summary() 61 { 62 $databaseMap = eZSetupDatabaseMap(); 63 64 $persistenceList = $this->PersistenceList; 65 66 if ( isset( $persistenceList['tests_run'] ) and 67 count( $persistenceList['tests_run'] ) > 0 ) 68 { 69 $checkPassed = true; 70 foreach ( $persistenceList['tests_run'] as $checkValue ) 71 { 72 if ( $checkValue != 1 ) 73 { 74 $checkPassed = false; 75 break; 76 } 77 } 78 if ( $checkPassed === true ) 79 $this->Tpl->setVariable( 'system_check', 'ok' ); 80 else 81 $this->Tpl->setVariable( 'system_check', '' ); 82 } 83 else 84 { 85 $this->Tpl->setVariable( 'system_check', '' ); 86 } 87 88 // Image settings 89 if ( isset( $persistenceList['imagemagick_program'] ) && $persistenceList['imagemagick_program']['result'] ) 90 { 91 $this->Tpl->setVariable( 'image_processor', 'ImageMagick' ); 92 } 93 else if ( isset( $persistenceList['imagegd_extension'] ) && $persistenceList['imagegd_extension']['result'] ) 94 { 95 $this->Tpl->setVariable( 'image_processor', 'ImageGD' ); 96 } 97 else 98 { 99 $this->Tpl->setVariable( 'image_processor', '' ); 100 } 101 102 // Database selected 103 if ( isset( $persistenceList['database_info'] ) ) { 104 $database = $databaseMap[$persistenceList['database_info']['type']]['name']; 105 $this->Tpl->setVariable( 'database', $database ); 106 } 107 else 108 { 109 $this->Tpl->setVariable( 'database', '' ); 110 } 111 112 // Languages selected 113 if ( isset( $persistenceList['regional_info'] ) ) { 114 $languages = $persistenceList['regional_info']['languages']; 115 $this->Tpl->setVariable( 'languages', $languages ); 116 } 117 else 118 { 119 $this->Tpl->setVariable( 'languages', '' ); 120 } 121 122 // Email settings 123 $this->Tpl->setVariable( 'summary_email_info', '' ); 124 125 if ( isset( $persistenceList['email_info'] ) ) { 126 if ( $persistenceList['email_info']['type'] == 1 ) 127 { 128 $this->Tpl->setVariable( 'summary_email_info', 'sendmail' ); 129 } 130 else if ( $persistenceList['email_info']['type'] == 2 ) 131 { 132 $this->Tpl->setVariable( 'summary_email_info', 'SMTP' ); 133 } 134 } 135 136 // Templates chosen 137 $chosenSitePackage = false; 138 if ( isset( $this->PersistenceList['chosen_site_package']['0'] ) ) 139 { 140 $chosenSitePackage = $this->PersistenceList['chosen_site_package']['0']; 141 } 142 143 $this->Tpl->setVariable( 'site_package', $chosenSitePackage ); 144 145 return $this->Tpl->fetch( 'design:setup/summary.tpl' ); 146 } 147 148 var $Tpl; 149 var $PersistenceList; 150 } 151 152 ?>
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 |