本文整理汇总了PHP中eZSetupDatabaseMap函数的典型用法代码示例。如果您正苦于以下问题:PHP eZSetupDatabaseMap函数的具体用法?PHP eZSetupDatabaseMap怎么用?PHP eZSetupDatabaseMap使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了eZSetupDatabaseMap函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display()
{
$databaseMap = eZSetupDatabaseMap();
$availableDatabases = array();
$databaseList = array();
if (isset($this->PersistenceList['database_extensions']['found'])) {
$databaseExtensions = $this->PersistenceList['database_extensions']['found'];
foreach ($databaseExtensions as $extension) {
if (!isset($databaseMap[$extension])) {
continue;
}
$databaseList[] = $databaseMap[$extension];
if ($databaseMap[$extension]['type'] == 'mysql' or $databaseMap[$extension]['type'] == 'mysqli') {
$availableDatabases['mysql'] = true;
} elseif ($databaseMap[$extension]['type'] == 'postgresql') {
$availableDatabases['postgresql'] = true;
}
}
}
$databaseInfo = $databaseList[0];
if (isset($this->PersistenceList['database_info'])) {
$databaseInfo = $this->PersistenceList['database_info'];
}
$this->Tpl->setVariable('database_list', $databaseList);
$this->Tpl->setVariable('database_info', $databaseInfo);
$this->Tpl->setVariable('available_databases', $availableDatabases);
$result = array();
// Display template
$result['content'] = $this->Tpl->fetch("design:setup/init/database_choice.tpl");
$result['path'] = array(array('text' => ezpI18n::tr('design/standard/setup/init', 'Database choice'), 'url' => false));
return $result;
}
示例2: checkDatabaseRequirements
/**
* @param string|bool $dbCharset Default charset used if false
* @param array $overrideDBParameters
* @return array
*/
function checkDatabaseRequirements($dbCharset = false, $overrideDBParameters = array())
{
$result = array('error_code' => false, 'use_unicode' => false, 'db_version' => false, 'db_require_version' => false, 'site_charset' => false, 'status' => false);
$databaseMap = eZSetupDatabaseMap();
$databaseInfo = $this->PersistenceList['database_info'];
$databaseInfo['info'] = $databaseMap[$databaseInfo['type']];
$dbDriver = $databaseInfo['info']['driver'];
if ($dbCharset === false) {
$dbCharset = 'iso-8859-1';
}
$dbParameters = array('server' => $databaseInfo['server'], 'port' => $databaseInfo['port'], 'user' => $databaseInfo['user'], 'password' => $databaseInfo['password'], 'socket' => trim($databaseInfo['socket']) == '' ? false : $databaseInfo['socket'], 'database' => $databaseInfo['database'], 'charset' => $dbCharset);
$dbParameters = array_merge($dbParameters, $overrideDBParameters);
// PostgreSQL requires us to specify database name.
// We use template1 here since it exists on all PostgreSQL installations.
if ($dbParameters['database'] == '' and $this->PersistenceList['database_info']['type'] == 'pgsql') {
$dbParameters['database'] = 'template1';
}
try {
$db = eZDB::instance($dbDriver, $dbParameters, true);
$result['db_instance'] = $db;
$result['connected'] = $db->isConnected();
} catch (eZDBNoConnectionException $e) {
$result['error_code'] = self::DB_ERROR_CONNECTION_FAILED;
return $result;
}
// Check if the version of the database fits the minimum required
$dbVersion = $db->databaseServerVersion();
$result['db_version'] = $dbVersion['string'];
$result['db_required_version'] = $databaseInfo['info']['required_version'];
if ($dbVersion != null) {
if (version_compare($result['db_version'], $databaseInfo['info']['required_version']) == -1) {
$result['connected'] = false;
$result['error_code'] = self::DB_ERROR_VERSION_INVALID;
return $result;
}
}
// If we have PostgreSQL we need to make sure we have the 'digest' procedure available.
if ($db->databaseName() == 'postgresql' and $dbParameters['database'] != 'template1') {
$sql = "SELECT count(*) AS count FROM pg_proc WHERE proname='digest'";
$rows = $db->arrayQuery($sql);
$count = $rows[0]['count'];
// If it is 0 we don't have it
if ($count == 0) {
$result['error_code'] = self::DB_ERROR_NO_DIGEST_PROC;
return $result;
}
}
$result['use_unicode'] = false;
if ($db->isCharsetSupported('utf-8')) {
$result['use_unicode'] = true;
}
// If we regional info we can start checking the charset
if (isset($this->PersistenceList['regional_info'])) {
if (isset($this->PersistenceList['regional_info']['site_charset']) and strlen($this->PersistenceList['regional_info']['site_charset']) > 0) {
$charsetsList = array($this->PersistenceList['regional_info']['site_charset']);
} else {
// Figure out charset automatically if it is not set yet
$primaryLanguage = null;
$allLanguages = array();
$allLanguageCodes = array();
$variationsLanguages = array();
$primaryLanguageCode = $this->PersistenceList['regional_info']['primary_language'];
$extraLanguageCodes = isset($this->PersistenceList['regional_info']['languages']) ? $this->PersistenceList['regional_info']['languages'] : array();
$extraLanguageCodes = array_diff($extraLanguageCodes, array($primaryLanguageCode));
/*
if ( isset( $this->PersistenceList['regional_info']['variations'] ) )
{
$variations = $this->PersistenceList['regional_info']['variations'];
foreach ( $variations as $variation )
{
$locale = eZLocale::create( $variation );
if ( $locale->localeCode() == $primaryLanguageCode )
{
$primaryLanguage = $locale;
}
else
{
$variationsLanguages[] = $locale;
}
}
}
*/
if ($primaryLanguage === null) {
$primaryLanguage = eZLocale::create($primaryLanguageCode);
}
$allLanguages[] = $primaryLanguage;
foreach ($extraLanguageCodes as $extraLanguageCode) {
$allLanguages[] = eZLocale::create($extraLanguageCode);
$allLanguageCodes[] = $extraLanguageCode;
}
$charsetsList = $this->findAppropriateCharsetsList($primaryLanguage, $allLanguages, $result['use_unicode']);
}
$checkedCharset = $db->checkCharset($charsetsList, $currentCharset);
if ($checkedCharset === false) {
// If the current charset is utf-8 we use that instead
//.........这里部分代码省略.........
示例3: init
function init()
{
if ($this->hasKickstartData()) {
$data = $this->kickstartData();
$siteType = $this->chosenSiteType();
$portCounter = 8080;
if (isset($data['Title'])) {
$siteType['title'] = $data['Title'];
}
if (!$siteType['title']) {
$siteType['title'] = $siteType['name'];
}
$siteType['url'] = isset($data['URL']) ? $data['URL'] : false;
if (strlen($siteType['url']) == 0) {
$siteType['url'] = 'http://' . eZSys::hostName() . eZSys::indexDir(false);
}
switch ($siteType['access_type']) {
case 'port':
// Change access port for user site, if not use default which is the current value of $portCoutner
if (isset($data['AccessPort'])) {
$siteType['access_type_value'] = $data['AccessPort'];
} else {
$siteType['access_type_value'] = $portCounter++;
}
// Change access port for admin site, if not use default which is the current value of $portCoutner
if (isset($data['AdminAccessPort'])) {
$siteType['admin_access_type_value'] = $data['AdminAccessPort'];
} else {
$siteType['admin_access_type_value'] = $portCounter++;
}
break;
case 'hostname':
if (isset($data['AccessHostname'])) {
$siteType['access_type_value'] = $data['AccessHostname'];
} else {
$siteType['access_type_value'] = $siteType['identifier'] . '.' . eZSys::hostName();
}
if (isset($data['AdminAccessHostname'])) {
$siteType['admin_access_type_value'] = $data['AdminAccessHostname'];
} else {
$siteType['admin_access_type_value'] = $siteType['identifier'] . '-admin.' . eZSys::hostName();
}
break;
default:
// Change access name for user site, if not use default which is the identifier
if (isset($data['Access'])) {
$siteType['access_type_value'] = $data['Access'];
} else {
$siteType['access_type_value'] = $siteType['identifier'];
}
// Change access name for admin site, if not use default which is the identifier + _admin
if (isset($data['AdminAccess'])) {
$siteType['admin_access_type_value'] = $data['AdminAccess'];
} else {
$siteType['admin_access_type_value'] = $siteType['identifier'] . '_admin';
}
break;
}
$siteType['database'] = $data['Database'];
$action = eZStepInstaller::DB_DATA_APPEND;
$map = array('ignore' => 1, 'remove' => 2, 'skip' => 3);
// Figure out what to do with database, do we need cleanup etc?
if (isset($map[$data['DatabaseAction']])) {
$action = $map[$data['DatabaseAction']];
}
$siteType['existing_database'] = $action;
$chosenDatabases[$siteType['database']] = 1;
$result = $this->checkDatabaseRequirements(false, array('database' => $siteType['database']));
if (!$result['status']) {
$this->Error[0] = array('type' => 'db', 'error_code' => $result['error_code']);
return false;
}
// Store charset if found
if ($result['site_charset']) {
$this->PersistenceList['regional_info']['site_charset'] = $result['site_charset'];
}
$this->storeSiteType($siteType);
return $this->kickstartContinueNextStep();
}
// Get available databases
$databaseMap = eZSetupDatabaseMap();
$databaseInfo = $this->PersistenceList['database_info'];
$databaseInfo['info'] = $databaseMap[$databaseInfo['type']];
$regionalInfo = $this->PersistenceList['regional_info'];
$demoDataResult = false;
$dbStatus = array();
$dbDriver = $databaseInfo['info']['driver'];
$dbServer = $databaseInfo['server'];
$dbPort = $databaseInfo['port'];
$dbName = isset($databaseInfo['dbname']) ? $databaseInfo['dbname'] : '';
$dbUser = $databaseInfo['user'];
$dbSocket = $databaseInfo['socket'];
if (trim($dbSocket) == '') {
$dbSocket = false;
}
$dbPwd = $databaseInfo['password'];
$dbCharset = 'iso-8859-1';
$dbParameters = array('server' => $dbServer, 'port' => $dbPort, 'user' => $dbUser, 'password' => $dbPwd, 'socket' => $dbSocket, 'database' => false, 'charset' => $dbCharset);
// PostgreSQL requires us to specify database name.
// We use template1 here since it exists on all PostgreSQL installations.
//.........这里部分代码省略.........
示例4: initializePackage
function initializePackage($siteType, &$accessMap, $charset, &$extraLanguageCodes, &$allLanguages, &$primaryLanguage, &$admin, &$resultArray)
{
// Time limit #3:
// We set the time limit to 5 minutes to ensure we have enough time
// to initialize the site. However we only set if the current limit
// is too small
$maxTime = ini_get('max_execution_time');
if ($maxTime != 0 and $maxTime < 5 * 60) {
@set_time_limit(5 * 60);
}
switch ($siteType['access_type']) {
case 'port':
$userSiteaccessName = $siteType['identifier'] . '_' . 'user';
$adminSiteaccessName = $siteType['identifier'] . '_' . 'admin';
$accessMap['port'][$siteType['access_type_value']] = $userSiteaccessName;
$accessMap['port'][$siteType['admin_access_type_value']] = $adminSiteaccessName;
break;
case 'hostname':
$userSiteaccessName = $siteType['identifier'] . '_' . 'user';
$adminSiteaccessName = $siteType['identifier'] . '_' . 'admin';
$accessMap['hostname'][$siteType['access_type_value']] = $userSiteaccessName;
$accessMap['hostname'][$siteType['admin_access_type_value']] = $adminSiteaccessName;
break;
case 'url':
default:
$userSiteaccessName = $siteType['access_type_value'];
$adminSiteaccessName = $siteType['admin_access_type_value'];
$accessMap['url'][$siteType['access_type_value']] = $userSiteaccessName;
$accessMap['url'][$siteType['admin_access_type_value']] = $adminSiteaccessName;
break;
}
$accessMap['accesses'][] = $userSiteaccessName;
$accessMap['accesses'][] = $adminSiteaccessName;
$accessMap['sites'][] = $userSiteaccessName;
$userDesignName = $siteType['identifier'];
$languageObjects = $allLanguages;
$databaseMap = eZSetupDatabaseMap();
$databaseInfo = $this->PersistenceList['database_info'];
$databaseInfo['info'] = $databaseMap[$databaseInfo['type']];
$dbServer = $databaseInfo['server'];
$dbPort = $databaseInfo['port'];
// $dbName = $databaseInfo['dbname'];
$dbSocket = $databaseInfo['socket'];
$dbUser = $databaseInfo['user'];
$dbPwd = $databaseInfo['password'];
$dbCharset = $charset;
$dbDriver = $databaseInfo['info']['driver'];
$dbName = $siteType['database'];
$dbParameters = array('server' => $dbServer, 'port' => $dbPort, 'user' => $dbUser, 'password' => $dbPwd, 'socket' => $dbSocket, 'database' => $dbName, 'charset' => $dbCharset);
$db = eZDB::instance($dbDriver, $dbParameters, true);
if (!$db->isConnected()) {
$resultArray['errors'][] = array('code' => 'EZSW-005', 'text' => "Failed connecting to database {$dbName}\n" . $db->errorMessage());
return false;
}
eZDB::setInstance($db);
$result = true;
// Initialize the database by inserting schema and data
if (!isset($siteType['existing_database'])) {
$siteType['existing_database'] = false;
}
if ($siteType['existing_database'] == eZStepInstaller::DB_DATA_REMOVE) {
eZDBTool::cleanup($db);
}
if ($siteType['existing_database'] != eZStepInstaller::DB_DATA_KEEP) {
$result = true;
$schemaArray = eZDbSchema::read('share/db_schema.dba', true);
if (!$schemaArray) {
$resultArray['errors'][] = array('code' => 'EZSW-001', 'message' => "Failed loading database schema file share/db_schema.dba");
$result = false;
}
if ($result) {
$result = true;
$dataArray = eZDbSchema::read('share/db_data.dba', true);
if (!$dataArray) {
$resultArray['errors'][] = array('code' => 'EZSW-002', 'text' => "Failed loading database data file share/db_data.dba");
$result = false;
}
if ($result) {
$schemaArray = array_merge($schemaArray, $dataArray);
$schemaArray['type'] = strtolower($db->databaseName());
$schemaArray['instance'] = $db;
$result = true;
$dbSchema = eZDbSchema::instance($schemaArray);
if (!$dbSchema) {
$resultArray['errors'][] = array('code' => 'EZSW-003', 'text' => "Failed loading " . $db->databaseName() . " schema handler");
$result = false;
}
if ($result) {
$result = true;
// This will insert the schema, then the data and
// run any sequence value correction SQL if required
$params = array('schema' => true, 'data' => true);
if ($db->databaseName() == 'mysql') {
$engines = $db->arrayQuery('SHOW ENGINES');
foreach ($engines as $engine) {
if ($engine['Engine'] == 'InnoDB' && in_array($engine['Support'], array('YES', 'DEFAULT'))) {
$params['table_type'] = 'innodb';
break;
}
}
//.........这里部分代码省略.........
示例5: summary
function summary()
{
$databaseMap = eZSetupDatabaseMap();
$persistenceList = $this->PersistenceList;
if (isset($persistenceList['tests_run']) and count($persistenceList['tests_run']) > 0) {
$checkPassed = true;
foreach ($persistenceList['tests_run'] as $checkValue) {
if ($checkValue != 1) {
$checkPassed = false;
break;
}
}
if ($checkPassed === true) {
$this->Tpl->setVariable('system_check', 'ok');
} else {
$this->Tpl->setVariable('system_check', '');
}
} else {
$this->Tpl->setVariable('system_check', '');
}
// Image settings
if (isset($persistenceList['imagemagick_program']) && $persistenceList['imagemagick_program']['result']) {
$this->Tpl->setVariable('image_processor', 'ImageMagick');
} else {
if (isset($persistenceList['imagegd_extension']) && $persistenceList['imagegd_extension']['result']) {
$this->Tpl->setVariable('image_processor', 'ImageGD');
} else {
$this->Tpl->setVariable('image_processor', '');
}
}
// Database selected
if (isset($persistenceList['database_info'])) {
$database = $databaseMap[$persistenceList['database_info']['type']]['name'];
$this->Tpl->setVariable('database', $database);
} else {
$this->Tpl->setVariable('database', '');
}
// Languages selected
if (isset($persistenceList['regional_info'])) {
$languages = $persistenceList['regional_info']['languages'];
$this->Tpl->setVariable('languages', $languages);
} else {
$this->Tpl->setVariable('languages', '');
}
// Email settings
$this->Tpl->setVariable('summary_email_info', '');
if (isset($persistenceList['email_info'])) {
if ($persistenceList['email_info']['type'] == 1) {
$this->Tpl->setVariable('summary_email_info', 'sendmail');
} else {
if ($persistenceList['email_info']['type'] == 2) {
$this->Tpl->setVariable('summary_email_info', 'SMTP');
}
}
}
// Templates chosen
$chosenSitePackage = false;
if (isset($this->PersistenceList['chosen_site_package']['0'])) {
$chosenSitePackage = $this->PersistenceList['chosen_site_package']['0'];
}
$this->Tpl->setVariable('site_package', $chosenSitePackage);
return $this->Tpl->fetch('design:setup/summary.tpl');
}
示例6: generateRegistration
/**
* @param \eZTemplate $mailTpl
* @param array $userData
*
* @return array|null|string
*/
function generateRegistration( eZTemplate $mailTpl, array $userData )
{
$databaseMap = eZSetupDatabaseMap();
$databaseInfo = $this->PersistenceList['database_info'];
$databaseInfo['info'] = $databaseMap[$databaseInfo['type']];
$regionalInfo = $this->PersistenceList['regional_info'];
if ( !isset( $regionalInfo['languages'] ) )
$regionalInfo['languages'] = array();
$emailInfo = $this->PersistenceList['email_info'];
$siteType = $this->chosenSiteType();
$url = $siteType['url'];
if ( !preg_match( "#^[a-zA-Z0-9]+://(.*)$#", $url ) )
{
$url = 'http://' . $url;
}
$currentURL = $url;
$adminURL = $url;
if ( $siteType['access_type'] == 'url' )
{
$url .= '/' . $siteType['access_type_value'];
$adminURL .= '/' . $siteType['admin_access_type_value'];
}
else if ( $siteType['access_type'] == 'hostname' )
{
$url = eZHTTPTool::createRedirectURL( 'http://' . $siteType['access_type_value'] );
$adminURL = eZHTTPTool::createRedirectURL( 'http://' . $siteType['admin_access_type_value'] );
}
else if ( $siteType['access_type'] == 'port' )
{
$url = eZHTTPTool::createRedirectURL( $currentURL, array( 'override_port' => $siteType['access_type_value'] ) );
$adminURL = eZHTTPTool::createRedirectURL( $currentURL, array( 'override_port' => $siteType['admin_access_type_value'] ) );
}
$siteType['url'] = $url;
$siteType['admin_url'] = $adminURL;
$testsRun = $this->PersistenceList['tests_run'];
$imageMagickProgram = $this->PersistenceList['imagemagick_program'];
$imageGDExtension = $this->PersistenceList['imagegd_extension'];
$phpVersion = $this->PersistenceList['phpversion'];
$phpVersion['sapi'] = PHP_SAPI;
$webserverInfo = false;
if ( function_exists( 'apache_get_version' ) )
{
$webserverInfo = array( 'version' => apache_get_version() );
}
else if ( !empty( $_SERVER['SERVER_SOFTWARE'] ) )
{
$webserverInfo = array( 'version' => $_SERVER['SERVER_SOFTWARE'] );
}
$systemInfo = new eZSysInfo();
$systemInfo->scan();
$optionalTests = eZSetupOptionalTests();
$runResult = eZSetupRunTests( $optionalTests, 'eZSetup:init:send_registration', $this->PersistenceList );
$testResults = $runResult['results'];
// Generate email body e-mail
$mailTpl->setVariable( 'user_data', $userData );
$mailTpl->setVariable( 'database_info', $databaseInfo );
$mailTpl->setVariable( 'regional_info', $regionalInfo );
$mailTpl->setVariable( 'email_info', $emailInfo );
$mailTpl->setVariable( 'site_type', $siteType );
$mailTpl->setVariable( 'tests_run', $testsRun );
$mailTpl->setVariable( 'imagemagick_program', $imageMagickProgram );
$mailTpl->setVariable( 'imagegd_extension', $imageGDExtension );
$mailTpl->setVariable( 'phpversion', $phpVersion );
$mailTpl->setVariable( 'webserver', $webserverInfo );
$mailTpl->setVariable( 'system', $systemInfo );
$mailTpl->setVariable( 'os', array( 'name' => php_uname() ) );
$mailTpl->setVariable( 'optional_tests', $testResults );
$mailTpl->setVariable( "version", array( "text" => eZPublishSDK::version(),
"major" => eZPublishSDK::majorVersion(),
"minor" => eZPublishSDK::minorVersion(),
"release" => eZPublishSDK::release() ) );
return $mailTpl->fetch( 'design:setup/registration_email.tpl' );
}
示例7: generateRegistration
function generateRegistration($mailTpl, $comments)
{
$databaseMap = eZSetupDatabaseMap();
$databaseInfo = $this->PersistenceList['database_info'];
$databaseInfo['info'] = $databaseMap[$databaseInfo['type']];
$regionalInfo = $this->PersistenceList['regional_info'];
if (!isset($regionalInfo['languages'])) {
$regionalInfo['languages'] = array();
}
// $demoData = $this->PersistenceList['demo_data'];
$emailInfo = $this->PersistenceList['email_info'];
$siteTemplates = array();
$siteType = $this->chosenSiteType();
/* $typeFunctionality = eZSetupFunctionality( $siteType['identifier'] );
$additionalPackages = array();
if ( isset( $this->PersistenceList['additional_packages'] ) )
$additionalPackages = $this->PersistenceList['additional_packages'];
$extraFunctionality = array_merge( $additionalPackages,
$typeFunctionality['required'] );
$extraFunctionality = array_unique( $extraFunctionality );*/
$url = $siteType['url'];
if (!preg_match("#^[a-zA-Z0-9]+://(.*)\$#", $url)) {
$url = 'http://' . $url;
}
$currentURL = $url;
$adminURL = $url;
if ($siteType['access_type'] == 'url') {
$url .= '/' . $siteType['access_type_value'];
$adminURL .= '/' . $siteType['admin_access_type_value'];
} else {
if ($siteType['access_type'] == 'hostname') {
$url = eZHTTPTool::createRedirectURL('http://' . $siteType['access_type_value']);
$adminURL = eZHTTPTool::createRedirectURL('http://' . $siteType['admin_access_type_value']);
} else {
if ($siteType['access_type'] == 'port') {
$url = eZHTTPTool::createRedirectURL($currentURL, array('override_port' => $siteType['access_type_value']));
$adminURL = eZHTTPTool::createRedirectURL($currentURL, array('override_port' => $siteType['admin_access_type_value']));
}
}
}
$siteType['url'] = $url;
$siteType['admin_url'] = $adminURL;
//$siteType['extra_functionality'] = $extraFunctionality;
$testsRun = $this->PersistenceList['tests_run'];
$imageMagickProgram = $this->PersistenceList['imagemagick_program'];
$imageGDExtension = $this->PersistenceList['imagegd_extension'];
$phpVersion = $this->PersistenceList['phpversion'];
$webserverInfo = false;
if (function_exists('apache_get_version')) {
$webserverInfo = array('version' => apache_get_version());
}
$systemInfo = new eZSysInfo();
$systemInfo->scan();
$optionalTests = eZSetupOptionalTests();
$testTable = eZSetupTestTable();
$runResult = eZSetupRunTests($optionalTests, 'eZSetup:init:send_registration', $this->PersistenceList);
$testResults = $runResult['results'];
$testResult = $runResult['result'];
$successCount = $runResult['success_count'];
$persistenceData = $runResult['persistence_list'];
// Send e-mail
$mailTpl->setVariable('comments', $comments);
$mailTpl->setVariable('database_info', $databaseInfo);
$mailTpl->setVariable('regional_info', $regionalInfo);
// $mailTpl->setVariable( 'demo_data', $demoData );
$mailTpl->setVariable('email_info', $emailInfo);
$mailTpl->setVariable('site_type', $siteType);
$mailTpl->setVariable('tests_run', $testsRun);
$mailTpl->setVariable('imagemagick_program', $imageMagickProgram);
$mailTpl->setVariable('imagegd_extension', $imageGDExtension);
$mailTpl->setVariable('phpversion', $phpVersion);
$mailTpl->setVariable('webserver', $webserverInfo);
$mailTpl->setVariable('system', $systemInfo);
$mailTpl->setVariable('os', array('name' => php_uname()));
$mailTpl->setVariable('optional_tests', $testResults);
$mailTpl->setVariable("version", array("text" => eZPublishSDK::version(), "major" => eZPublishSDK::majorVersion(), "minor" => eZPublishSDK::minorVersion(), "release" => eZPublishSDK::release()));
return $mailTpl->fetch('design:setup/registration_email.tpl');
}
示例8: display
function display()
{
$databaseMap = eZSetupDatabaseMap();
$dbError = 0;
$dbNotEmpty = 0;
if ($this->Error) {
$dbError = $this->databaseErrorInfo(array('error_code' => $this->Error, 'database_info' => $this->PersistenceList['database_info']));
}
$databaseInfo = $this->PersistenceList['database_info'];
$databaseInfo['info'] = $databaseMap[$databaseInfo['type']];
$databaseInfo['table']['is_empty'] = $this->DBEmpty;
if (isset($this->PersistenceList['regional_info'])) {
$regionalInfo = $this->PersistenceList['regional_info'];
} else {
$regionalInfo = '';
}
$this->Tpl->setVariable('db_error', $dbError);
$this->Tpl->setVariable('database_info', $databaseInfo);
$this->Tpl->setVariable('regional_info', $regionalInfo);
$this->Tpl->setVariable('db_not_empty', $dbNotEmpty);
$result = array();
// Display template
$result['content'] = $this->Tpl->fetch('design:setup/init/database_init.tpl');
$result['path'] = array(array('text' => ezpI18n::tr('design/standard/setup/init', 'Database initialization'), 'url' => false));
return $result;
}