Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed date view and changed a few f_bug_id to f_id
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@116 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Dec 25, 2000
1 parent ad951b5 commit 5aa4744
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -20,6 +20,7 @@ To Do:
* Fixed another problem with the date created being updated improperly when
dealing with bugnotes.
* Fixed show source problem
* Fixed problem with advanced view showing the wrong dates
* Uncluttered large portions of code
* Reordered the config_inc.php file items
* Made view reported by and assigned to pages use variables.
Expand Down
2 changes: 1 addition & 1 deletion bug_reopen_page.php3
Expand Up @@ -59,7 +59,7 @@
<td bgcolor=<? echo $g_white_color ?>>
<table width=100%>
<form method=post action="<? echo $g_bugnote_add ?>">
<input type=hidden name=f_bug_id value="<? echo $f_id ?>">
<input type=hidden name=f_id value="<? echo $f_id ?>">
<tr>
<td bgcolor=<? echo $g_table_title_color ?>>
<b><? echo $s_reopen_add_bugnote_title ?></b>
Expand Down
2 changes: 1 addition & 1 deletion bug_resolve_page2.php3
Expand Up @@ -63,7 +63,7 @@
<td bgcolor=<? echo $g_white_color ?>>
<table width=100%>
<form method=post action="<? echo $g_bugnote_add ?>">
<input type=hidden name=f_bug_id value="<? echo $f_id ?>">
<input type=hidden name=f_id value="<? echo $f_id ?>">
<tr>
<td bgcolor=<? echo $g_table_title_color ?>>
<b><? echo $s_resolve_add_bugnote_title ?></b>
Expand Down
7 changes: 1 addition & 6 deletions bug_update.php3
Expand Up @@ -10,7 +10,7 @@
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

### Update all fields
### BUG IN MYSQL or PHP
### BUG IN MYSQL (I think) makes me need to update the date submitted as well
$query = "UPDATE $g_mantis_bug_table
SET category='$f_category', severity='$f_severity',
reproducibility='$f_reproducibility',
Expand All @@ -22,11 +22,6 @@
handler_id='$f_handler_id'
WHERE id='$f_id'";
$result = db_query($query);

$query = "UPDATE $g_mantis_bug_table
SET last_updated=NOW()
WHERE id='$f_id'";
$result = db_query($query);
?>
<? print_html_top() ?>
<? print_head_top() ?>
Expand Down
12 changes: 7 additions & 5 deletions bug_update_advanced_page.php3
Expand Up @@ -132,7 +132,7 @@
<td bgcolor=<? echo $g_category_title_color ?>>
<b><? echo $s_priority ?></b>
</td>
<td bgcolor=<? echo $g_primary_color_dark ?>>
<td align=left bgcolor=<? echo $g_primary_color_dark ?>>
<select name=f_priority>
<? print_field_option_list( "priority", $v_priority ) ?>
</select>
Expand All @@ -154,8 +154,10 @@
<td bgcolor=<? echo $g_category_title_color ?>>
<b><? echo $s_status ?></b>
</td>
<td bgcolor=<? echo $g_primary_color_light ?>>
<? echo $v_status ?>
<td align=left bgcolor=<? echo $g_primary_color_light ?>>
<select name=f_status>
<? print_field_option_list( "status", $v_status ) ?>
</select>
</td>
<td bgcolor=<? echo $g_category_title_color ?>>
<b><? echo $s_duplicate_id ?></b>
Expand All @@ -174,7 +176,7 @@
<td bgcolor=<? echo $g_category_title_color ?>>
<b><? echo $s_projection ?></b>
</td>
<td bgcolor=<? echo $g_primary_color_dark ?>>
<td align=left bgcolor=<? echo $g_primary_color_dark ?>>
<select name=f_projection>
<? print_field_option_list( "projection", $v_projection ) ?>
</select>
Expand All @@ -192,7 +194,7 @@
<td bgcolor=<? echo $g_category_title_color ?>>
<b><? echo $s_eta ?></b>
</td>
<td bgcolor=<? echo $g_primary_color_light ?>>
<td align=left bgcolor=<? echo $g_primary_color_light ?>>
<select name=f_eta>
<? print_field_option_list( "eta", $v_eta ) ?>
</select>
Expand Down
8 changes: 5 additions & 3 deletions bug_update_page.php3
Expand Up @@ -140,7 +140,7 @@
<td bgcolor=<? echo $g_category_title_color ?>>
<b><? echo $s_priority ?></b>
</td>
<td bgcolor=<? echo $g_primary_color_dark ?>>
<td align=left bgcolor=<? echo $g_primary_color_dark ?>>
<select name=f_priority>
<? print_field_option_list( "priority", $v_priority ) ?>
</select>
Expand All @@ -159,8 +159,10 @@
<td bgcolor=<? echo $g_category_title_color ?>>
<b><? echo $s_status ?></b>
</td>
<td bgcolor=<? echo $g_primary_color_light ?>>
<? echo $v_status ?>
<td align=left bgcolor=<? echo $g_primary_color_light ?>>
<select name=f_status>
<? print_field_option_list( "status", $v_status ) ?>
</select>
</td>
<td bgcolor=<? echo $g_category_title_color ?>>
<b><? echo $s_duplicate_id ?></b>
Expand Down
10 changes: 5 additions & 5 deletions bugnote_add.php3
Expand Up @@ -36,20 +36,20 @@
INTO $g_mantis_bugnote_table
( id, bug_id, reporter_id, bugnote_text_id, date_submitted, last_modified )
VALUES
( null, '$f_bug_id', '$u_id','$t_bugnote_text_id',NOW(), NOW() )";
( null, '$f_id', '$u_id','$t_bugnote_text_id',NOW(), NOW() )";
$result = db_query( $query );

