Permalink
Browse files

Changes to bug object

  • Loading branch information...
grangeway committed Jun 11, 2009
1 parent 16677b0 commit 97b67e4bbb2f2df5f6fb24eea5b4bb37e1c28acd
@@ -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'] );
@@ -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...
@@ -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();
View
@@ -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 );
@@ -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 );
@@ -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 } ?>
@@ -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">
View
@@ -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 );
@@ -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">
View
@@ -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' );
@@ -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...
@@ -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>
@@ -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
@@ -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>
@@ -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>
@@ -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>
@@ -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>
View
@@ -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...
@@ -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>
@@ -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>
@@ -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>
View
@@ -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 ) {
@@ -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>
@@ -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>
@@ -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>
@@ -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 {
@@ -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 ) {
@@ -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 {
@@ -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 {
@@ -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 {
@@ -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>
@@ -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>
@@ -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>
@@ -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 ) ) {
View
@@ -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">
@@ -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>
@@ -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>
Oops, something went wrong.

0 comments on commit 97b67e4

Please sign in to comment.