Skip to content

Commit

Permalink
Changes to bug object
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis committed Jun 12, 2009
1 parent 16677b0 commit 97b67e4
Show file tree
Hide file tree
Showing 23 changed files with 609 additions and 769 deletions.
2 changes: 1 addition & 1 deletion api/soap/mc_issue_api.php
Expand Up @@ -531,7 +531,7 @@ function mc_issue_add( $p_username, $p_password, $p_issue ) {
$t_bug_data->additional_information = isset( $p_issue['additional_information'] ) ? $p_issue['additional_information'] : '';

# submit the issue
$t_issue_id = bug_create( $t_bug_data );
$t_issue_id = $t_bug_data->create();

mci_issue_set_custom_fields( $t_issue_id, $p_issue['custom_fields'] );

Expand Down
2 changes: 1 addition & 1 deletion bug_relationship_graph.php
Expand Up @@ -60,7 +60,7 @@

access_ensure_bug_level( VIEWER, $f_bug_id );

$t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) );
$t_bug = bug_get( $f_bug_id, true );

if( $t_bug->project_id != helper_get_current_project() ) {
# in case the current project is not the same project of the bug we are viewing...
Expand Down
2 changes: 1 addition & 1 deletion bug_relationship_graph_img.php
Expand Up @@ -44,7 +44,7 @@

access_ensure_bug_level( VIEWER, $f_bug_id );

$t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) );
$t_bug = bug_get( $f_bug_id, true );

compress_enable();

Expand Down
2 changes: 1 addition & 1 deletion bug_report.php
Expand Up @@ -114,7 +114,7 @@
$t_bug_data = event_signal( 'EVENT_REPORT_BUG_DATA', $t_bug_data );

# Create the bug
$t_bug_id = bug_create( $t_bug_data );
$t_bug_id = $t_bug_data->create();

# Mark the added issue as visited so that it appears on the last visited list.
last_visited_issue( $t_bug_id );
Expand Down
12 changes: 6 additions & 6 deletions bug_report_advanced_page.php
Expand Up @@ -60,7 +60,7 @@
trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR );
}

$t_bug = bug_prepare_edit( bug_get( $f_master_bug_id, true ) );
$t_bug = bug_get( $f_master_bug_id, true );

# the user can at least update the master bug (needed to add the relationship)...
access_ensure_bug_level( config_get( 'update_bug_threshold', null, $t_bug->project_id ), $f_master_bug_id );
Expand Down Expand Up @@ -347,7 +347,7 @@
<?php echo lang_get( 'product_build' ) ?>
</td>
<td>
<input <?php echo helper_get_tab_index() ?> type="text" name="build" size="32" maxlength="32" value="<?php echo $f_build ?>" />
<input <?php echo helper_get_tab_index() ?> type="text" name="build" size="32" maxlength="32" value="<?php echo string_attribute( $f_build ) ?>" />
</td>
</tr>
<?php } ?>
Expand Down Expand Up @@ -390,31 +390,31 @@
<span class="required">*</span><?php print_documentation_link( 'summary' ) ?>
</td>
<td>
<input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="105" maxlength="128" value="<?php echo $f_summary ?>" />
<input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="105" maxlength="128" value="<?php echo string_attribute( $f_summary ) ?>" />
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<span class="required">*</span><?php print_documentation_link( 'description' ) ?>
</td>
<td>
<textarea <?php echo helper_get_tab_index() ?> name="description" cols="80" rows="10"><?php echo $f_description ?></textarea>
<textarea <?php echo helper_get_tab_index() ?> name="description" cols="80" rows="10"><?php echo string_textarea( $f_description ) ?></textarea>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php print_documentation_link( 'steps_to_reproduce' ) ?>
</td>
<td>
<textarea <?php echo helper_get_tab_index() ?> name="steps_to_reproduce" cols="80" rows="10"><?php echo $f_steps_to_reproduce ?></textarea>
<textarea <?php echo helper_get_tab_index() ?> name="steps_to_reproduce" cols="80" rows="10"><?php echo string_textarea( $f_steps_to_reproduce ) ?></textarea>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php print_documentation_link( 'additional_information' ) ?>
</td>
<td>
<textarea <?php echo helper_get_tab_index() ?> name="additional_info" cols="80" rows="10"><?php echo $f_additional_info ?></textarea>
<textarea <?php echo helper_get_tab_index() ?> name="additional_info" cols="80" rows="10"><?php echo string_textarea( $f_additional_info ) ?></textarea>
</td>
</tr>
<tr class="spacer">
Expand Down
8 changes: 4 additions & 4 deletions bug_report_page.php
Expand Up @@ -55,7 +55,7 @@
trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR );
}

