Changeset 41 for trunk/lib/App.inc.php


Ignore:
Timestamp:
Dec 17, 2005 9:11:26 AM (19 years ago)
Author:
scdev
Message:

${1}

File:
1 edited

Legend:

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

    r40 r41  
    119119        'log_to_sms_address' => null,
    120120       
    121         // The from address used for system emails.
    122         'envelope_sender_address' => '',
    123    
    124121        // A key for calculating simple cryptographic signatures. Set using as an environment variables in the httpd.conf with 'SetEnv SIGNING_KEY <key>'.
    125122        'signing_key' => 'aae6abd6209d82a691a9f96384a7634a',
     
    314311        // and is used whenever a URL need be used to the current site.
    315312        // 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')) {
    317314            $this->setParam(array('site_url' => sprintf('%s://%s', ('on' == getenv('HTTPS') ? 'https' : 'http'), getenv('HTTP_HOST'))));
    318315        }
     
    323320        }
    324321       
    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 
    330322        // Character set. This should also be printed in the html header template.
    331323        header('Content-type: text/html; charset=' . $this->getParam('character_set'));
     
    496488            $subject = sprintf('[%s %s] %s', getenv('HTTP_HOST'), $event['type'], $message);
    497489            $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";
    499491            foreach ($event as $k=>$v) {
    500492                $email_msg .= sprintf("%-11s%s\n", $k, $v);
     
    506498        if ($this->getParam('log_sms_priority') && $priority <= $this->getParam('log_sms_priority')) {
    507499            $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";
    510502            mail($this->getParam('log_to_sms_address'), $subject, $sms_msg, $headers, '-f codebase@strangecode.com');
    511503        }
Note: See TracChangeset for help on using the changeset viewer.