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

Changeset 6454


Ignore:
Timestamp:
Apr 9, 2008, 7:11:31 PM (13 years ago)
Author:
ebihara
Message:

#2179:PEARコーディング規約に沿った修正など、主にコードの可読性を向上するための修正

Location:
OpenPNE/trunk/webapp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/lib/util/mail_send.php

    r6448 r6454  
    880880}
    881881
    882 //日記コメントが追加されたときのお知らせメール送信(携帯メールアドレスへ)
     882// 日記コメントが追加されたときのお知らせメール送信(携帯メールアドレスへ)
    883883function send_diary_comment_info_mail($c_diary_comment_id, $c_member_id)
    884884{
    885     $comment  = _do_c_diary_comment4c_diary_comment_id($c_diary_comment_id);
     885    $comment = _do_c_diary_comment4c_diary_comment_id($c_diary_comment_id);
    886886    $target_c_member_id = $comment['c_member_id_author'];
    887     //コメントした人=日記オーナーの場合は通知しない
    888     if($target_c_member_id == $c_member_id){
     887
     888    // コメントした人=日記オーナーの場合は通知しない
     889    if ($target_c_member_id == $c_member_id) {
    889890        return false;
    890891    }
    891     //日記オーナーの通知設定が無ければ通知しない
     892
     893    // 日記オーナーの通知設定が無ければ通知しない
    892894    $target_c_member_config = db_member_c_member_config4c_member_id($target_c_member_id);
    893     if($target_c_member_config['SEND_COMMENT_MAIL_KTAI']!=1){
     895    if (!$target_c_member_config['SEND_COMMENT_MAIL_KTAI']) {
    894896        return false;
    895897    }
    896898
    897899    $c_member = db_common_c_member4c_member_id_LIGHT($c_member_id);
     900    $target_c_member = db_common_c_member_secure4c_member_id($target_c_member_id);
    898901    $c_diary_id = $comment['c_diary_id'];
    899     $c_diary  = db_diary_get_c_diary4id($c_diary_id);
    900     $target_c_member = db_common_c_member_secure4c_member_id($target_c_member_id);
    901 
    902     $subject  = $c_diary['subject'];
    903     $nickname = $c_member['nickname'];
    904     $body             = $comment['body'];
    905     $image_filename1  = $comment['image_filename_1'];
    906     $image_filename2  = $comment['image_filename_2'];
    907     $image_filename3  = $comment['image_filename_3'];
     902    $c_diary = db_diary_get_c_diary4id($c_diary_id);
     903
    908904    $p = array('target_c_diary_id' => $c_diary_id);
    909     $url              = openpne_gen_url('ktai', 'page_fh_diary', $p);
    910     $params = array(
    911         "subject"         => $subject,
    912         "nickname"        => $nickname,
    913         "body"            => $body,
    914         "url"             => $url,
    915         "image_filename1" => $image_filename1,
    916         "image_filename2" => $image_filename2,
    917         "image_filename3" => $image_filename3,
    918         "id"=>$c_diary_comment_id,
    919     );
    920 
    921     $tpl = fetch_mail_m_tpl("m_ktai_diary_comment_info", $params);
     905    $url = openpne_gen_url('ktai', 'page_fh_diary', $p);
     906
     907    $params = array(
     908        'subject' => $c_diary['subject'],
     909        'nickname' => $c_member['nickname'],
     910        'body' => $comment['body'],
     911        'url' => $url,
     912        'image_filename1' => $comment['image_filename_1'],
     913        'image_filename2' => $comment['image_filename_2'],
     914        'image_filename3' => $comment['image_filename_3'],
     915        'id' => $c_diary_comment_id,
     916    );
     917
     918    $tpl = fetch_mail_m_tpl('m_ktai_diary_comment_info', $params);
    922919    if (!$tpl) {
    923920        return false;
     
    927924    $ktai_address = $target_c_member['ktai_address'];
    928925    if (MAIL_ADDRESS_HASHED) {
    929         $from = "bc{$c_diary_id}-".t_get_user_hash($target_c_member_id).'@'.MAIL_SERVER_DOMAIN;
     926        $from = "bc{$c_diary_id}-" . t_get_user_hash($target_c_member_id) . '@' . MAIL_SERVER_DOMAIN;
    930927    } else {
    931         $from = "bc{$c_diary_id}".'@'.MAIL_SERVER_DOMAIN;
     928        $from = "bc{$c_diary_id}" . '@' . MAIL_SERVER_DOMAIN;
    932929    }
    933930    $from = MAIL_ADDRESS_PREFIX . $from;
     931
    934932    t_send_email($ktai_address, $subject, $body, true, $from);
    935933}
  • OpenPNE/trunk/webapp/modules/ktai/do/fh_diary_insert_c_diary_comment.php

    r6448 r6454  
    4747        db_diary_update_c_diary_is_checked($target_c_diary_id, 0);
    4848
    49         //お知らせメール送信(携帯へ)
    50         if($u != $target_c_member_id){
     49        // お知らせメール送信(携帯へ)
     50        if ($u != $target_c_member_id) {
    5151            send_diary_comment_info_mail($insert_id, $u);
    5252        }
  • OpenPNE/trunk/webapp/modules/pc/do/fh_diary_insert_c_diary_comment.php

    r6448 r6454  
    5959        db_diary_update_c_diary_is_checked($target_c_diary_id, 0);
    6060
    61         //お知らせメール送信(携帯へ)
    62         if($u != $target_c_member_id){
     61        // お知らせメール送信(携帯へ)
     62        if ($u != $target_c_member_id) {
    6363            send_diary_comment_info_mail($c_diary_comment_id, $u);
    6464        }
Note: See TracChangeset for help on using the changeset viewer.