summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortill <till@php.net>2008-03-23 20:42:24 +0000
committertill <till@php.net>2008-03-23 20:42:24 +0000
commit7635d21b4c128e383e61b27981872200c13bf4d5 (patch)
tree48d2b790517d6ca28295fff405289ae18667a09a
parent63210208c5bb350000f749a96cc651ad3d13a71b (diff)
* fixing bug where people got: Call to undefined function decrypt_passwd()
(The form fields for smtp and imap test shared names and imap test overwrote smtp test fields (obviously).)
-rw-r--r--installer/check.php7
-rw-r--r--installer/index.php2
-rw-r--r--installer/test.php22
3 files changed, 14 insertions, 17 deletions
diff --git a/installer/check.php b/installer/check.php
index b795fa9bb..c60244e94 100644
--- a/installer/check.php
+++ b/installer/check.php
@@ -39,11 +39,9 @@ echo '<input type="hidden" name="_step" value="' . ($RCI->configured ? 3 : 2) .
if (phpversion() > 4.3) {
$RCI->pass('Version', 'PHP ' . phpversion() . ' detected');
-}
-else {
+} else {
$RCI->fail('Version', 'PHP Version 4.3.1 or greater is required');
}
-
?>
<h3>Checking PHP extensions</h3>
@@ -54,8 +52,7 @@ $prefix = (PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : '';
foreach ($required_php_exts AS $name => $ext) {
if (extension_loaded($ext)) {
$RCI->pass($name);
- }
- else {
+ } else {
$_ext = $prefix . $ext . '.' . PHP_SHLIB_SUFFIX;
$msg = @dl($_ext) ? 'Could be loaded. Please add in php.ini' : '';
$RCI->fail($name, $msg, $source_urls[$name]);
diff --git a/installer/index.php b/installer/index.php
index 264cefcca..3b144dfae 100644
--- a/installer/index.php
+++ b/installer/index.php
@@ -25,7 +25,6 @@
<h1>RoundCube Webmail Installer</h1>
<?php
-
ini_set('error_reporting', E_ALL&~E_NOTICE);
ini_set('display_errors', 1);
@@ -51,7 +50,6 @@
</ol>
<?php
-
$include_steps = array('welcome.html', 'check.php', 'config.php', 'test.php');
if ($include_steps[$RCI->step]) {
diff --git a/installer/test.php b/installer/test.php
index 2e0637f7a..04259dd1c 100644
--- a/installer/test.php
+++ b/installer/test.php
@@ -164,11 +164,11 @@ if ($RCI->getprop('smtp_server')) {
$pass = $RCI->getprop('smtp_pass', '(none)');
if ($user == '%u') {
- $user_field = new textfield(array('name' => '_user'));
- $user = $user_field->show($_POST['_user']);
+ $user_field = new textfield(array('name' => '_smtp_user'));
+ $user = $user_field->show($_POST['_smtp_user']);
}
if ($pass == '%p') {
- $pass_field = new passwordfield(array('name' => '_pass'));
+ $pass_field = new passwordfield(array('name' => '_smtp_pass'));
$pass = $pass_field->show();
}
@@ -195,8 +195,8 @@ if (isset($_POST['sendmail']) && !empty($_POST['_from']) && !empty($_POST['_to']
preg_match('/^' . $RCI->email_pattern . '$/i', trim($_POST['_to']))) {
$headers = array(
- 'From' => trim($_POST['_from']),
- 'To' => trim($_POST['_to']),
+ 'From' => trim($_POST['_from']),
+ 'To' => trim($_POST['_to']),
'Subject' => 'Test message from RoundCube',
);
@@ -207,11 +207,13 @@ if (isset($_POST['sendmail']) && !empty($_POST['_from']) && !empty($_POST['_to']
if ($RCI->getprop('smtp_server')) {
$CONFIG = $RCI->config;
- if (!empty($_POST['_user']))
- $CONFIG['smtp_user'] = $_POST['_user'];
- if (!empty($_POST['_pass']))
- $CONFIG['smtp_pass'] = $_POST['_pass'];
-
+ if (!empty($_POST['_smtp_user'])) {
+ $CONFIG['smtp_user'] = $_POST['_smtp_user'];
+ }
+ if (!empty($_POST['_smtp_pass'])) {
+ $CONFIG['smtp_pass'] = $_POST['_smtp_pass'];
+ }
+
$mail_object = new rc_mail_mime();
$send_headers = $mail_object->headers($headers);