cvs: pearweb /public_html/bugs bug.php

From: Date: Thu, 20 Mar 2008 22:44:56 +0000
Subject: cvs: pearweb /public_html/bugs bug.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-7346@lists.php.net to get a copy of this message
dufuz Thu Mar 20 22:44:56 2008 UTC Modified files: /pearweb/public_html/bugs bug.php Log: - fixing the delete url to only hide first - now delete_comment can only delete comments that have been hidden first http://cvs.php.net/viewvc.cgi/pearweb/public_html/bugs/bug.php?r1=1.194&r2=1.195&diff_format=u Index: pearweb/public_html/bugs/bug.php diff -u pearweb/public_html/bugs/bug.php:1.194 pearweb/public_html/bugs/bug.php:1.195 --- pearweb/public_html/bugs/bug.php:1.194 Thu Mar 20 22:43:14 2008 +++ pearweb/public_html/bugs/bug.php Thu Mar 20 22:44:56 2008 @@ -15,7 +15,7 @@ * @package Bugs * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: bug.php,v 1.194 2008/03/20 22:43:14 dufuz Exp $ + * @version $Id: bug.php,v 1.195 2008/03/20 22:44:56 dufuz Exp $ */ /* @@ -1280,7 +1280,7 @@ echo '(' . htmlspecialchars($comment_name) . ')'; } if ($edit === 1 && $com_id !== 0 && auth_check('pear.dev')) { - echo "&nbsp<a href=\"".htmlspecialchars($_SERVER['PHP_SELF'])."?id=$id&amp;edit=1&amp;delete_comment=$com_id\">[delete]</a>\n"; + echo "&nbsp<a href=\"".htmlspecialchars($_SERVER['PHP_SELF'])."?id=$id&amp;edit=1&amp;hide_comment=$com_id\">[delete]</a>\n"; } echo '<pre class="note">'. "\n"; @@ -1302,21 +1302,21 @@ function hide_comment($id, $com_id) { global $dbh; - $query ='UPDATE bugdb_comments SET active = 0 WHERE bug='.(int)$id.' AND id='.(int)$com_id; + $query ='UPDATE bugdb_comments SET active = 0 WHERE bug = '.(int)$id.' AND id = '.(int)$com_id; $res =& $dbh->query($query); } function show_comment($id, $com_id) { global $dbh; - $query ='UPDATE bugdb_comments SET active = 1 WHERE bug='.(int)$id.' AND id='.(int)$com_id; + $query ='UPDATE bugdb_comments SET active = 1 WHERE bug = '.(int)$id.' AND id = '.(int)$com_id; $res =& $dbh->query($query); } function delete_comment($id, $com_id) { global $dbh; - $query = 'DELETE FROM bugdb_comments WHERE bug='.(int)$id.' AND id='.(int)$com_id; + $query = 'DELETE FROM bugdb_comments WHERE active = 0 bug = '.(int)$id.' AND id = '.(int)$com_id; $res =& $dbh->query($query); }

« previous php.pear.core (#7346) next »