$t_bug = bug_prepare_edit( bug_get( $f_master_bug_id, true ) );
$t_bug = bug_get( $f_master_bug_id, true );

# the user can at least update the master bug (needed to add the relationship)...
access_ensure_bug_level( config_get( 'update_bug_threshold', null, $t_bug->project_id ), $f_master_bug_id );
Expand Down Expand Up @@ -216,23 +216,23 @@
<span class="required">*</span><?php print_documentation_link( 'summary' ) ?>
</td>
<td>
<input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="105" maxlength="128" value="<?php echo $f_summary ?>" />
<input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="105" maxlength="128" value="<?php echo string_attribute( $f_summary ) ?>" />
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<span class="required">*</span><?php print_documentation_link( 'description' ) ?>
</td>
<td>
<textarea <?php echo helper_get_tab_index() ?> name="description" cols="80" rows="10"><?php echo $f_description ?></textarea>
<textarea <?php echo helper_get_tab_index() ?> name="description" cols="80" rows="10"><?php echo string_textarea( $f_description ) ?></textarea>
</td>
</tr>
<tr <?php echo helper_alternate_class() ?>>
<td class="category">
<?php print_documentation_link( 'additional_information' ) ?>
</td>
<td>
<textarea <?php echo helper_get_tab_index() ?> name="additional_info" cols="80" rows="10"><?php echo $f_additional_info ?></textarea>
<textarea <?php echo helper_get_tab_index() ?> name="additional_info" cols="80" rows="10"><?php echo string_textarea( $f_additional_info ) ?></textarea>
</td>
</tr>
<tr class="spacer">
Expand Down
2 changes: 1 addition & 1 deletion bug_update.php
Expand Up @@ -212,7 +212,7 @@
}

# Update the bug entry, notify if we haven't done so already
bug_update( $f_bug_id, $t_bug_data, true, ( false == $t_notify ) );
$t_bug_data->update( true, ( false == $t_notify ) );

form_security_purge( 'bug_update' );

Expand Down
14 changes: 7 additions & 7 deletions bug_update_advanced_page.php
Expand Up @@ -36,7 +36,7 @@

$f_bug_id = gpc_get_int( 'bug_id' );

$t_bug = bug_prepare_edit( bug_get( $f_bug_id, true ) );
$t_bug = bug_get( $f_bug_id, true );

