ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 9421


Ignore:
Timestamp:
Nov 27, 2008, 11:26:04 PM (10 years ago)
Author:
ogawa
Message:

#2032:ランクアップメールの送信部分を修正

Location:
OpenPNE/trunk/webapp/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/lib/db/point.php

    r9401 r9421  
    2727        }
    2828    }
    29 }
    30 
    31 // ランクアップメールの設定があるかどうかを取得
    32 function db_point_is_set_rank_up_pcktai_mail_config($c_member_id)
    33 {
    34     $sql = 'SELECT COUNT(*) FROM c_member_config'
    35          . ' WHERE c_member_id = ?'
    36          . ' AND (name = "SEND_RANK_UP_MAIL_KTAI" OR name = "SEND_RANK_UP_MAIL_PC")';
    37     $params = array(intval($c_member_id), intval($data));
    38     return (bool)db_get_one($sql, $params);
    3929}
    4030
  • OpenPNE/trunk/webapp/lib/util/mail_send.php

    r9401 r9421  
    810810function send_mail_pcktai_rank_up($c_member_id, $before_rank, $after_rank)
    811811{
    812     $c_member = db_member_c_member4c_member_id($c_member_id, true);
    813 
    814812    $to_rank_up_mail_pc = false;
    815813    $to_rank_up_mail_ktai = false;
    816814
    817     $send_rank_up_mail_config = db_point_is_set_rank_up_pcktai_mail_config($c_member_id);
    818 
    819     // DBにデータがない場合
    820     if (!$send_rank_up_mail_config){
    821         if (!empty($c_member['secure']['pc_address'])) {
    822             $to_rank_up_mail_pc = true;
    823         } else {
    824             $to_rank_up_mail_ktai = true;
    825         }
    826     }
    827     // 設定された値を取得
     815    $c_member = db_member_c_member4c_member_id($c_member_id, true);
     816
     817    if (!empty($c_member['secure']['pc_address'])) {
     818        $to_rank_up_mail_pc = true;
     819    } else {
     820        $to_rank_up_mail_ktai = true;
     821    }
     822
     823    // メンバーの受信設定を取得
    828824    $c_member_config = util_get_c_member_config($c_member_id);
    829825    if ($c_member_config['SEND_RANK_UP_MAIL_PC']) {
     
    833829        $to_rank_up_mail_ktai = true;
    834830    }
     831
     832    $result_pc = true;
     833    $result_ktai = true;
     834
    835835    // PCに送信
    836836    if ($to_rank_up_mail_pc) {
     
    843843        $result_pc = fetch_send_mail($to, 'm_pc_rank_up', $params);
    844844    }
    845 
    846845    // 携帯に送信
    847846    if ($to_rank_up_mail_ktai) {
    848847        $to = $c_member['secure']['ktai_address'];
    849         $p = array('kad' => t_encrypt(db_member_username4c_member_id($c_member['c_member_id'], true)));
     848
     849        $p = array('kad' => t_encrypt(db_member_username4c_member_id($c_member_id, true)));
    850850        $login_url = openpne_gen_url('ktai', 'page_o_login', $p);
    851851
     
    858858        $result_ktai = fetch_send_mail($to, 'm_ktai_rank_up', $params);
    859859    }
    860     return ($result_ktai && $result_pc);
     860
     861    return ($result_pc && $result_ktai);
    861862}
    862863
Note: See TracChangeset for help on using the changeset viewer.