Last change
on this file since 6631 was
6631,
checked in by ebihara, 14 years ago
|
#2090:merged work/toraneko/prj_dbtuning/ (thanks to toraneko)
|
File size:
1.3 KB
|
Line | |
---|
1 | <?php |
---|
2 | /** |
---|
3 | * @copyright 2005-2008 OpenPNE Project |
---|
4 | * @license http://www.php.net/license/3_01.txt PHP License 3.01 |
---|
5 | */ |
---|
6 | |
---|
7 | /** |
---|
8 | * 日記コメント削除 |
---|
9 | */ |
---|
10 | class ktai_do_fh_diary_delete_c_diary_comment extends OpenPNE_Action |
---|
11 | { |
---|
12 | function execute($requests) |
---|
13 | { |
---|
14 | $tail = $GLOBALS['KTAI_URL_TAIL']; |
---|
15 | $u = $GLOBALS['KTAI_C_MEMBER_ID']; |
---|
16 | |
---|
17 | // --- リクエスト変数 |
---|
18 | $target_c_diary_comment_id = $requests['target_c_diary_comment_id']; |
---|
19 | // ---------- |
---|
20 | $c_diary_comment = _do_c_diary_comment4c_diary_comment_id($target_c_diary_comment_id); |
---|
21 | $target_c_member_id = $c_diary_comment['c_member_id']; |
---|
22 | |
---|
23 | //--- 権限チェック |
---|
24 | //日記作成者 or コメント作成者 |
---|
25 | |
---|
26 | $c_diary = db_diary_get_c_diary4id($c_diary_comment['c_diary_id']); |
---|
27 | if ($c_diary['c_member_id'] != $u |
---|
28 | && $c_diary_comment['c_member_id'] != $u) { |
---|
29 | handle_kengen_error(); |
---|
30 | } |
---|
31 | //--- |
---|
32 | |
---|
33 | |
---|
34 | db_diary_delete_c_diary_comment($target_c_diary_comment_id, $u); |
---|
35 | |
---|
36 | //コメント記入履歴削除実行 |
---|
37 | db_diary_delete_c_diary_comment_summary($target_c_member_id,$c_diary_comment['c_diary_id']); |
---|
38 | |
---|
39 | $p = array('target_c_diary_id' => $c_diary['c_diary_id']); |
---|
40 | openpne_redirect('ktai', 'page_fh_diary', $p); |
---|
41 | } |
---|
42 | } |
---|
43 | |
---|
44 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.