svn: /web/php-bugs/trunk/ include/functions.php www/bug.php
| From: | Felipe Pena | Date: | Mon, 28 Jun 2010 17:35:13 +0000 |
| Subject: | svn: /web/php-bugs/trunk/ include/functions.php www/bug.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-8473@lists.php.net to get a copy of this message | ||
felipe Mon, 28 Jun 2010 17:35:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=300820
Log:
- Restore the bug status when providing feedback for an assigned bug. (i.e. assigned -> feedback
-> assigned)
Changed paths:
U web/php-bugs/trunk/include/functions.php
U web/php-bugs/trunk/www/bug.php
Modified: web/php-bugs/trunk/include/functions.php
===================================================================
--- web/php-bugs/trunk/include/functions.php 2010-06-28 16:47:40 UTC (rev 300819)
+++ web/php-bugs/trunk/include/functions.php 2010-06-28 17:35:13 UTC (rev 300820)
@@ -434,7 +434,7 @@
*
* @return void
*/
-function show_state_options($state, $user_mode = 0, $default = '')
+function show_state_options($state, $user_mode = 0, $default = '', $assigned = 0)
{
global $state_types;
@@ -451,9 +451,15 @@
if ($state != 'All' && $state_types[$state] == 1 && $user_mode == 2) {
switch ($state)
{
- /* If state was 'Feedback', set state to 'Open' automatically. */
+ /* If state was 'Feedback', set state automatically to 'Assigned' if the bug
was
+ * assigned to someone before it to be set to 'Feedback', otherwise set it to
'Open'.
+ */
case 'Feedback':
- echo "<option>Open</option>\n";
+ if ($assigned) {
+ echo "<option>Assigned</option>\n";
+ } else {
+ echo "<option>Open</option>\n";
+ }
break;
case 'No Feedback':
echo "<option>Re-Opened</option>\n";
Modified: web/php-bugs/trunk/www/bug.php
===================================================================
--- web/php-bugs/trunk/www/bug.php 2010-06-28 16:47:40 UTC (rev 300819)
+++ web/php-bugs/trunk/www/bug.php 2010-06-28 17:35:13 UTC (rev 300820)
@@ -719,7 +719,7 @@
<th class="details">Status:</th>
<td <?php echo (($edit != 1) ? 'colspan="3"' : '' );
?>>
<select name="in[status]">
- <?php show_state_options(isset($_POST['in']) &&
isset($_POST['in']['status']) ? $_POST['in']['status'] :
'', $edit, $bug['status']); ?>
+ <?php show_state_options(isset($_POST['in']) &&
isset($_POST['in']['status']) ? $_POST['in']['status'] :
'', $edit, $bug['status'], (isset($_POST['in']) &&
isset($_POST['in']['assign']))); ?>
</select>
<?php if ($edit == 1) { ?>