### get date submitted (weird bug in mysql)
$query = "SELECT date_submitted
FROM $g_mantis_bug_table
WHERE id='$f_bug_id'";
WHERE id='$f_id'";
$result = db_query( $query );
$t_date_submitted = db_result( $result, 0 );

### update bug last updated
$query = "UPDATE $g_mantis_bug_table
SET date_submitted='$t_date_submitted', last_updated=NOW()
WHERE id='$f_bug_id'";
WHERE id='$f_id'";
$result = db_query($query);
?>
<? print_html_top() ?>
Expand All @@ -59,10 +59,10 @@
<?
if ( $result ) {
if ( get_current_user_profile_field( "advanced_view" )=="on" ) {
print_meta_redirect( "$g_view_bug_advanced_page?f_id=$f_bug_id", $g_wait_time );
print_meta_redirect( "$g_view_bug_advanced_page?f_id=$f_id", $g_wait_time );
}
else {
print_meta_redirect( "$g_view_bug_page?f_id=$f_bug_id", $g_wait_time );
print_meta_redirect( "$g_view_bug_page?f_id=$f_id", $g_wait_time );
}
}
?>
Expand Down
2 changes: 1 addition & 1 deletion bugnote_add_page.php3
Expand Up @@ -35,7 +35,7 @@
<td bgcolor=<? echo $g_white_color ?>>
<table width=100%>
<form method=post action="<? echo $g_bugnote_add ?>">
<input type=hidden name=f_bug_id value="<? echo $f_id ?>">
<input type=hidden name=f_id value="<? echo $f_id ?>">
<tr>
<td bgcolor=<? echo $g_table_title_color ?>>
<b><? echo $s_add_bugnote_title ?></b>
Expand Down
4 changes: 2 additions & 2 deletions view_bug_advanced_page.php3
Expand Up @@ -27,8 +27,8 @@
$v2_description = string_display_with_br( $v2_description );
$v2_steps_to_reproduce = string_display_with_br( $v2_steps_to_reproduce );
$v2_additional_information = string_display_with_br( $v2_additional_information );
$v_date_submitted = date( "m-d H:i", $v_date_submitted );
$v_last_updated = date( "m-d H:i", $v_last_updated );
$v_date_submitted = date( "m-d H:i", sql_to_unix_time( $v_date_submitted ) );
$v_last_updated = date( "m-d H:i", sql_to_unix_time( $v_last_updated ) );
?>
<? print_html_top() ?>
<? print_head_top() ?>
Expand Down

0 comments on commit 5aa4744

Please sign in to comment.