if( $t_bug->project_id != helper_get_current_project() ) {
# in case the current project is not the same project of the bug we are viewing...
Expand Down Expand Up @@ -453,7 +453,7 @@
<?php echo lang_get( 'product_build' ); ?>
</td>
<td>
<input type="text" name="build" size="16" maxlength="32" value="<?php echo $t_bug->build ?>" />
<input type="text" name="build" size="16" maxlength="32" value="<?php echo string_attribute( $t_bug->build ) ?>" />
</td>
<?php } else { ?>
<td colspan="2"></td>
Expand Down Expand Up @@ -493,7 +493,7 @@
<?php echo lang_get( 'build' ) ?>
</td>
<td>
<input <?php echo helper_get_tab_index() ?> type="text" name="build" size="16" maxlength="32" value="<?php echo $t_bug->build ?>" />
<input <?php echo helper_get_tab_index() ?> type="text" name="build" size="16" maxlength="32" value="<?php echo string_attribute( $t_bug->build ) ?>" />
</td>

<?php
Expand Down Expand Up @@ -526,7 +526,7 @@
<?php echo lang_get( 'summary' ) ?>
</td>
<td colspan="5">
<input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="105" maxlength="128" value="<?php echo $t_bug->summary ?>" />
<input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="105" maxlength="128" value="<?php echo string_attribute( $t_bug->summary ) ?>" />
</td>
</tr>

Expand All @@ -537,7 +537,7 @@
<?php echo lang_get( 'description' ) ?>
</td>
<td colspan="5">
<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="description"><?php echo $t_bug->description ?></textarea>
<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="description"><?php echo string_textarea( $t_bug->description ) ?></textarea>
</td>
</tr>

Expand All @@ -548,7 +548,7 @@
<?php echo lang_get( 'steps_to_reproduce' ) ?>
</td>
<td colspan="5">
<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="steps_to_reproduce"><?php echo $t_bug->steps_to_reproduce ?></textarea>
<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="steps_to_reproduce"><?php echo string_textarea( $t_bug->steps_to_reproduce ) ?></textarea>
</td>
</tr>

Expand All @@ -559,7 +559,7 @@
<?php echo lang_get( 'additional_information' ) ?>
</td>
<td colspan="5">
<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="additional_information"><?php echo $t_bug->additional_information ?></textarea>
<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="additional_information"><?php echo string_textarea( $t_bug->additional_information ) ?></textarea>
</td>
</tr>

Expand Down
8 changes: 4 additions & 4 deletions bug_update_page.php
Expand Up @@ -35,7 +35,7 @@

$f_bug_id = gpc_get_int( 'bug_id' );

$t_bug = bug_prepare_edit( bug_get( $f_bug_id, true ) );
$t_bug = bug_get( $f_bug_id, true );

if( $t_bug->project_id != helper_get_current_project() ) {
# in case the current project is not the same project of the bug we are viewing...
Expand Down Expand Up @@ -321,7 +321,7 @@
<?php echo lang_get( 'summary' ) ?>
</td>
<td colspan="5">
<input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="105" maxlength="128" value="<?php echo $t_bug->summary ?>" />
<input <?php echo helper_get_tab_index() ?> type="text" name="summary" size="105" maxlength="128" value="<?php echo string_attribute( $t_bug->summary ) ?>" />
</td>
</tr>

Expand All @@ -332,7 +332,7 @@
<?php echo lang_get( 'description' ) ?>
</td>
<td colspan="5">
<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="description"><?php echo $t_bug->description ?></textarea>
<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="description"><?php echo string_textarea( $t_bug->description ) ?></textarea>
</td>
</tr>

Expand All @@ -343,7 +343,7 @@
<?php echo lang_get( 'additional_information' ) ?>
</td>
<td colspan="5">
<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="additional_information"><?php echo $t_bug->additional_information ?></textarea>
<textarea <?php echo helper_get_tab_index() ?> cols="80" rows="10" name="additional_information"><?php echo string_textarea( $t_bug->additional_information ) ?></textarea>
</td>
</tr>

Expand Down
26 changes: 13 additions & 13 deletions bug_view_advanced_page.php
Expand Up @@ -41,7 +41,7 @@

access_ensure_bug_level( VIEWER, $f_bug_id );

$t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) );
$t_bug = bug_get( $f_bug_id, true );

