Changeset 41 for trunk/lib/App.inc.php
- Timestamp:
- Dec 17, 2005 9:11:26 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r40 r41 119 119 'log_to_sms_address' => null, 120 120 121 // The from address used for system emails.122 'envelope_sender_address' => '',123 124 121 // A key for calculating simple cryptographic signatures. Set using as an environment variables in the httpd.conf with 'SetEnv SIGNING_KEY <key>'. 125 122 'signing_key' => 'aae6abd6209d82a691a9f96384a7634a', … … 314 311 // and is used whenever a URL need be used to the current site. 315 312 // Not available on cli scripts obviously. 316 if (isset($_SERVER['HTTP_HOST']) && '' != $_SERVER['HTTP_HOST'] && '' != $this->getParam('site_url')) {313 if (isset($_SERVER['HTTP_HOST']) && '' != $_SERVER['HTTP_HOST'] && '' == $this->getParam('site_url')) { 317 314 $this->setParam(array('site_url' => sprintf('%s://%s', ('on' == getenv('HTTPS') ? 'https' : 'http'), getenv('HTTP_HOST')))); 318 315 } … … 323 320 } 324 321 325 // Used as the fifth parameter to mail() to set the return address for sent messages. Requires safe_mode off.326 if ('' != $this->getParam('site_email') && !$this->getParam('envelope_sender_address')) {327 $this->setParam(array('envelope_sender_address' => '-f ' . $this->getParam('site_email')));328 }329 330 322 // Character set. This should also be printed in the html header template. 331 323 header('Content-type: text/html; charset=' . $this->getParam('character_set')); … … 496 488 $subject = sprintf('[%s %s] %s', getenv('HTTP_HOST'), $event['type'], $message); 497 489 $email_msg = sprintf("A %s log event occured on %s\n\n", $event['type'], getenv('HTTP_HOST')); 498 $headers = "From: codebase@strangecode.com \r\n";490 $headers = "From: codebase@strangecode.com"; 499 491 foreach ($event as $k=>$v) { 500 492 $email_msg .= sprintf("%-11s%s\n", $k, $v); … … 506 498 if ($this->getParam('log_sms_priority') && $priority <= $this->getParam('log_sms_priority')) { 507 499 $subject = sprintf('[%s %s]', getenv('HTTP_HOST'), $priority); 508 $sms_msg = sprintf('%s :%s %s', basename($file), $line, $event['message']);509 $headers = "From: codebase@strangecode.com \r\n";500 $sms_msg = sprintf('%s [%s:%s]', $event['message'], basename($file), $line); 501 $headers = "From: codebase@strangecode.com"; 510 502 mail($this->getParam('log_to_sms_address'), $subject, $sms_msg, $headers, '-f codebase@strangecode.com'); 511 503 }
Note: See TracChangeset
for help on using the changeset viewer.