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

Changeset 6745


Ignore:
Timestamp:
Apr 26, 2008, 6:02:47 PM (11 years ago)
Author:
ebihara
Message:

#2279:公開範囲設定を無視してアルバム写真が表示できてしまっていたのを修正

Location:
OpenPNE/trunk/webapp/modules/pc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/modules/pc/page/fh_album_image_show.php

    r6677 r6745  
    77class pc_page_fh_album_image_show extends OpenPNE_Action
    88{
    9 
    10 
    119    function execute($requests)
    1210    {
     
    1816       
    1917        // --- リクエスト変数
    20         $target_c_album_id       = $requests['target_c_album_id'];
    2118        $target_c_album_image_id = $requests['target_c_album_image_id'];
    2219        // ----------
    2320       
    2421        //targetが指定されていない
    25         if(!$target_c_album_id || !$target_c_album_image_id){
     22        if (!$target_c_album_image_id) {
     23            openpne_redirect('pc', 'page_h_err_fh_album');
     24        }
     25
     26        //targetのアルバム写真が存在しない
     27        if (!p_common_is_active_c_album_image_id($target_c_album_image_id)) {
    2628            openpne_redirect('pc', 'page_h_err_fh_album');
    2729        }
    2830       
     31        $target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id);
     32        $target_c_album_id = $target_c_album_image['c_album_id'];
     33       
    2934        //targetのアルバムが存在しない
    30         if(!p_common_is_active_c_album_id($target_c_album_id)) {
    31             openpne_redirect('pc', 'page_h_err_fh_album');
    32         }
    33        
    34         //targetのアルバム写真が存在しない
    35         if(!p_common_is_active_c_album_image_id($target_c_album_image_id)) {
     35        if (!p_common_is_active_c_album_id($target_c_album_id)) {
    3636            openpne_redirect('pc', 'page_h_err_fh_album');
    3737        }
     
    5858        }
    5959       
    60         $this->set("type", $type);
     60        $this->set('type', $type);
    6161        $this->set('inc_navi', fetch_inc_navi($type, $target_c_member_id));
    62        
    63         $target_c_album_image = db_album_image_get_c_album_image4id($target_c_album_image_id);
    64         $this->set('c_album_image',$target_c_album_image);
    65        
     62        $this->set('c_album_image', $target_c_album_image);
    6663        $this->set('c_album_iamge_id_prev', db_album_image_c_album_image_id_prev4c_album_id($target_c_member_id, $target_c_album_id, $target_c_album_image_id, $u));
    6764        $this->set('c_album_iamge_id_next', db_album_image_c_album_image_id_next4c_album_id($target_c_member_id, $target_c_album_id, $target_c_album_image_id, $u));
  • OpenPNE/trunk/webapp/modules/pc/templates/fh_album.tpl

    r6661 r6745  
    9191({* unknown *})<td style="width: 50%; padding: 5px; text-align: center;">
    9292({* unknown *})({if $album_item.dual.image_filename})
    93 ({* unknown *})<a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_image_id=({$album_item.dual.c_album_image_id})&amp;target_c_member_id=({$album_item.dual.c_member_id})&amp;target_c_album_id=({$album_item.dual.c_album_id})"><img src="({t_img_url filename=$album_item.dual.image_filename w=180 h=180})" alt="" /></a><br />
     93({* unknown *})<a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_image_id=({$album_item.dual.c_album_image_id})&amp;target_c_member_id=({$album_item.dual.c_member_id})"><img src="({t_img_url filename=$album_item.dual.image_filename w=180 h=180})" alt="" /></a><br />
    9494({* unknown *})({if $type == "h"})<a href="({t_url m=pc a=page_h_album_image_edit})&amp;target_c_album_id=({$album_item.dual.c_album_id})&amp;target_c_album_image_id=({$album_item.dual.c_album_image_id})">写真を編集</a>({/if})
    9595({* unknown *})<p>({$album_item.dual.image_description})</p>
     
    9898({* unknown *})<td style="width: 50%; padding: 5px; text-align: center;">
    9999({* unknown *})({if $album_item.singular.image_filename})
    100 ({* unknown *})<a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_image_id=({$album_item.singular.c_album_image_id})&amp;target_c_member_id=({$album_item.singular.c_member_id})&amp;target_c_album_id=({$album_item.singular.c_album_id})"><img src="({t_img_url filename=$album_item.singular.image_filename w=180 h=180})" alt="" /></a><br />
     100({* unknown *})<a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_image_id=({$album_item.singular.c_album_image_id})&amp;target_c_member_id=({$album_item.singular.c_member_id})"><img src="({t_img_url filename=$album_item.singular.image_filename w=180 h=180})" alt="" /></a><br />
    101101({* unknown *})({if $type == "h"})<a href="({t_url m=pc a=page_h_album_image_edit})&amp;target_c_album_id=({$album_item.singular.c_album_id})&amp;target_c_album_image_id=({$album_item.singular.c_album_image_id})">写真を編集</a>({/if})
    102102({* unknown *})<p>({$album_item.singular.image_description})</p>
  • OpenPNE/trunk/webapp/modules/pc/templates/fh_album_image_show.tpl

    r6661 r6745  
    77({* unknown *})({if $c_album_iamge_id_prev || $c_album_iamge_id_next})
    88({* unknown *})<div class="pagerRelative">
    9 ({* unknown *})({if $c_album_iamge_id_prev})<p class="prev"><a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_id=({$c_album_image.c_album_id})&amp;target_c_album_image_id=({$c_album_iamge_id_prev})">«前の写真</a></p>({/if})
    10 ({* unknown *})({if $c_album_iamge_id_next})<p class="next"><a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_id=({$c_album_image.c_album_id})&amp;target_c_album_image_id=({$c_album_iamge_id_next})">次の写真»</a></p>({/if})
     9({* unknown *})({if $c_album_iamge_id_prev})<p class="prev"><a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_image_id=({$c_album_iamge_id_prev})">«前の写真</a></p>({/if})
     10({* unknown *})({if $c_album_iamge_id_next})<p class="next"><a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_image_id=({$c_album_iamge_id_next})">次の写真»</a></p>({/if})
    1111({* unknown *})</div>
    1212({* unknown *})({/if})
     
    2727({* unknown *})({if $c_album_iamge_id_prev || $c_album_iamge_id_next})
    2828({* unknown *})<div class="pagerRelative">
    29 ({* unknown *})({if $c_album_iamge_id_prev})<p class="prev"><a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_id=({$c_album_image.c_album_id})&amp;target_c_album_image_id=({$c_album_iamge_id_prev})">«前の写真</a></p>({/if})
    30 ({* unknown *})({if $c_album_iamge_id_next})<p class="next"><a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_id=({$c_album_image.c_album_id})&amp;target_c_album_image_id=({$c_album_iamge_id_next})">次の写真»</a></p>({/if})
     29({* unknown *})({if $c_album_iamge_id_prev})<p class="prev"><a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_image_id=({$c_album_iamge_id_prev})">«前の写真</a></p>({/if})
     30({* unknown *})({if $c_album_iamge_id_next})<p class="next"><a href="({t_url m=pc a=page_fh_album_image_show})&amp;target_c_album_image_id=({$c_album_iamge_id_next})">次の写真»</a></p>({/if})
    3131({* unknown *})</div>
    3232({* unknown *})({/if})
  • OpenPNE/trunk/webapp/modules/pc/templates/h_album_image_insert_dialog.tpl

    r6702 r6745  
    1111<link rel="stylesheet" href="./xhtml_style.php?r=6665" type="text/css" />
    1212<script type="text/javascript">
    13 function insertAlbumImageURLToTextarea(album_image_id, album_id) {
     13function insertAlbumImageURLToTextarea(album_image_id) {
    1414    var albumURLBase = "({t_url _absolute=1 _html=0 m=pc a=page_fh_album_image_show})";
    15     var replace = " " + albumURLBase + "&target_c_album_image_id=" + album_image_id + "&target_c_album_id=" + album_id + " ";
     15    var replace = " " + albumURLBase + "&target_c_album_image_id=" + album_image_id + " ";
    1616
    1717    var elm = window.opener.document.getElementById('mce_editor_textarea');
     
    6868<tr class="text">
    6969({t_loop from=$target_album_image start=0 num=5})
    70 <td>({if $item})({$item.image_description})<br /><a href="#" onclick="insertAlbumImageURLToTextarea(({$item.c_album_image_id}), ({$item.c_album_id}))">写真を挿入</a>({/if})</td>
     70<td>({if $item})({$item.image_description})<br /><a href="#" onclick="insertAlbumImageURLToTextarea(({$item.c_album_image_id}))">写真を挿入</a>({/if})</td>
    7171({/t_loop})
    7272</tr>
     
    8080<tr class="text">
    8181({t_loop from=$target_album_image start=5 num=5})
    82 <td>({if $item})({$item.image_description})<br /><a href="#" onclick="insertAlbumImageURLToTextarea(({$item.c_album_image_id}), ({$item.c_album_id}))">写真を挿入</a>({/if})</td>
     82<td>({if $item})({$item.image_description})<br /><a href="#" onclick="insertAlbumImageURLToTextarea(({$item.c_album_image_id}))">写真を挿入</a>({/if})</td>
    8383({/t_loop})
    8484</tr>
     
    9393<tr class="text">
    9494({t_loop from=$target_album_image start=10 num=5})
    95 <td>({if $item})({$item.image_description})<br /><a href="#" onclick="insertAlbumImageURLToTextarea(({$item.c_album_image_id}), ({$item.c_album_id}))">写真を挿入</a>({/if})</td>
     95<td>({if $item})({$item.image_description})<br /><a href="#" onclick="insertAlbumImageURLToTextarea(({$item.c_album_image_id}))">写真を挿入</a>({/if})</td>
    9696({/t_loop})
    9797</tr>
     
    106106<tr class="text">
    107107({t_loop from=$target_album_image start=15 num=5})
    108 <td>({if $item})({$item.image_description})<br /><a href="#" onclick="insertAlbumImageURLToTextarea(({$item.c_album_image_id}), ({$item.c_album_id}))">写真を挿入</a>({/if})</td>
     108<td>({if $item})({$item.image_description})<br /><a href="#" onclick="insertAlbumImageURLToTextarea(({$item.c_album_image_id}))">写真を挿入</a>({/if})</td>
    109109({/t_loop})
    110110</tr>
     
    119119<tr class="text">
    120120({t_loop from=$target_album_image start=20 num=5})
    121 <td>({if $item})({$item.image_description})<br /><a href="#" onclick="insertAlbumImageURLToTextarea(({$item.c_album_image_id}), ({$item.c_album_id}))">写真を挿入</a>({/if})</td>
     121<td>({if $item})({$item.image_description})<br /><a href="#" onclick="insertAlbumImageURLToTextarea(({$item.c_album_image_id}))">写真を挿入</a>({/if})</td>
    122122({/t_loop})
    123123</tr>
  • OpenPNE/trunk/webapp/modules/pc/validate/page/fh_album_image_show.ini

    r6622 r6745  
    1 [target_c_album_id]
    2 type = "int"
    3 
    41[target_c_album_image_id]
    52type = "int"
Note: See TracChangeset for help on using the changeset viewer.