svn: /web/php-bugs/trunk/ include/functions.php sql/bugs.sql www/bug.php

From: Date: Sun, 25 Jul 2010 18:32:19 +0000
Subject: svn: /web/php-bugs/trunk/ include/functions.php sql/bugs.sql www/bug.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-8588@lists.php.net to get a copy of this message
felipe Sun, 25 Jul 2010 18:32:19 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=301538 Log: - Added option to block user comments (reverted previous changes) Changed paths: U web/php-bugs/trunk/include/functions.php U web/php-bugs/trunk/sql/bugs.sql U web/php-bugs/trunk/www/bug.php Modified: web/php-bugs/trunk/include/functions.php =================================================================== --- web/php-bugs/trunk/include/functions.php 2010-07-25 17:02:57 UTC (rev 301537) +++ web/php-bugs/trunk/include/functions.php 2010-07-25 18:32:19 UTC (rev 301538) @@ -19,7 +19,6 @@ 'Spam' => 'Spm', 'Re-Opened' => 'ReO', 'To be documented' => 'Tbd', - 'Cancelled' => 'Ccd' ); $bug_types = array( @@ -48,7 +47,6 @@ 'Fresh' => 0, 'Bogus' => 1, 'To be documented' => 1, - 'Cancelled' => 1, 'Spam' => 1, 'All' => 0, ); Modified: web/php-bugs/trunk/sql/bugs.sql =================================================================== --- web/php-bugs/trunk/sql/bugs.sql 2010-07-25 17:02:57 UTC (rev 301537) +++ web/php-bugs/trunk/sql/bugs.sql 2010-07-25 18:32:19 UTC (rev 301538) @@ -19,6 +19,7 @@ assign varchar(20) default NULL, passwd varchar(20) default NULL, registered tinyint(1) NOT NULL default '0', + block_user_comment char(1) default 'N', PRIMARY KEY (id), KEY php_version (php_version(1)), KEY status (status), Modified: web/php-bugs/trunk/www/bug.php =================================================================== --- web/php-bugs/trunk/www/bug.php 2010-07-25 17:02:57 UTC (rev 301537) +++ web/php-bugs/trunk/www/bug.php 2010-07-25 18:32:19 UTC (rev 301538) @@ -138,10 +138,10 @@ exit; } -/* Bugs marked as Cancelled just can be commented by the team */ -if (isset($_POST['ncomment']) && $bug['status'] == 'Cancelled' && !($is_trusted_developer || (isset($logged_in) && $logged_in == 'developer' && $edit == 1))) { +/* Bugs blocked to user comments can only be commented by the team */ +if (isset($_POST['ncomment']) && $bug['block_user_comment'] == 'Y' && !($is_trusted_developer || (isset($logged_in) && $logged_in == 'developer'))) { response_header('Add comment not allowed'); - display_bug_error("You're not allowed to add coment on bug #{$bug_id}"); + display_bug_error("You're not allowed to add comment on bug #{$bug_id}"); response_footer(); exit; } @@ -403,6 +403,7 @@ if ($status == 'Closed' && $_POST['in']['assign'] == '') { $_POST['in']['assign'] = $auth_user->handle; } + $block_comment = isset($_POST['in']['block_user_comment']) ? $_POST['in']['block_user_comment'] : 'N'; $dbh->prepare($query . " sdesc = ?, @@ -412,6 +413,7 @@ assign = ?, php_version = ?, php_os = ?, + block_user_comment = ? ts2 = NOW() WHERE id = {$bug_id} ")->execute(array ( @@ -422,6 +424,7 @@ $_POST['in']['assign'], $_POST['in']['php_version'], $_POST['in']['php_os'], + $block_comment )); // Add changelog entry @@ -721,6 +724,12 @@ <small>(<a href="quick-fix-desc.php">description</a>)</small> </td> </tr> + <tr> + <th class="details"></th> + <td colspan="3"> + <input type="checkbox" name="in[block_user_comment]" value="Y"> Block user comment + </td> + </tr> <?php } ?> <tr>

« previous php.webmaster (#8588) next »