Skip to content

Commit

Permalink
Fixed bug_update to no longer cut off steps_to_reproduce if it has qu…
Browse files Browse the repository at this point in the history
…otation marks.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@825 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Mar 29, 2002
1 parent b616dcd commit 4107879
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 26 deletions.
35 changes: 24 additions & 11 deletions bug_update.php
Expand Up @@ -28,20 +28,34 @@
$t_bug_text_id = db_result( $result, 0, 0 );

# prevent warnings
if (!isset( $f_os )) {
$f_os = "";
if ( !isset( $f_os ) ) {
$f_os = get_bug_field( $f_id, "os" );
}
if (!isset( $f_os_build )) {
$f_os_build = "";
if ( !isset( $f_os_build ) ) {
$f_os_build = get_bug_field( $f_id, "os_build" );
}
if (!isset( $f_platform )) {
$f_platform = "";
if ( !isset( $f_platform ) ) {
$f_platform = get_bug_field( $f_id, "platform" );
}
if (!isset( $f_version )) {
$f_version = "";
if ( !isset( $f_version ) ) {
$f_version = get_bug_field( $f_id, "version" );
}
if (!isset( $f_build )) {
$f_build = "";
if ( !isset( $f_build ) ) {
$f_build = get_bug_field( $f_id, "build" );
}
if ( !isset( $f_eta ) ) {
$f_eta = get_bug_field( $f_id, "eta" );
}
if ( !isset( $f_projection ) ) {
$f_projection = get_bug_field( $f_id, "projection" );
}
if ( !isset( $f_resolution ) ) {
$f_resolution = get_bug_field( $f_id, "resolution" );
}
if ( !isset( $f_steps_to_reproduce ) ) {
$f_steps_to_reproduce = get_bug_text_field( $f_id, "steps_to_reproduce" );
} else {
$f_steps_to_reproduce = string_prepare_textarea( $f_steps_to_reproduce );
}

# prepare strings
Expand All @@ -52,7 +66,6 @@
$f_build = string_prepare_text( $f_build );
$f_summary = string_prepare_text( $f_summary );
$f_description = string_prepare_textarea( $f_description );
$f_steps_to_reproduce = string_prepare_textarea( $f_steps_to_reproduce );
$f_additional_information = string_prepare_textarea( $f_additional_information );

if ( ( $f_handler_id != 0 ) AND ( NEW_ == $f_status ) ) {
Expand Down
1 change: 0 additions & 1 deletion bug_update_advanced_page.php
Expand Up @@ -52,7 +52,6 @@
<input type="hidden" name="f_id" value="<?php echo $v_id ?>">
<input type="hidden" name="f_old_status" value="<?php echo $v_status ?>">
<input type="hidden" name="f_old_handler_id" value="<?php echo $v_handler_id ?>">
<input type="hidden" name="f_resolution" value="<?php echo $v_resolution ?>">
<tr>
<td class="form-title" colspan="3">
<?php echo $s_updating_bug_advanced_title ?>
Expand Down
14 changes: 0 additions & 14 deletions bug_update_page.php
Expand Up @@ -36,13 +36,8 @@
extract( $row, EXTR_PREFIX_ALL, "v2" );

# prepare strings for display
$v_os = string_display( $v_os );
$v_os_build = string_display( $v_os_build );
$v_platform = string_display( $v_platform );
$v_version = string_display( $v_version );
$v_summary = string_edit_text( $v_summary );
$v2_description = string_edit_textarea( $v2_description );
$v2_steps_to_reproduce = string_edit_textarea( $v2_steps_to_reproduce );
$v2_additional_information = string_edit_textarea( $v2_additional_information );
?>
<?php print_page_top1() ?>
Expand All @@ -54,15 +49,6 @@
<input type="hidden" name="f_id" value="<?php echo $v_id ?>">
<input type="hidden" name="f_old_status" value="<?php echo $v_status ?>">
<input type="hidden" name="f_old_handler_id" value="<?php echo $v_handler_id ?>">
<input type="hidden" name="f_resolution" value="<?php echo $v_resolution ?>">
<input type="hidden" name="f_projection" value="<?php echo $v_projection ?>">
<input type="hidden" name="f_eta" value="<?php echo $v_eta ?>">
<input type="hidden" name="f_os" value="<?php echo $v_os ?>">
<input type="hidden" name="f_os_build" value="<?php echo $v_os_build ?>">
<input type="hidden" name="f_platform" value="<?php echo $v_platform ?>">
<input type="hidden" name="f_version" value="<?php echo $v_version ?>">
<input type="hidden" name="f_build" value="<?php echo $v_build ?>">
<input type="hidden" name="f_steps_to_reproduce" value="<?php echo $v2_steps_to_reproduce ?>">
<tr>
<td class="form-title" colspan="3">
<?php echo $s_updating_bug_simple_title ?>
Expand Down
14 changes: 14 additions & 0 deletions core_helper_API.php
Expand Up @@ -44,6 +44,20 @@ function get_bug_field( $p_bug_id, $p_field_name ) {
return db_result( $result, 0 );
}
# --------------------
# Returns the specified field value of the specified bug text
function get_bug_text_field( $p_bug_id, $p_field_name ) {
global $g_string_cookie_val,
$g_mantis_bug_text_table;

$t_bug_text_id = get_bug_field( $p_bug_id, "bug_text_id" );
# get info
$query = "SELECT $p_field_name
FROM $g_mantis_bug_text_table
WHERE id='$t_bug_text_id'";
$result = db_query( $query );
return db_result( $result, 0 );
}
# --------------------
# checks to see if the category is a duplicate
# we do it this way because each different project can have the same category names
function is_duplicate_category( $p_category, $p_project_id ) {
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -7,6 +7,7 @@ Mantis
* Fixed some problems with BASIC_AUTH.
* Fixed problems with documentation links.
* Fixed a few documentation errors in configuration.html.
* Fixed bug_update to no longer cut off steps_to_reproduce if it has quotation marks.
* Modified accounts so that protected accounts are not accessible by the user.
* Modified report page formating.
* Modified file size reports to show up as bytes.
Expand Down

0 comments on commit 4107879

Please sign in to comment.