From ad43e637bd51b5b288856fee9a69da851ba07779 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 26 Feb 2008 13:08:19 -0500
Subject: [PATCH] Add SMTP test to installer script

---
 installer/rcube_install.php |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index f2ab394..8ff2203 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -27,6 +27,7 @@
   var $failures = 0;
   var $config = array();
   var $last_error = null;
+  var $email_pattern = '([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9]([a-z0-9\-][.]?)*[a-z0-9])';
   
   /**
    * Constructor
@@ -88,16 +89,17 @@
    * Getter for a certain config property
    *
    * @param string Property name
+   * @param string Default value
    * @return string The property value
    */
-  function getprop($name)
+  function getprop($name, $default = null)
   {
     $value = isset($_REQUEST["_$name"]) ? $_REQUEST["_$name"] : $this->config[$name];
     
     if ($name == 'des_key' && !isset($_REQUEST["_$name"]))
       $value = self::random_key(24);
     
-    return $value;
+    return $value !== null ? $value : $default;
   }
   
   

--
Gitblit v1.9.1