diff --git a/bugs.php b/bugs.php index abb2a9958..747ee956e 100644 --- a/bugs.php +++ b/bugs.php @@ -128,52 +128,164 @@ function show_menu($state) echo "Feature/Change requests must be explicitly selected to be shown\n"; } +### show_types significantly modified by j.a.greant 00/09/05 function show_types($first_item,$show_any,$var_name) { - $items = array("Any", - "Documentation problem", - "Installation problem", - "Compile Failure", - "Compile Warning", - "Scripting Engine problem", - "Reproduceable crash", - "Performance problem", - "cURL related", - "Dynamic loading related", - "MySQL related", - "mSQL related", - "MSSQL related", - "PostgreSQL related", - "ODBC related", - "Oracle related", - "Sybase-ct (ctlib) related", - "Sybase (dblib) related", - "Solid related", - "Adabas-D related", - "Informix related", - "dBase related", - "Session related", - "WDDX related", - "IMAP related", - "LDAP related", - "NIS related", - "DBM/DBA related", - "mcrypt related", - "mhash related", - "Misbehaving function", - "FrontPage related", - "Feature/Change Request", - "Other"); + $items = array ("Any" => "Any", + "*General Issues" => "General Issues", + "Feature/Change Request" => "    Feature/Change Request", + "Documentation problem" => "    Documentation problem", + "Reproduceable crash" => "    Reproduceable crash", + "Scripting Engine problem" => "    Scripting Engine problem", + "Performance problem" => "    Performance problem", + "*Install and Config" => "Install and Config", + "Compile Problem" => "    Compile Problem", + "Compile Failure" => "         Compile Failure", + "Compile Warning" => "         Compile Warning", - echo "\n"; + + foreach ($items as $key => $value) + { + if ($show_any || $value != 'Any') { + print "\n"; } } - echo "\n"; + + print "\n"; } function find_password($user) { @@ -398,6 +510,7 @@ if (isset($cmd) && $cmd == "Send bug report") { function get_old_comments ($bug_id) { $divider = '---------------------------------------------------------------------------'; + $max_message_length = 10 * 1024; #fetch comments $result = mysql_query ("SELECT ts, email, comment from bugdb_comments where bug = $bug_id order by ts desc"); @@ -413,7 +526,14 @@ if (isset($cmd) && $cmd == "Send bug report") { $comments[] = mysql_fetch_row ($result); foreach ($comments as $value) + { $output .= "[$value[0]] $value[1]\n$value[2]\n\n$divider\n\n"; + if (strlen ($output) > $max_message_length) + { + $output .= "The remainder of the comments for this report are over the " . round ($max_message_length/1024) . "k message limit. To view the remainder of the comments, please review the bug report online."; + break; + } + } if ($output) return "\n\nPrevious Comments:\n\n" . $output;