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

Changeset 562


Ignore:
Timestamp:
Oct 31, 2006, 5:13:45 PM (14 years ago)
Author:
ebihara
Message:

繰り返し予定が正常に登録できなかったバグの修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/ebihara/prj_pnebiz/webapp_biz/modules/biz/do/fh_biz_schedule_edit.php

    r557 r562  
    127127
    128128            //終了日の決定
    129             $finish_date = date("Y-m-d", strtotime($requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.($requests['sc_b_date']+($requests['sc_rcount'])*7)));
     129            $finish_date = date("Y-m-d", strtotime($begindate . ' +' . (7 * $requests['sc_rcount']) . 'days'));
    130130
    131131            //繰り返しルールの決定
     
    135135
    136136            //繰り返し予定
    137             $tmp = $begin_date;  //処理中の日付
     137            $tmp = strtotime($begin_date);  //処理中の日付
    138138
    139139            if ($requests['iskeep']) {
     
    147147            $first_id = biz_getScheduleMax() + 1;  //登録される予定のプライマリキー
    148148
    149             for ($i = 0; date("Ymd", strtotime($tmp)) < date("Ymd", strtotime($finish_date)); $i++) {
     149            for ($i = 0; $tmp < strtotime($finish_date); $i++) {
    150150                //終了日に達するまで新規予定追加を繰り返す
    151                 $nowday = strtotime($requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.($requests['sc_b_date']+$i));
    152                 $tmp = date("Ymd", $nowday);
     151                $nowday = strtotime($begin_date . ' +'.$i.'days');
     152                $tmp = $nowday;
    153153
    154154                if ($rp_rule & (1 << date("w", $nowday))) {
    155                     biz_insertSchedule($requests['sc_title'], $u, $tmp, $tmp, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['sc_j_mem']);
     155                    biz_insertSchedule($requests['sc_title'], $u, date("Y-m-d", $tmp), date("Y-m-d", $tmp), $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['sc_j_mem']);
    156156                }
    157157            }
Note: See TracChangeset for help on using the changeset viewer.