Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/editcomment.php
blob: a74ee30a1e3ebf517d093bc2786880d9e27dfdb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

  /************************************\
  | Edit comment                       |
  | ~~~~~~~~~~~~                       |
  | This script allows users           |
  | to edit comments attached to tasks |
  \************************************/

if (!defined('IN_FS')) {
    die('Do not access this file directly.');
}

$sql = $db->query("SELECT  c.*, u.real_name
                     FROM  {comments} c
               INNER JOIN  {users}    u ON c.user_id = u.user_id
                    WHERE  comment_id = ? AND task_id = ?",
                    array(Get::num('id', 0), Get::num('task_id', 0)));

$page->assign('comment', $comment = $db->fetchRow($sql));

if (!$user->can_edit_comment($comment)) {
    Flyspray::show_error(11);
}

$page->pushTpl('editcomment.tpl');

?>