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

Changeset 564


Ignore:
Timestamp:
Oct 31, 2006, 5:48:25 PM (14 years ago)
Author:
takanashi
Message:

r562の反映

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/2_4/webapp_biz/modules/biz/do/fh_biz_schedule_edit.php

    r563 r564  
    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)));
    130 
     129            $finish_date = date("Y-m-d", strtotime($begindate . ' +' . (7 * $requests['sc_rcount']) . 'days'));
    131130            //繰り返しルールの決定
    132131            foreach ($requests['sc_rwk'] as $value) {
     
    135134
    136135            //繰り返し予定
    137             $tmp = $begin_date;  //処理中の日付
     136            $tmp = strtotime($begin_date);  //処理中の日付
    138137
    139138            if ($requests['iskeep']) {
     
    147146            $first_id = biz_getScheduleMax() + 1;  //登録される予定のプライマリキー
    148147
    149             for ($i = 0; date("Ymd", strtotime($tmp)) < date("Ymd", strtotime($finish_date)); $i++) {
     148            for ($i = 0; $tmp < strtotime($finish_date); $i++) {
    150149                //終了日に達するまで新規予定追加を繰り返す
    151                 $nowday = strtotime($requests['sc_b_year'].'-'.$requests['sc_b_month'].'-'.($requests['sc_b_date']+$i));
    152                 $tmp = date("Ymd", $nowday);
    153 
     150                $nowday = strtotime($begin_date . ' +'.$i.'days');
     151                $tmp = $nowday;
     152               
    154153                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']);
     154                    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']);
    156155                }
    157156            }
Note: See TracChangeset for help on using the changeset viewer.