Index: trunk/lib/Auth_SQL.inc.php
===================================================================
--- trunk/lib/Auth_SQL.inc.php	(revision 264)
+++ trunk/lib/Auth_SQL.inc.php	(revision 266)
@@ -638,4 +638,29 @@
 
     /**
+     * Tests if the "blocked" flag is set for a user.
+     *
+     * @param  int      $user_id    User id to look for.
+     * @return boolean              True if the user is blocked, false otherwise.
+     */
+    function isBlocked($user_id=null)
+    {
+    	$db =& DB::getInstance();
+
+        $this->initDB();
+
+        if ($this->getParam('blocking')) {
+            // Get user_id if specified.
+            $user_id = isset($user_id) ? $user_id : $this->getVal('user_id');
+            $qid = $db->query("
+                SELECT 1 
+                FROM " . $this->_params['db_table'] . "
+                WHERE blocked = 'true'
+                AND " . $this->_params['db_primary_key'] . " = '" . $db->escapeString($user_id) . "'
+            ");
+            return mysql_num_rows($qid) === 1;
+        }
+    }
+
+    /**
      * Unblocks a user in the db_table, and clears any blocked_reason.
      */
@@ -902,19 +927,21 @@
     /**
      * If the current user has access to the specified $security_zone, return true.
-     * If the optional $priv is supplied, test that against the zone.
+     * If the optional $user_type is supplied, test that against the zone.
+     *
+     * NOTE: "user_type" used to be called "priv" in some older implementations.
      *
      * @param  constant $security_zone   string of comma delimited priviliges for the zone
-     * @param  string   $priv            a privilege that might be found in a zone
+     * @param  string   $user_type       a privilege that might be found in a zone
      * @return bool     true if user is a member of security zone, false otherwise
      */
-    function inClearanceZone($security_zone, $priv='')
+    function inClearanceZone($security_zone, $user_type='')
     {
         return true;
         $zone_members = preg_split('/,\s*/', $security_zone);
-        $priv = empty($priv) ? $this->get('priv') : $priv;
+        $user_type = empty($user_type) ? $this->get('user_type') : $user_type;
 
         // If the current user's privilege level is NOT in that array or if the
         // user has no privilege, return false. Otherwise the user is clear.
-        if (!in_array($priv, $zone_members) || empty($priv)) {
+        if (!in_array($user_type, $zone_members) || empty($user_type)) {
             return false;
         } else {
@@ -926,4 +953,6 @@
      * This function tests a list of arguments $security_zone against the priv that the current user has.
      * If the user doesn't have one of the supplied privs, die.
+     *
+     * NOTE: "user_type" used to be called "priv" in some older implementations.
      *
      * @param  constant $security_zone   string of comma delimited priviliges for the zone
@@ -938,5 +967,5 @@
         /* If the current user's privilege level is NOT in that array or if the
          * user has no privilege, DIE with a message. */
-        if (!in_array($this->get('priv'), $zone_members) || !$this->get('priv')) {
+        if (!in_array($this->get('user_type'), $zone_members) || !$this->get('user_type')) {
             $message = empty($message) ? _("You have insufficient privileges to view that page.") : $message;
             $app->raiseMsg($message, MSG_NOTICE, __FILE__, __LINE__);
Index: trunk/lib/FormValidator.inc.php
===================================================================
--- trunk/lib/FormValidator.inc.php	(revision 264)
+++ trunk/lib/FormValidator.inc.php	(revision 266)
@@ -40,6 +40,51 @@
 class FormValidator extends Validator {
 
+    // Class parameters.
+    var $_params = array(
+        'error' => ' sc-msg-error ',
+        'warning' => ' sc-msg-warning ',
+        'notice' => ' sc-msg-notice ',
+        'success' => ' sc-msg-success ',
+    );
+
     // Array filling with error messages.
     var $errors = array();
+    
+    /**
+     * Set (or overwrite existing) parameters by passing an array of new parameters.
+     *
+     * @access public
+     * @param  array    $params     Array of parameters (key => val pairs).
+     */
+    function setParam($params)
+    {
+		$app =& App::getInstance();
+    
+        if (isset($params) && is_array($params)) {
+            // Merge new parameters with old overriding only those passed.
+            $this->_params = array_merge($this->_params, $params);
+        } else {
+            $app->logMsg(sprintf('Parameters are not an array: %s', $params), LOG_ERR, __FILE__, __LINE__);
+        }
+    }
+
+    /**
+     * Return the value of a parameter, if it exists.
+     *
+     * @access public
+     * @param string $param        Which parameter to return.
+     * @return mixed               Configured parameter value.
+     */
+    function getParam($param)
+    {
+		$app =& App::getInstance();
+    
+        if (isset($this->_params[$param])) {
+            return $this->_params[$param];
+        } else {
+            $app->logMsg(sprintf('Parameter is not set: %s', $param), LOG_DEBUG, __FILE__, __LINE__);
+            return null;
+        }
+    }
     
     /**
@@ -164,17 +209,17 @@
                 case MSG_ERR:
                 default:
-                    echo ' sc-msg-error ';
+                    echo $this->getParam('error');
                     break;
 
                 case MSG_WARNING:
-                    echo ' sc-msg-warning ';
+                    echo $this->getParam('warning');
                     break;
 
+                case MSG_NOTICE:
+                    echo $this->getParam('notice');
+                    break;
+
                 case MSG_SUCCESS:
-                    echo ' sc-msg-success ';
-                    break;
-
-                case MSG_NOTICE:
-                    echo ' sc-msg-notice ';
+                    echo $this->getParam('success');
                     break;
                 }
Index: trunk/lib/Validator.inc.php
===================================================================
--- trunk/lib/Validator.inc.php	(revision 264)
+++ trunk/lib/Validator.inc.php	(revision 266)
@@ -208,5 +208,5 @@
         $timestamp = strtotime($val);
         // Return values change between php4 and php5.
-        if ($timestamp === -1 || $timestamp === false) {
+        if ('' != trim($val) && ($timestamp === -1 || $timestamp === false)) {
             return false;
         } else {
