svnno****@sourc*****
svnno****@sourc*****
2009年 4月 16日 (木) 22:12:19 JST
Revision: 59 http://svn.sourceforge.jp/view?root=frameworkspider&view=rev&rev=59 Author: m_nakashima Date: 2009-04-16 22:12:19 +0900 (Thu, 16 Apr 2009) Log Message: ----------- Modified Paths: -------------- current/DATA/lib/spider/ModuleBase.class.php -------------- next part -------------- Modified: current/DATA/lib/spider/ModuleBase.class.php =================================================================== --- current/DATA/lib/spider/ModuleBase.class.php 2009-04-16 11:40:19 UTC (rev 58) +++ current/DATA/lib/spider/ModuleBase.class.php 2009-04-16 13:12:19 UTC (rev 59) @@ -51,11 +51,11 @@ function report_mailto($subject,$message,$mailto=null) { $mailto_addresses = array(); if( is_null( $mailto ) || strlen(trim($mailto)) == 0 ) { - if( !is_array( $GLOBALS['MAIL_SYSTEM_REPORT_TO'] ) ) { + if( !is_array( $GLOBALS['SYSTEM_MAIL_REPORT_TO_ADDRESSES'] ) ) { $this->error( "mailto:no defined:" . $subject . ":" . $message ); return false; } else { - $mailto_addresses = $GLOBALS['MAIL_SYSTEM_REPORT_TO']; + $mailto_addresses = $GLOBALS['SYSTEM_MAIL_REPORT_TO_ADDRESSES']; } } else { array_push($mailto_addresses, $mailto); @@ -63,8 +63,8 @@ if( $send_object = $this->get_system_mailer() ) { // 送信 foreach( $mailto_addresses as $address ) { - $result = $send_object->send( $address, MAIL_SYSTEM_SUBJECT_PREFIX.$subject, $message, - MAIL_SYSTEM_FROM_NAME.' <'.MAIL_SYSTEM_FROM_ADDRESS.'>', MAIL_SYSTEM_REPLYTO, MAIL_SYSTEM_RETURN ); + $result = $send_object->send( $address, SYSTEM_MAIL_SUBJECT_PREFIX.$subject, $message, + SYSTEM_MAIL_FROM_NAME.' <'.SYSTEM_MAIL_FROM_ADDRESS.'>', SYSTEM_MAIL_REPLY_ADDRESS, SYSTEM_MAIL_RETURN_ADDRESS ); if( $result ) { $this->report( "mailto:" . $address . ":" . $subject . ":" . $message ); } @@ -78,7 +78,7 @@ * システム設定された値でメール送信オブジェクトを作成して取得します。 */ function get_system_mailer() { - if( defined('MAIL_METHOD') ) { + if( defined('SYSTEM_MAIL_SEND_METHOD') ) { require_once( dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . "util" . DIRECTORY_SEPARATOR . "Mail.class.php" ); @@ -86,19 +86,12 @@ $params = array(); // 送信方法の決定 $class_name = 'PHP'; - if( preg_match('/^[sS][mM][tT][pP]$/',MAIL_METHOD) > 0 ) { + if( preg_match('/^[sS][mM][tT][pP]$/',SYSTEM_MAIL_SEND_METHOD) > 0 ) { $class_name = 'SMTP'; - $params = array( - 'smtp_host' => MAIL_SMTP_HOST, - 'smtp_port' => MAIL_SMTP_PORT, - 'smtp_auth' => MAIL_SMTP_AUTH, - 'smtp_auth_user' => MAIL_SMTP_USER, - 'smtp_auth_pass' => MAIL_SMTP_PASS - ); - } else if( preg_match('/^[sS][eE][nN][dD][mM][aA][iI][lL]$/',MAIL_METHOD) > 0 ) { + } else if( preg_match('/^[sS][eE][nN][dD][mM][aA][iI][lL]$/',SYSTEM_MAIL_SEND_METHOD) > 0 ) { $class_name = 'SendMail'; - $params = array('sendmail_path'=>MAIL_SENDMAIL_PATH); } + $params = $GLOBALS['SYSTEM_MAIL_SEND_METHOD_OPTIONS']; // 送信オブジェクト作成 $send_object = util_Mail::get_instance( $class_name, $params ); if( $send_object === false ) { @@ -120,9 +113,6 @@ if( defined('SYSTEM_LOG_LEVEL') && is_numeric(SYSTEM_LOG_LEVEL) && preg_match('/^[0-4]$/',SYSTEM_LOG_LEVEL) > 0 ) { $system_log_level = SYSTEM_LOG_LEVEL; - } else if( defined('MODE_LOG') && is_numeric(MODE_LOG) - && preg_match('/^[0-4]$/',MODE_LOG) > 0 ) { - $system_log_level = MODE_LOG; } // システム設定のログレベルより大きいレベルのログは出力しない if( $log_level > $system_log_level ) {