$t_selected_project = helper_get_current_project();
if( $t_bug->project_id != $t_selected_project ) {
Expand Down Expand Up @@ -303,7 +303,7 @@
<?php echo lang_get( 'platform' ) ?>
</td>
<td>
<?php echo $t_bug->platform ?>
<?php echo string_display_line( $t_bug->platform ) ?>
</td>
<?php } else {?>
<td colspan="2"></td>
Expand All @@ -330,7 +330,7 @@
<?php echo lang_get( 'os' ) ?>
</td>
<td>
<?php echo $t_bug->os ?>
<?php echo string_display_line( $t_bug->os ) ?>
</td>
<?php } else {?>
<td colspan="2"></td>
Expand Down Expand Up @@ -358,7 +358,7 @@
<?php echo lang_get( 'os_version' ) ?>
</td>
<td>
<?php echo $t_bug->os_build ?>
<?php echo string_display_line( $t_bug->os_build ) ?>
</td>
<?php } else {?>
<td colspan="2"></td>
Expand Down Expand Up @@ -404,7 +404,7 @@
<?php echo lang_get( 'fixed_in_version' ) ?>
</td>
<td>
<?php echo $t_bug->fixed_in_version ?>
<?php echo string_display_line( $t_bug->fixed_in_version ) ?>
</td>
<?php
} else {
Expand All @@ -421,7 +421,7 @@
<?php echo lang_get( 'product_version' ) ?>
</td>
<td>
<?php echo $t_bug->version ?>
<?php echo string_display_line( $t_bug->version ) ?>
</td>
<?php
} else if ( $t_show_build ) {
Expand All @@ -430,7 +430,7 @@
<?php echo lang_get( 'product_build' ) ?>
</td>
<td>
<?php echo $t_bug->build ?>
<?php echo string_display_line( $t_bug->build ) ?>
</td>
<?php
} else {
Expand Down Expand Up @@ -458,7 +458,7 @@
<?php echo lang_get( 'target_version' ) ?>
</td>
<td>
<?php echo $t_bug->target_version ?>
<?php echo string_display_line( $t_bug->target_version ) ?>
</td>
<?php
} else {
Expand All @@ -477,7 +477,7 @@
<?php echo lang_get( 'product_build' ) ?>
</td>
<td>
<?php echo $t_bug->build?>
<?php echo string_display_line( $t_bug->build ) ?>
</td>
<?php
} else {
Expand Down Expand Up @@ -519,7 +519,7 @@
<?php echo lang_get( 'description' ) ?>
</td>
<td colspan="5">
<?php echo $t_bug->description ?>
<?php echo string_display_links( $t_bug->description ) ?>
</td>
</tr>

Expand All @@ -530,7 +530,7 @@
<?php echo lang_get( 'steps_to_reproduce' ) ?>
</td>
<td colspan="5">
<?php echo $t_bug->steps_to_reproduce ?>
<?php echo string_display_links( $t_bug->steps_to_reproduce ) ?>
</td>
</tr>

Expand All @@ -541,7 +541,7 @@
<?php echo lang_get( 'additional_information' ) ?>
</td>
<td colspan="5">
<?php echo $t_bug->additional_information ?>
<?php echo string_display_links( $t_bug->additional_information ) ?>
</td>
</tr>

Expand Down Expand Up @@ -643,7 +643,7 @@
include( $t_mantis_dir . 'bug_sponsorship_list_view_inc.php' );

# Bug Relationships
relationship_view_box ( $f_bug_id );
relationship_view_box ( $t_bug );

# File upload box
if ( !bug_is_readonly( $f_bug_id ) ) {
Expand Down
6 changes: 3 additions & 3 deletions bug_view_inc.php
Expand Up @@ -27,7 +27,7 @@
require_once( 'bug_api.php' );
require_once( 'date_api.php' );

$t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) );
$t_bug = bug_get( $f_bug_id, true );
?>

<table class="width100" cellspacing="1">
Expand Down Expand Up @@ -203,7 +203,7 @@
<?php echo lang_get( 'description' ) ?>
</td>
<td colspan="5">
<?php echo $t_bug->description ?>
<?php echo string_display_links( $t_bug->description ) ?>
</td>
</tr>

Expand All @@ -214,7 +214,7 @@
<?php echo lang_get( 'additional_information' ) ?>
</td>
<td colspan="5">
<?php echo $t_bug->additional_information ?>
<?php echo string_display_links( $t_bug->additional_information ) ?>
</td>
</tr>

Expand Down

0 comments on commit 97b67e4

Please sign in to comment.