Changeset 357
- Timestamp:
- Jun 14, 2009 10:36:48 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r348 r357 107 107 108 108 // Don't email or sms duplicate messages that happen more often than this value (in seconds). 109 'log_multiple_timeout' => 6 0,109 'log_multiple_timeout' => 61, 110 110 111 111 // Logging priority can be any of the following, or false to deactivate: … … 556 556 557 557 // Create tmp files so that we don't email and sms redundantly. 558 $site_hash = md5( SITE_BASE);558 $site_hash = md5($_SERVER['SCRIPT_NAME']); 559 559 $temp_dir = $this->getParam('tmp_dir') . "/codebase_msgs_$site_hash/"; 560 560 $temp_file = $temp_dir . $msg_id; … … 567 567 // Has this message been sent more recently than the timeout? 568 568 if ((time() - $msg_last_sent) < $this->getParam('log_multiple_timeout')) { 569 // This message was alrea y sent recently569 // This message was already sent recently. 570 570 $send_notifications = false; 571 571 } else { 572 // Timeout has expired go ahead and send notifications again 572 // Timeout has expired go ahead and send notifications again. 573 573 unlink($temp_file); 574 574 } … … 597 597 // NOTIFY SOMEONE 598 598 if ($send_notifications) { 599 600 599 // EMAIL ACTION 601 600 if ($this->getParam('log_email_priority') && $priority <= $this->getParam('log_email_priority')) { -
trunk/lib/Email.inc.php
r347 r357 69 69 { 70 70 // The regex used in validEmail(). Set here instead of in the default _params above so we can use the concatenation . dot. 71 // This matches a nemail address as complex as:72 // Bob John-Smith<bob&smith's/dep=sales!@smith-wick.ca.us> (Sales department)71 // This matches a (valid) email address as complex as: 72 // "Jane & Bob Smith" <bob&smith's/dep=sales!@smith-wick.ca.us> (Sales department) 73 73 // ...and something as simple as: 74 74 // x@x.com 75 $this->setParam(array('regex' => '/^(?: [^,@]*(<)|[^,@]*\s+|)' // Display name76 . '((?:[^.<>\s@",\[\]]+[^<>\s@",\[\]])*[^.<>\s@",\[\]]+)' // Local-part75 $this->setParam(array('regex' => '/^(?:(?:"[^"]*?"\s*|[^,@]*)(<)|(?:"[^"]*?"|[^,@]*)\s+|)' // Display name 76 . '((?:[^.<>\s@",\[\]]+[^<>\s@",\[\]])*[^.<>\s@",\[\]]+)' // Local-part 77 77 . '@' // @ 78 78 . '((?:(\[)|[A-Z0-9]?)' // Domain, first char -
trunk/tests/Auth_SQLTest.php
r154 r357 44 44 first_name, 45 45 last_name, 46 email, 47 user_type 46 email 48 47 ) VALUES ( 49 48 'testuser', … … 51 50 'John', 52 51 'Doe', 53 'root@localhost', 54 'admin' 52 'root@localhost' 55 53 ) 56 54 "); -
trunk/tests/LockTest.php
r137 r357 46 46 first_name, 47 47 last_name, 48 email, 49 user_type 48 email 50 49 ) VALUES ( 51 50 'testuser', … … 53 52 'John', 54 53 'Doe', 55 'john@example.com', 56 'admin' 54 'john@example.com' 57 55 ) 58 56 "); -
trunk/tests/VersionTest.php
r137 r357 46 46 first_name, 47 47 last_name, 48 email, 49 user_type 48 email 50 49 ) VALUES ( 51 50 'testuser', … … 53 52 'John', 54 53 'Doe', 55 'john@example.com', 56 'admin' 54 'john@example.com' 57 55 ) 58 56 "); -
trunk/tests/run_tests.sh
r53 r357 7 7 for foo in *Test.php; 8 8 do 9 /usr/local/bin/php $foo;9 php $foo; 10 10 done;
Note: See TracChangeset
for help on using the changeset viewer.