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

Changeset 1980


Ignore:
Timestamp:
Mar 1, 2007, 3:29:11 PM (13 years ago)
Author:
ebihara
Message:

BIZのスケジュールで、個人の予定を登録した際に予定参加者と予定登録者を分けていなかった問題への暫定的対処

Location:
OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz/do/f_home_add_biz_schedule.php

    r1381 r1980  
    6868        }
    6969
    70         biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, array($target_id));  //予定の登録
     70        biz_insertSchedule($title, $u, $begin_date, $finish_date, $begin_time, $finish_time, '', 0, 0, 0, "public", $target_id);  //予定の登録
    7171        $p = array('target_c_member_id' => $target_id);
    7272        openpne_redirect('pc', 'page_f_home', $p);
  • OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz/do/fhg_biz_schedule_add.php

    r1087 r1980  
    165165        if (!$requests['sc_rp']) {
    166166            //繰り返しをしない予定登録
    167             biz_insertSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag']);
     167            biz_insertSchedule($requests['sc_title'], $u, $begin_date, $finish_date, $begin_time, $finish_time,
     168                $requests['sc_memo'], $rp_rule, 0, $requests['biz_group_id'], $requests['public_flag'], $requests['target_c_member_id']);
    168169        } else {
    169170            //繰り返し予定
     
    174175                $tmp = date("Ymd", $nowday);
    175176                if ($rp_rule & (1 << date("w",$nowday))) {
    176                     biz_insertSchedule($requests['sc_title'], $u, $tmp, $tmp, $begin_time, $finish_time, $requests['sc_memo'], $rp_rule, $first_id, $requests['biz_group_id'], $requests['public_flag']);
     177                    biz_insertSchedule($requests['sc_title'], $u, $tmp, $tmp, $begin_time, $finish_time,
     178                        $requests['sc_memo'], $rp_rule, $first_id, $requests['biz_group_id'], $requests['public_flag'], $requests['target_c_member_id']);
    177179                }
    178180            }
  • OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz/lib/mysql_functions.php

    r1598 r1980  
    183183    foreach ($tmp as $biz_schedule_id) {
    184184        $biz_schedule = biz_getScheduleInfo($biz_schedule_id);
     185        $sql = 'SELECT c_member_id FROM biz_schedule_member WHERE biz_schedule_id = ?';
     186        $biz_schedule_member_id_list = db_get_col($sql, array(intval($biz_schedule_id)));
    185187
    186188        if (biz_isPermissionSchedule($u, $biz_schedule_id)) {
    187                 if ($biz_schedule['c_member_id'] == $target_c_member_id) {
     189                if (in_array($target_c_member_id, $biz_schedule_member_id_list)) {
    188190                    $contain[] = $biz_schedule_id;
    189191                } elseif(in_array($biz_schedule['biz_group_id'], $biz_group_id_list) && ($value['public_flag'] != 'private')) {
     
    809811
    810812//スケジュール登録
    811 function biz_insertSchedule($title, $member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
    812                                                         $value = '', $rep_type, $first_id = 0,
    813                                                         $biz_group_id = 0, $public_flag = "public")
     813function biz_insertSchedule($title, $c_member_id, $begin_date, $finish_date, $begin_time = null, $finish_time = null,
     814    $value = '', $rep_type, $first_id = 0, $biz_group_id = 0,
     815    $public_flag = "public", $target_c_member_id = null)
    814816{
    815817    //登録値のセット、チェック
     
    825827    $data = array(
    826828        'title' => $title,
    827         'c_member_id' => intval($member_id),
     829        'c_member_id' => intval($c_member_id),
    828830        'begin_date' => $begin_date,
    829831        'finish_date' => $finish_date,
     
    836838        'public_flag' => $public_flag,
    837839    );
    838     db_insert('biz_schedule', $data);
     840    $biz_schedule_id = db_insert('biz_schedule', $data);
     841
     842    if (!$biz_group_id) {  //個人の予定
     843        if (is_null($target_c_member_id)) {  //作成者自身の予定
     844            $target_c_member_id = $c_member_id;
     845        }
     846
     847        $param = array(
     848            'biz_schedule_id' => $biz_schedule_id,
     849            'c_member_id' => $target_c_member_id,
     850            'is_read' => 1
     851        );
     852        db_insert('biz_schedule_member', $param);
     853    }
    839854}
    840855
  • OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz/lib/smarty_functions.php

    r1448 r1980  
    6161
    6262    $inc_smarty->assign("cmd", $cmd_head);  //操作の対象ページ
    63     $inc_smarty->assign("target_id", $member_id);  //予定登録
     63    $inc_smarty->assign("target_id", $member_id);  //予定参加
    6464
    6565    require_once 'Calendar/Week.php';
  • OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz/page/fh_biz_schedule_add.php

    r1607 r1980  
    131131
    132132        $this->set('biz_group_list', $biz_group_list[0]);
     133        $this->set('target_c_member_id', $target_id);
    133134
    134135        return 'success';
  • OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz/page/fh_biz_schedule_view.php

    r1268 r1980  
    7474                $biz_group = biz_getGroupData($list['biz_group_id']);
    7575                $list['biz_group_name'] = $biz_group['name'];
     76        } else {
     77            $list['target_c_member_nickname'] = biz_getMemberNickname($requests['target_id']);
    7678        }
    7779
  • OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz/templates/fh_biz_schedule_add.tpl

    r1607 r1980  
    1212({t_form _enctype=file m=biz a=do_fhg_biz_schedule_add})
    1313<input type="hidden" name="sessid" value="({$PHPSESSID})">
     14<input type="hidden" name="target_c_member_id" value="({$target_c_member_id})">
    1415
    1516<table border="0" cellspacing="0" cellpadding="0" style="width:540px;margin:0px auto;" class="border_07">
  • OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz/templates/fh_biz_schedule_calendar.tpl

    r1187 r1980  
    4040<a href="({$weather_url})" target="_blank">天気予報を見る</a>
    4141&nbsp;<img src="./skin/icon_schedule.gif" class="icon">
    42 <a href="({t_url m=biz a=page_fh_biz_schedule_add})">予定を追加</a>&nbsp;
     42<a href="({t_url m=biz a=page_fh_biz_schedule_add})&target_id=({$c_member.c_member_id})">予定を追加</a>&nbsp;
    4343
    4444</td>
     
    8080({$item.day})
    8181({/if})<br>
    82 <a href="({t_url m=biz a=page_fh_biz_schedule_add})&amp;begin_date=({$year})({$month|string_format:'%02d'})({$item.day|string_format:'%02d'})"><img src="./skin/icon_schedule.gif" class="icon"></a><br>
     82<a href="({t_url m=biz a=page_fh_biz_schedule_add})&amp;begin_date=({$year})({$month|string_format:'%02d'})({$item.day|string_format:'%02d'})&target_id=({$c_member.c_member_id})"><img src="./skin/icon_schedule.gif" class="icon"></a><br>
    8383
    8484({* 祝日 *})
  • OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz/templates/fh_biz_schedule_view.tpl

    r1778 r1980  
    177177<td class="bg_05" align="center" valign="middle">
    178178<div style="padding:4px 3px;">
     179登録者
     180</div>
     181</td>
     182<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     183<td class="bg_02" align="left" valign="middle">
     184<div style="padding:4px 3px;">
     185        <a href="({t_url m=pc a=page_f_home})&amp;target_c_member_id=({$schedule.c_member_id})">({$schedule.writer_name})</a>   <br>
     186</div>
     187</td>
     188<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     189</tr>
     190({*********})
     191<tr>
     192<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     193</tr>
     194({*********})
     195<tr>
     196<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     197<td class="bg_05" align="center" valign="middle">
     198<div style="padding:4px 3px;">
    179199({if $schedule.biz_group_id})
    180 登録者
     200グループ
    181201({else})
    182202参加者
     
    187207<td class="bg_02" align="left" valign="middle">
    188208<div style="padding:4px 3px;">
    189 
    190         <a href="({t_url m=pc a=page_f_home})&amp;target_c_member_id=({$schedule.c_member_id})">({$schedule.writer_name})</a>   <br>
    191 
    192 </div>
    193 </td>
    194 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    195 </tr>
    196 ({*********})
    197 <tr>
    198 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    199 </tr>
    200 ({*********})
    201209({if $schedule.biz_group_id})
    202 <tr>
    203 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    204 <td class="bg_05" align="center" valign="middle">
    205 <div style="padding:4px 3px;">
    206 グループ
    207 </div>
    208 </td>
    209 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    210 <td class="bg_02" align="left" valign="middle">
    211 <div style="padding:4px 3px;">
    212210        <a href="({t_url m=biz a=page_g_home})&amp;target_c_commu_id=({$schedule.biz_group_id})">({$schedule.biz_group_name})</a><br>
    213 </div>
    214 </td>
    215 <td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    216 </tr>
    217 ({*********})
    218 <tr>
    219 <td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
    220 </tr>
    221 ({*********})
    222 ({/if})
     211({else})
     212        <a href="({t_url m=pc a=page_f_home})&amp;target_c_member_id=({$target_c_member_id})">({$schedule.target_c_member_nickname})</a>        <br>
     213({/if})
     214</div>
     215</td>
     216<td class="bg_01" align="center"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     217</tr>
     218({*********})
     219<tr>
     220<td style="height:1px;" class="bg_01" colspan="5"><img src="./skin/dummy.gif" style="width:1px;height:1px;" class="dummy"></td>
     221</tr>
    223222({*********})
    224223<tr>
  • OpenPNE/branches/debug/2_6_4/webapp_biz/modules/biz/validate/do/fhg_biz_schedule_add.ini

    r1087 r1980  
    8888caption = 'バナー予定かどうか'
    8989
     90[target_c_member_id]
     91type="int"
     92required = 0
     93caption = '予定参加者'
Note: See TracChangeset for help on using the changeset viewer.