| [ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZStepSiteAccess class 4 // 5 // Created on: <12-Aug-2003 17:35:47 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_site_access.php 30 */ 31 include_once ( 'kernel/setup/steps/ezstep_installer.php'); 32 include_once ( "kernel/common/i18n.php" ); 33 34 /*! 35 \class eZStepSiteAccess ezstep_site_access.php 36 \brief The class eZStepSiteAccess does 37 38 */ 39 40 class eZStepSiteAccess extends eZStepInstaller 41 { 42 /*! 43 Constructor 44 */ 45 function eZStepSiteAccess( &$tpl, &$http, &$ini, &$persistenceList ) 46 { 47 $this->eZStepInstaller( $tpl, $http, $ini, $persistenceList, 48 'site_access', 'Site access' ); 49 } 50 51 /*! 52 \reimp 53 */ 54 function processPostData() 55 { 56 $accessType = null; 57 if( $this->Http->hasPostVariable( 'eZSetup_site_access' ) ) 58 { 59 $accessType = $this->Http->postVariable( 'eZSetup_site_access' ); 60 } 61 else 62 { 63 return false; // unknown error 64 } 65 66 $siteType = $this->chosenSiteType(); 67 68 $siteType['access_type'] = $accessType; 69 if ( $accessType == 'url' ) 70 { 71 $siteType['access_type_value'] = $siteType['identifier']; 72 $siteType['admin_access_type_value'] = $siteType['identifier'] . '_admin'; 73 } 74 else if ( $accessType == 'port' ) 75 { 76 $siteType['access_type_value'] = 8080; // default port values 77 $siteType['admin_access_type_value'] = 8081; 78 } 79 else if ( $accessType == 'hostname' ) 80 { 81 $siteType['access_type_value'] = $siteType['identifier'] . '.' . eZSys::hostName(); 82 $siteType['admin_access_type_value'] = $siteType['identifier'] . '-admin.' . eZSys::hostName(); 83 } 84 else 85 { 86 $siteType['access_type_value'] = $accessType; 87 $siteType['admin_access_type_value'] = $accessType . '_admin'; 88 } 89 $this->storeSiteType( $siteType ); 90 return true; 91 } 92 93 /*! 94 \reimp 95 */ 96 function init() 97 { 98 if ( $this->hasKickstartData() ) 99 { 100 $data = $this->kickstartData(); 101 102 $siteType = $this->chosenSiteType(); 103 104 $accessType = $data['Access']; 105 if ( in_array( $accessType, 106 array( 'url', 'port', 'hostname' ) ) ) 107 $siteType['access_type'] = $accessType; 108 109 $this->storeSiteType( $siteType ); 110 return $this->kickstartContinueNextStep(); 111 } 112 113 $siteType = $this->chosenSiteType(); 114 115 // If windows installer, install using url site access 116 include_once ( "kernel/setup/ezsetuptests.php" ); 117 if ( eZSetupTestInstaller() == 'windows' ) 118 { 119 $siteType['access_type'] = 'url'; 120 $siteType['access_type_value'] = $siteType['identifier']; 121 $siteType['admin_access_type_value'] = $siteType['identifier'] . '_admin'; 122 123 $this->storeSiteType( $siteType ); 124 125 return true; 126 } 127 128 if ( !isset( $siteType['access_type'] ) ) 129 $siteType['access_type'] = 'url'; 130 131 $this->storeSiteType( $siteType ); 132 return false; // Always show site access 133 } 134 135 /*! 136 \reimp 137 */ 138 function &display() 139 { 140 $siteType = $this->chosenSiteType(); 141 $this->Tpl->setVariable( 'site_type', $siteType ); 142 // $this->Tpl->setVariable( 'error', $this->Error ); 143 144 // Return template and data to be shown 145 $result = array(); 146 // Display template 147 $result['content'] = $this->Tpl->fetch( 'design:setup/init/site_access.tpl' ); 148 $result['path'] = array( array( 'text' => ezi18n( 'design/standard/setup/init', 149 'Site access' ), 150 'url' => false ) ); 151 return $result; 152 } 153 154 } 155 156 ?>
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 |