Skip to content
Permalink
Browse files

tidied up code

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@37 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information...
Kenzaburo Ito
Kenzaburo Ito committed Dec 7, 2000
1 parent 74afa9c commit 2eef26d2a78dfdc5247ee2058ad1e5124441a091
Showing with 23 additions and 28 deletions.
  1. +2 −0 ChangeLog
  2. +1 −0 bug_update.php3
  3. +0 −9 bug_update_page.php3
  4. +4 −6 bug_view_advanced_page.php3
  5. +16 −13 bug_view_all_page.php3
@@ -18,11 +18,13 @@ To Do:
* Complex bug criteria searching
* More documentation on installtion, configuration, and customization
* Add glyphs and icons as optional display feature
* Further document core_API.php

12.XX.2000 - 1.0.0

* Added summary by date
* Fixed bug with Bugnote Add button showing up i the wrong places
* Added priority on the summary page

12.06.2000 - 0.10.2

@@ -9,6 +9,7 @@
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
### Update all fields
$query = "UPDATE $g_mantis_bug_table
SET category='$f_category', severity='$f_severity',
reproducibility='$f_reproducibility',
@@ -314,15 +314,6 @@
</form>
</table>


<?
$id = $v_id;
$handler = $row["handler"];
$reproducibility = $row["reproducibility"];
$severity = $row["severity"];
$status = $row["status"];
?>

<? print_footer() ?>
<? print_body_bottom() ?>
<? print_html_bottom() ?>
@@ -20,12 +20,10 @@
$query = "SELECT *
FROM $g_mantis_user_table
WHERE cookie_string='$g_string_cookie_val'";
$result = mysql_query($query);
if ( $result ) {
$row = mysql_fetch_array($result);
if ( $row ) {
extract( $row, EXTR_PREFIX_ALL, "u" );
}
$result = db_mysql_query($query);
$row = mysql_fetch_array($result);
if ( $row ) {
extract( $row, EXTR_PREFIX_ALL, "u" );
}
$query = "SELECT *
@@ -17,7 +17,11 @@
<?
db_mysql_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
### check whether the user wanted to hide the results
$f_hide_resolved = $g_hide_resolved_val;
### basically we toggle between ASC and DESC if the user clicks the
### same sort order
if ( isset( $f_dir ) ) {
if ( $f_dir=="ASC" ) {
$f_dir = "DESC";
@@ -90,7 +94,7 @@
</td>
</tr>
<?
### $g_view_limit_cookie
### build our query string based on our viewing criteria
$query = "SELECT * FROM $g_mantis_bug_table";
if ( $g_hide_resolved_val=="on" ) {
$query = $query." WHERE status<>'resolved'";
@@ -103,11 +107,12 @@
$query = $query." LIMIT $g_view_limit_val";
}
### perform query
$result = db_mysql_query( $query );
$row_count = mysql_num_rows( $result );
for($i=0; $i < $row_count; $i++) {
### prefix bug data with v_
$row = mysql_fetch_array($result);
extract( $row, EXTR_PREFIX_ALL, "v" );
@@ -122,19 +127,17 @@
$status_color=$g_primary_color_dark;
}
if ( $v_status=="new" ) {
$status_color=$g_new_color;
}
if ( $v_status=="acknowledged" ) {
$status_color=$g_acknowledged_color;
}
if ( $v_status=="confirmed" ) {
$status_color=$g_confirmed_color;
}
if ( $v_status=="assigned" ) {
$status_color=$g_assigned_color;
### choose color based on status only if not resolved
### The code creates the appropriate variable name
### then references that color variable
### You could replace this with a bunch of if... then... else
#### statments
if ( $v_status!="resolved" ) {
$t = "g_".$v_status."_color";
$status_color = $$t;
}
### grab the bugnote count
$query2 = "SELECT COUNT(id)
FROM $g_mantis_bugnote_table
WHERE bug_id ='$v_id'";

0 comments on commit 2eef26d

Please sign in to comment.
You can’t perform that action at this time.