From 6c7a9d37ba742a0ea54326bc78514def12701182 Mon Sep 17 00:00:00 2001
From: Alexandre SEBBANE
+ {"This section is used to configure how eZ Publish is connect to internet."|i18n("design/standard/setup/init")}
+
+{"Proxy settings"|i18n("design/standard/setup/init")}
+
+ {if count($summary_proxy_info)}
+
+ {else}
+
+ {/if}
+
+ {"Proxy"|i18n("design/standard/setup")}: |
+
+
+ {if count($summary_proxy_info)}
+ {$summary_proxy_info}
+ {/if}
+ |
+ |||||||||||
{if count($database)}
diff --git a/kernel/setup/ezsetup_summary.php b/kernel/setup/ezsetup_summary.php
index a377aa01046..65de9bdb7f5 100644
--- a/kernel/setup/ezsetup_summary.php
+++ b/kernel/setup/ezsetup_summary.php
@@ -111,6 +111,18 @@ function summary()
}
}
+ // Proxy settings
+ $this->Tpl->setVariable( 'summary_proxy_info', '' );
+
+ if ( isset( $persistenceList['proxy_info'] ) ) {
+ if ( $persistenceList['proxy_info']['server'] <> "" )
+ {
+ $this->Tpl->setVariable( 'summary_proxy_info', $persistenceList['proxy_info']['server'] );
+ }else{
+ $this->Tpl->setVariable( 'summary_proxy_info', '-' );
+ }
+ }
+
// Templates chosen
$chosenSitePackage = false;
if ( isset( $this->PersistenceList['chosen_site_package']['0'] ) )
diff --git a/kernel/setup/steps/ezstep_create_sites.php b/kernel/setup/steps/ezstep_create_sites.php
index 550a7876b55..699efa953bb 100644
--- a/kernel/setup/steps/ezstep_create_sites.php
+++ b/kernel/setup/steps/ezstep_create_sites.php
@@ -1,4 +1,4 @@
-setVariable( 'MailSettings', 'TransportPassword', $emailInfo['password'] );
}
+ if ( $this->PersistenceList['proxy_info']['server']<>"" )
+ {
+ $ini->setVariable( 'ProxySettings', 'ProxyServer', $this->PersistenceList['proxy_info']['server'] );
+ $ini->setVariable( 'ProxySettings', 'User', $this->PersistenceList['proxy_info']['user'] );
+ $ini->setVariable( 'ProxySettings', 'Password', $this->PersistenceList['proxy_info']['password'] );
+ }
+
// Enable design location cache
$ini->setVariable( 'DesignSettings', 'DesignLocationCache', 'enabled' );
@@ -1413,4 +1420,4 @@ function initializePackage( // $package,
}
-?>
+?>
\ No newline at end of file
diff --git a/kernel/setup/steps/ezstep_data.php b/kernel/setup/steps/ezstep_data.php
index a6988c04681..1d274cdc046 100644
--- a/kernel/setup/steps/ezstep_data.php
+++ b/kernel/setup/steps/ezstep_data.php
@@ -1,4 +1,4 @@
- 'SystemFinetune' ),
array( 'file' => 'email_settings',
'class' => 'EmailSettings' ),
+ array( 'file' => 'proxy_settings',
+ 'class' => 'ProxySettings' ),
array( 'file' => 'database_choice',
'class' => 'DatabaseChoice' ),
array( 'file' => 'database_init',
@@ -178,4 +180,4 @@ function progress( $step )
}
-?>
+?>
\ No newline at end of file
diff --git a/kernel/setup/steps/ezstep_proxy_settings.php b/kernel/setup/steps/ezstep_proxy_settings.php
new file mode 100644
index 00000000000..eb877a94567
--- /dev/null
+++ b/kernel/setup/steps/ezstep_proxy_settings.php
@@ -0,0 +1,90 @@
+eZStepInstaller( $tpl, $http, $ini, $persistenceList,
+ 'proxy_settings', 'Proxy settings' );
+ }
+
+ function processPostData()
+ {
+ if ( $this->Http->hasPostVariable( 'eZSetupPROXYServer' ) )
+ {
+ $this->PersistenceList['proxy_info']['server'] = $this->Http->postVariable( 'eZSetupPROXYServer' );
+ $this->PersistenceList['proxy_info']['user'] = $this->Http->postVariable( 'eZSetupPROXYUser' );
+ $this->PersistenceList['proxy_info']['password'] = $this->Http->postVariable( 'eZSetupPROXYPassword' );
+ $siteINI = eZINI::instance( 'site.ini.append', 'settings/override', null, null, false, true );
+ $siteINI->setVariable( 'ProxySettings', 'ProxyServer', $this->PersistenceList['proxy_info']['server'] );
+ $siteINI->setVariable( 'ProxySettings', 'User', $this->PersistenceList['proxy_info']['user'] );
+ $siteINI->setVariable( 'ProxySettings', 'Password', $this->PersistenceList['proxy_info']['password'] );
+ $siteINI->save( 'site.ini.append', '.php', false, false );
+ }
+
+ return true;
+ }
+
+ function init()
+ {
+ if ( $this->hasKickstartData() )
+ {
+ $data = $this->kickstartData();
+ $this->PersistenceList['proxy_info']['server'] = $data['Server'];
+ $this->PersistenceList['proxy_info']['user'] = $data['User'];
+ $this->PersistenceList['proxy_info']['password'] = $data['Password'];
+ eZSetupMergePersistenceList( $this->PersistenceList, $persistenceData );
+ return $this->kickstartContinueNextStep();
+ }
+ return false; // Always display proxy settings
+ }
+
+ function display()
+ {
+ $proxyInfo = array( 'server' => false,
+ 'user' => false,
+ 'password' => false );
+ if ( isset( $this->PersistenceList['proxy_info'] ) )
+ $proxyInfo = array_merge( $proxyInfo, $this->PersistenceList['proxy_info'] );
+ if ( $proxyInfo['server'] and
+ $this->Ini->variable( 'ProxySettings', 'ProxyServer' ) )
+ $proxyInfo['server'] = $this->Ini->variable( 'ProxySettings', 'ProxyServer' );
+ if ( $proxyInfo['user'] and
+ $this->Ini->variable( 'ProxySettings', 'TransportUser' ) )
+ $proxyInfo['user'] = $this->Ini->variable( 'ProxySettings', 'User' );
+ if ( $proxyInfo['password'] and
+ $this->Ini->variable( 'ProxySettings', 'TransportPassword' ) )
+ $proxyInfo['password'] = $this->Ini->variable( 'ProxySettings', 'Password' );
+ $this->Tpl->setVariable( 'proxy_info', $proxyInfo );
+ $this->Tpl->setVariable( 'setup_previous_step', 'EmailSettings' );
+ $this->Tpl->setVariable( 'setup_next_step', 'DatabaseCreate' );
+
+ $result = array();
+ // Display template
+ $result['content'] = $this->Tpl->fetch( "design:setup/init/proxy_settings.tpl" );
+ $result['path'] = array( array( 'text' => ezpI18n::tr( 'design/standard/setup/init',
+ 'proxy settings' ),
+ 'url' => false ) );
+ return $result;
+
+ }
+}
+
+?>
\ No newline at end of file
From c60e291adea6ab3cb1e3dd4ccbbecb7bb6a67801 Mon Sep 17 00:00:00 2001
From: Alexandre SEBBANE - {"This section is used to configure how eZ Publish is connect to internet."|i18n("design/standard/setup/init")} + {"This section is used to configure how eZ Publish connects to the Internet. This step is only needed if the server where eZ Publish will be installed needs to use a proxy to connect to Internet, otherwise you can ignore this step."|i18n("design/standard/setup/init")} @@ -15,15 +15,15 @@
|