- Timestamp:
- Jun 14, 2009 10:36:48 AM (15 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 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
Note: See TracChangeset
for help on using the changeset viewer.