Changeset 309


Ignore:
Timestamp:
Jan 31, 2008 9:26:58 AM (16 years ago)
Author:
quinn
Message:

Fixed bug in email validation regex.

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Email.inc.php

    r293 r309  
    7070        // The regex used in validEmail(). Set here instead of in the default _params above so we can use the concatination . dot.
    7171        // This matches an email address as complex as:
    72         //      Bob Smith <bob&smith's/dep=sales!@smith-wick.ca.us> (Sales department)
     72        //      Bob John-Smith <bob&smith's/dep=sales!@smith-wick.ca.us> (Sales department)
    7373        // ...and something as simple as:
    7474        //      x@x.com
    75         $this->setParam(array('regex' => '/^(?:[^,@]*\s+|[^,@]*(<)|)'   // Display name
    76         . '((?:[^.<>\s@\",\[\]]+[^<>\s@\",\[\]])*[^.<>\s@\",\[\]]+)'    // Local-part
     75        $this->setParam(array('regex' => '/^(?:[^,@]*(<)|[^,@]*\s+|)'   // Display name
     76        . '((?:[^.<>\s@",\[\]]+[^<>\s@",\[\]])*[^.<>\s@",\[\]]+)'    // Local-part
    7777        . '@'                                                           // @
    7878        . '((?:(\[)|[A-Z0-9]?)'                                         // Domain, first char
  • trunk/lib/Prefs.inc.php

    r275 r309  
    188188            $app->logMsg(sprintf('Setting preference %s => %s', $key, getDump($val)), LOG_DEBUG, __FILE__, __LINE__);
    189189        } else {
    190             $app->logMsg(sprintf('not setting %s => %s', $key, $val), LOG_DEBUG, __FILE__, __LINE__);
     190            $app->logMsg(sprintf('Not setting preference %s => %s', $key, getDump($val)), LOG_DEBUG, __FILE__, __LINE__);
    191191        }
    192192    }
Note: See TracChangeset for help on using the changeset viewer.