function init() { if ($this->hasKickstartData()) { $data = $this->kickstartData(); return $this->kickstartContinueNextStep(); } if (file_exists('.htaccess')) { return true; } return eZSys::indexFileName() == ''; // If in virtual host mode, continue (return true) }
} } else { $step = $stepData->step(0); //step contains file and class } } } $done = false; $result = null; while (!$done && $step != null) { // Some common variables for all steps $tpl->setVariable("script", eZSys::serverVariable('PHP_SELF')); $siteBasics = $GLOBALS['eZSiteBasics']; $useIndex = $siteBasics['validity-check-required']; if ($useIndex) { $script = eZSys::wwwDir() . eZSys::indexFileName(); } else { $script = eZSys::indexFile() . "/setup/{$partName}"; } $tpl->setVariable('script', $script); $tpl->setVariable("version", array("text" => eZPublishSDK::version(), "major" => eZPublishSDK::majorVersion(), "minor" => eZPublishSDK::minorVersion(), "release" => eZPublishSDK::release(), "alias" => eZPublishSDK::alias())); if ($persistenceList === null) { $persistenceList = eZSetupFetchPersistenceList(); } $tpl->setVariable('persistence_list', $persistenceList); // Try to include the relevant file $includeFile = $baseDir . 'steps/ezstep_' . $step['file'] . '.php'; $stepClass = false; if (file_exists($includeFile)) { include_once $includeFile; $className = 'eZStep' . $step['class'];
function createSiteaccessUrls( $params ) { $urlList = array(); $siteaccessList = $params['siteaccess_list']; $accessType = $params['access_type']; $accessTypeValue = $params['access_type_value']; $excludePortList = isset( $params['exclude_port_list'] ) ? $params['exclude_port_list'] : array(); $hostname = false; if ( isset( $params['host'] ) && $params['host'] !== '' ) $hostname = $this->extractHostname( $params['host'] ); if ( !$hostname ) $hostname = eZSys::hostname(); $indexFile = eZSys::wwwDir() . eZSys::indexFileName(); switch( $accessType ) { case 'port': { $port = $accessTypeValue; // build urls foreach( $siteaccessList as $siteaccess ) { // skip ports which are already in use while( in_array( $port, $excludePortList ) ) ++$port; $urlList[$siteaccess]['url'] = "$hostname:$port" . $indexFile; $urlList[$siteaccess]['port'] = $port; ++$port; } } break; case 'host': case 'hostname': { $prependSiteAccess = isset( $params['host_prepend_siteaccess'] ) && is_bool( $params['host_prepend_siteaccess'] ) ? $params['host_prepend_siteaccess'] : true; $hostname = $this->extractHostname( $accessTypeValue ); if ( !$hostname ) $hostname = $accessTypeValue; foreach( $siteaccessList as $siteaccess ) { if ( $prependSiteAccess ) { // replace undescores with dashes( '_' -> '-' ); $hostPrefix = preg_replace( '/(_)/', '-', $siteaccess); // create url and host $urlList[$siteaccess]['url'] = $hostPrefix . '.' . $hostname . $indexFile; $urlList[$siteaccess]['host'] = $hostPrefix . '.' . $hostname; } else { // create url and host $urlList[$siteaccess]['url'] = $hostname . $indexFile; $urlList[$siteaccess]['host'] = $hostname; } } } break; case 'url': case 'uri': { foreach( $siteaccessList as $siteaccess ) { $urlList[$siteaccess]['url'] = $hostname . $indexFile . '/' . $siteaccess; } } break; default: break; } return $urlList; }
//step contains file and class } } } $done = false; $result = null; while (!$done && $step != null) { // Some common variables for all steps $uriPrefix = ''; if (strpos(eZSys::serverVariable('PHP_SELF'), '/ezsetup')) { $uriPrefix = '/ezsetup'; } $siteBasics = $GLOBALS['eZSiteBasics']; $useIndex = $siteBasics['validity-check-required']; if ($useIndex) { $script = eZSys::wwwDir() . eZSys::indexFileName() . $uriPrefix; } else { $script = eZSys::indexFile() . "{$uriPrefix}/setup/{$partName}"; } $tpl->setVariable('script', $script); $tpl->setVariable("version", array("text" => eZPublishSDK::version(), "major" => eZPublishSDK::majorVersion(), "minor" => eZPublishSDK::minorVersion(), "release" => eZPublishSDK::release(), "alias" => eZPublishSDK::alias())); if ($persistenceList === null) { $persistenceList = eZSetupFetchPersistenceList(); } $tpl->setVariable('persistence_list', $persistenceList); // Try to include the relevant file $includeFile = $baseDir . 'steps/ezstep_' . $step['file'] . '.php'; $stepClass = false; if (file_exists($includeFile)) { include_once $includeFile; $className = 'eZStep' . $step['class'];