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

Changeset 2905


Ignore:
Timestamp:
May 15, 2007, 7:16:24 PM (12 years ago)
Author:
ogawa
Message:

#758:日記登録・編集で公開範囲の指定されていない日記を作成できてしまう

Location:
OpenPNE/branches/2.6.x/webapp
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/2.6.x/webapp/lib/db/diary.php

    r2854 r2905  
    980980        'subject' => $subject,
    981981        'body' => $body,
    982         'public_flag' => $public_flag,
     982        'public_flag' => util_cast_public_flag_diary($public_flag),
    983983        'r_datetime' => db_now(),
    984984        'r_date' => db_now(),
     
    10011001        'subject' => $subject,
    10021002        'body' => $body,
    1003         'public_flag' => $public_flag,
     1003        'public_flag' => util_cast_public_flag_diary($public_flag),
    10041004    );
    10051005    if ($image_filename_1) $data['image_filename_1'] = $image_filename_1;
  • OpenPNE/branches/2.6.x/webapp/lib/db/member.php

    r2903 r2905  
    10391039        'ashiato_mail_num' => intval($ashiato_mail_num),
    10401040        'c_password_query_id' => intval($c_password_query_id),
    1041         'public_flag_diary' => $public_flag_diary,
     1041        'public_flag_diary' => util_cast_public_flag_diary($public_flag_diary),
    10421042        'is_shinobiashi' => $is_shinobiashi,
    10431043        'schedule_start_day' => $schedule_start_day,
     
    14431443function db_member_update_public_flag_diary($c_member_id, $public_flag_diary)
    14441444{
    1445     $data = array('public_flag_diary' => strval($public_flag_diary));
     1445    $data = array('public_flag_diary' => util_cast_public_flag_diary($public_flag_diary));
    14461446    $where = array('c_member_id' => intval($c_member_id));
    14471447    db_update('c_member', $data, $where);
  • OpenPNE/branches/2.6.x/webapp/lib/util/util.php

    r2796 r2905  
    497497}
    498498
     499function util_cast_public_flag_diary($public_flag, $default = 'public')
     500{
     501    switch ($public_flag) {
     502    case 'public':
     503    case 'friend':
     504    case 'private':
     505        break;
     506    default:
     507        $public_flag = $default;
     508        break;
     509    }
     510    return $public_flag;
     511}
     512
    499513?>
  • OpenPNE/branches/2.6.x/webapp/modules/ktai/do/h_config_public_flag_diary.php

    r1268 r2905  
    1111        $tail = $GLOBALS['KTAI_URL_TAIL'];
    1212        $u = $GLOBALS['KTAI_C_MEMBER_ID'];
     13        $public_flag = util_cast_public_flag_diary($requests['public_flag_diary']);
    1314
    14         db_member_update_public_flag_diary($u, $requests['public_flag_diary']);
     15        db_member_update_public_flag_diary($u, $public_flag);
    1516
    1617        $p = array('msg' => 35);
  • OpenPNE/branches/2.6.x/webapp/modules/ktai/do/h_diary_edit_insert_c_diary.php

    r1265 r2905  
    1818        $subject = $requests['subject'];
    1919        $body = $requests['body'];
    20         $public_flag = $requests['public_flag'];
     20        $public_flag = util_cast_public_flag_diary($requests['public_flag']);
    2121        $target_c_diary_id = $requests['target_c_diary_id'];
    2222        // ----------
  • OpenPNE/branches/2.6.x/webapp/modules/pc/do/h_config_3.php

    r2903 r2905  
    2929        $c_password_query_id = $requests['c_password_query_id'];
    3030        $c_password_query_answer = $requests['c_password_query_answer'];
    31         $public_flag_diary = $requests['public_flag_diary'];
     31        $public_flag_diary = util_cast_public_flag_diary($requests['public_flag_diary']);
    3232        $is_shinobiashi = $requests['is_shinobiashi'];
    3333        $schedule_start_day = $requests['schedule_start_day'];
  • OpenPNE/branches/2.6.x/webapp/modules/pc/do/h_diary_add_insert_c_diary.php

    r2829 r2905  
    2626        $subject = $requests['subject'];
    2727        $body = $requests['body'];
    28         $public_flag = $requests['public_flag'];
     28        $public_flag = util_cast_public_flag_diary($requests['public_flag']);
    2929        $tmpfile_1 = $requests['tmpfile_1'];
    3030        $tmpfile_2 = $requests['tmpfile_2'];
  • OpenPNE/branches/2.6.x/webapp/modules/pc/do/h_diary_edit_insert_c_diary.php

    r2829 r2905  
    2727        $subject = $requests['subject'];
    2828        $body = $requests['body'];
    29         $public_flag = $requests['public_flag'];
     29        $public_flag = util_cast_public_flag_diary($requests['public_flag']);
    3030        $tmpfile_1 = $requests['tmpfile_1'];
    3131        $tmpfile_2 = $requests['tmpfile_2'];
  • OpenPNE/branches/2.6.x/webapp/modules/pc/page/h_diary_add_confirm.php

    r2829 r2905  
    2323        $subject = $requests['subject'];
    2424        $body = $requests['body'];
    25         $public_flag = $requests['public_flag'];
     25        $public_flag = util_cast_public_flag_diary($requests['public_flag']);
    2626        $category = $requests['category'];
    2727        // ----------
  • OpenPNE/branches/2.6.x/webapp/modules/pc/page/h_diary_edit_confirm.php

    r2829 r2905  
    2222        $subject = $requests['subject'];
    2323        $body = $requests['body'];
    24         $public_flag = $requests['public_flag'];
     24        $public_flag = util_cast_public_flag_diary($requests['public_flag']);
    2525        $category = $requests['category'];
    2626        // ----------
Note: See TracChangeset for help on using the changeset viewer.