Author: Nikita Popov (nikic)
Date: 2021-10-28T21:10:04+02:00

Commit: 
https://github.com/php/web-bugs/commit/4efb5c3428e3633948371353b06f52401202af8f
Raw diff: 
https://github.com/php/web-bugs/commit/4efb5c3428e3633948371353b06f52401202af8f.diff

Disable submission of "Documentation Problem" bugs

Instead point people to the php/doc-en repository.

It's still possible to change the bug type to "Documentation
Problem" after it has been submitted, e.g. if it turns out a bug
is really a documentation issue.

Changed paths:
  M  include/functions.php
  M  www/bug.php
  M  www/report.php
  M  www/search.php
  M  www/stats.php


Diff:

diff --git a/include/functions.php b/include/functions.php
index bbfd4735..ac52b81c 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -457,11 +457,12 @@ function show_limit_options($limit = 30)
  * Options include "Bug", "Documentation Problem" and "Feature/Change Request."
  *
  * @param string    $current    bug's current type
- * @param bool        $all        whether or not 'All' should be an option
+ * @param bool      $deprecated whether or not deprecated types should be shown
+ * @param bool      $all        whether or not 'All' should be an option
  *
  * @retun void
  */
-function show_type_options($current = 'Bug', $all = false)
+function show_type_options($current, $deprecated, $all = false)
 {
     global $bug_types;
 
@@ -479,6 +480,9 @@ function show_type_options($current = 'Bug', $all = false)
     }
 
     foreach ($bug_types as $k => $v) {
+        if ($k === 'Documentation Problem' && !$deprecated) {
+            continue;
+        }
         $selected = strcasecmp($current, $k) ? '' : ' selected="selected"';
         $k = htmlentities($k, ENT_QUOTES);
         echo "<option value=\"$k\"$selected>$k</option>";
diff --git a/www/bug.php b/www/bug.php
index 66405fe9..433b5d5f 100644
--- a/www/bug.php
+++ b/www/bug.php
@@ -928,7 +928,7 @@
             <th class="details">Bug Type:</th>
             <td colspan="3">
                 <select name="in[bug_type]">
-                    <?php show_type_options($bug['bug_type']); ?>
+                    <?php show_type_options($bug['bug_type'], /* deprecated */ 
true); ?>
                 </select>
             </td>
         </tr>
diff --git a/www/report.php b/www/report.php
index ecc4a1e5..8b7e19b3 100644
--- a/www/report.php
+++ b/www/report.php
@@ -376,7 +376,11 @@
         <strong>Failure to follow these instructions may result in your bug 
simply being marked as &quot;not a bug.&quot;</strong>
     </p>
 
-    <p>Report <img src="images/pear_item.gif"><b>PEAR</b> related bugs <a 
href="https://pear.php.net/bugs/";>here</a></p>
+    <p style="background-color: #ffa;">
+        <strong>Documentation issues should now be reported on the <a 
href="https://github.com/php/doc-en/issues";>php/doc-en</a> repository.</strong>
+    </p>
+
+    <p>Report <img src="images/pear_item.gif"><b>PEAR</b> related bugs <a 
href="https://pear.php.net/bugs/";>here</a>.</p>
 
     <p>
         <strong>If you feel this bug concerns a security issue, e.g. a buffer 
overflow, weak encryption, etc, then email
@@ -445,7 +449,7 @@
                 <th class="form-label_left">Bug Type:</th>
                 <td class="form-input">
                     <select name="in[bug_type]">
-                        <?php show_type_options($_POST['in']['bug_type']); ?>
+                        <?php show_type_options($_POST['in']['bug_type'], /* 
deprecated */ false); ?>
                     </select>
                 </td>
             </tr>
diff --git a/www/search.php b/www/search.php
index e725c56e..38ad03b7 100644
--- a/www/search.php
+++ b/www/search.php
@@ -250,7 +250,7 @@
   <td style="white-space: nowrap">
    <label for="bug_type">Return bugs with <b>type</b></label>
   </td>
-  <td><select id="bug_type" name="bug_type"><?php show_type_options($bug_type, 
true);?></select></td>
+  <td><select id="bug_type" name="bug_type"><?php show_type_options($bug_type, 
/* deprecated */ true, /* all */ true);?></select></td>
 </tr>
 <tr valign="top">
   <th>Project</th>
diff --git a/www/stats.php b/www/stats.php
index 0a397366..5a374807 100644
--- a/www/stats.php
+++ b/www/stats.php
@@ -78,7 +78,7 @@
             <td style="white-space: nowrap">
                 <strong>Bug Type:</strong>
                 <select class="small" id="bug_type" name="bug_type" 
onchange="this.form.submit(); return false;">
-                    <?php show_type_options($bug_type, true) ?>
+                    <?php show_type_options($bug_type, /* deprecated */ true, 
/* all */ true) ?>
                 </select>
                 <input class="small" type="submit" name="submitStats" 
value="Search">
             </td>

-- 
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to