Permalink
Browse files

Consistency update

  • Loading branch information...
1 parent 7a111a5 commit 5cf7970fb208e616bea84e40c38b392251d88844 @grangeway grangeway committed Apr 7, 2009
Showing with 1,548 additions and 1,593 deletions.
  1. +43 −49 account_delete.php
  2. +5 −4 account_page.php
  3. +0 −1 account_prefs_inc.php
  4. +0 −1 account_prefs_page.php
  5. +0 −1 account_prefs_reset.php
  6. +2 −2 account_prof_menu_page.php
  7. +24 −24 account_sponsor_page.php
  8. +6 −6 account_sponsor_update.php
  9. +1 −1 adm_config_delete.php
  10. +3 −3 adm_config_report.php
  11. +4 −4 adm_config_set.php
  12. +4 −6 admin/check.php
  13. +1 −1 admin/schema.php
  14. +1 −1 admin/test_langs.php
  15. +2 −2 billing_inc.php
  16. +3 −3 billing_page.php
  17. +1 −1 browser_search_plugin.php
  18. +3 −3 bug_actiongroup.php
  19. +7 −7 bug_actiongroup_add_note_inc.php
  20. +7 −7 bug_actiongroup_attach_tags_inc.php
  21. +3 −3 bug_actiongroup_ext.php
  22. +0 −1 bug_actiongroup_ext_page.php
  23. +5 −5 bug_actiongroup_page.php
  24. +5 −5 bug_actiongroup_update_product_build_inc.php
  25. +1 −1 bug_assign.php
  26. +6 −6 bug_change_status_page.php
  27. +3 −2 bug_file_add.php
  28. +17 −17 bug_graph_bycategory.php
  29. +27 −28 bug_graph_bystatus.php
  30. +8 −8 bug_graph_page.php
  31. +2 −2 bug_monitor.php
  32. +6 −5 bug_monitor_list_view_inc.php
  33. +0 −1 bug_relationship_delete.php
  34. +2 −2 bug_relationship_graph.php
  35. +0 −1 bug_relationship_graph_img.php
  36. +1 −1 bug_reminder.php
  37. +6 −5 bug_report.php
  38. +9 −9 bug_report_advanced_page.php
  39. +6 −5 bug_report_page.php
  40. +2 −2 bug_set_sponsorship.php
  41. +0 −1 bug_sponsorship_list_view_inc.php
  42. +2 −3 bug_update.php
  43. +3 −3 bug_update_advanced_page.php
  44. +1 −1 bug_update_page.php
  45. +4 −5 bug_view_advanced_page.php
  46. +3 −3 bug_view_page.php
  47. +1 −1 bugnote_add.php
  48. +1 −1 bugnote_add_inc.php
  49. +1 −1 bugnote_stats_inc.php
  50. +7 −10 bugnote_view_inc.php
  51. +247 −235 changelog_page.php
  52. +544 −544 config_defaults_inc.php
  53. +6 −7 core.php
  54. +15 −15 core/access_api.php
  55. +1 −1 core/ajax_api.php
  56. +7 −7 core/authentication_api.php
  57. +1 −2 core/bug_api.php
  58. +3 −3 core/bug_group_action_api.php
  59. +1 −1 core/bugnote_api.php
  60. +7 −8 core/category_api.php
  61. +17 −17 core/classes/MantisEnum.class.php
  62. +7 −7 core/collapse_api.php
  63. +58 −58 core/columns_api.php
  64. +1 −1 core/compress_api.php
  65. +1 −1 core/config_api.php
  66. +2 −2 core/csv_api.php
  67. +7 −7 core/custom_field_api.php
  68. +7 −7 core/database_api.php
  69. +18 −18 core/date_api.php
  70. +7 −7 core/email_api.php
  71. +4 −4 core/error_api.php
  72. +5 −5 core/event_api.php
  73. +6 −6 core/file_api.php
  74. +1 −2 core/filter_api.php
  75. +3 −3 core/gpc_api.php
  76. +4 −4 core/graph_api.php
  77. +1 −1 core/graphviz_api.php
  78. +1 −1 core/helper_api.php
  79. +1 −1 core/history_api.php
  80. +3 −3 core/html_api.php
  81. +2 −2 core/lang_api.php
  82. +1 −1 core/logging_api.php
  83. +6 −6 core/print_api.php
  84. +2 −1 core/project_api.php
  85. +2 −2 core/summary_api.php
  86. +5 −5 core/tag_api.php
  87. +4 −5 core/user_api.php
  88. +4 −4 core/user_pref_api.php
  89. +1 −1 core/utility_api.php
  90. +2 −2 core/version_api.php
  91. +3 −3 core/wiki_api.php
  92. +1 −1 core/xmlhttprequest_api.php
  93. +0 −1 csv_export.php
  94. +0 −1 excel_xml_export.php
  95. +1 −2 file_download.php
  96. +9 −6 graphs/graph_by_daily_delta.php
  97. +1 −1 graphs/graph_by_release_delta.php
  98. +0 −1 history_inc.php
  99. +15 −16 index.php
  100. +5 −4 issues_rss.php
  101. +0 −1 jump_to_bug.php
  102. +1 −2 login.php
  103. +0 −1 login_anon.php
  104. +0 −1 login_cookie_test.php
  105. +6 −5 login_page.php
  106. +0 −1 logout_page.php
  107. +2 −1 lost_pwd.php
  108. +0 −1 lost_pwd_page.php
  109. +3 −3 main_page.php
  110. +0 −4 make_captcha_img.php
  111. +0 −1 manage_columns_copy.php
  112. +1 −2 manage_columns_inc.php
  113. +0 −1 manage_config_columns_page.php
  114. +19 −20 manage_config_email_page.php
  115. +2 −2 manage_config_email_set.php
  116. +4 −4 manage_config_revert.php
  117. +12 −12 manage_config_work_threshold_page.php
  118. +2 −2 manage_config_work_threshold_set.php
  119. +1 −1 manage_config_workflow_page.php
  120. +2 −2 manage_config_workflow_set.php
  121. +0 −1 manage_custom_field_proj_add.php
  122. +4 −4 manage_plugin_page.php
  123. +8 −9 manage_prof_menu_page.php
  124. +0 −1 manage_proj_cat_add.php
  125. +0 −1 manage_proj_cat_copy.php
  126. +1 −1 manage_proj_cat_edit_page.php
  127. +1 −1 manage_proj_cat_update.php
  128. +2 −2 manage_proj_create_page.php
  129. +2 −3 manage_proj_custom_field_copy.php
  130. +1 −1 manage_proj_custom_field_remove.php
  131. +0 −1 manage_proj_delete.php
  132. +5 −5 manage_proj_edit_page.php
  133. +2 −2 manage_proj_page.php
  134. +1 −1 manage_proj_subproj_add.php
  135. +1 −1 manage_proj_subproj_delete.php
  136. +0 −1 manage_proj_update.php
  137. +0 −1 manage_proj_user_add.php
  138. +0 −1 manage_proj_user_copy.php
  139. +0 −1 manage_proj_ver_copy.php
  140. +1 −1 manage_proj_ver_update.php
  141. +2 −2 manage_user_edit_page.php
  142. +18 −18 manage_user_page.php
  143. +0 −1 manage_user_proj_add.php
  144. +1 −3 manage_user_prune.php
  145. +2 −2 manage_user_reset.php
  146. +4 −4 manage_user_update.php
  147. +2 −2 my_view_page.php
  148. +9 −9 news_edit_page.php
  149. +3 −3 news_list_page.php
  150. +1 −1 news_menu_page.php
  151. +2 −2 news_rss.php
  152. +3 −3 permalink_page.php
  153. +0 −2 plugins/MantisCoreFormatting/MantisCoreFormatting.php
  154. +2 −1 print_all_bug_options_inc.php
  155. +2 −2 print_all_bug_options_page.php
  156. +5 −6 print_all_bug_page_word.php
  157. +6 −7 print_bug_page.php
  158. +0 −1 print_bugnote_inc.php
  159. +1 −1 proj_doc_delete.php
  160. +5 −5 proj_doc_page.php
  161. +2 −2 proj_doc_update.php
  162. +6 −6 project_page.php
  163. +0 −1 query_store.php
  164. +1 −1 query_view_page.php
  165. +0 −2 return_dynamic_filters.php
  166. +15 −14 roadmap_page.php
  167. +4 −2 scripts/checkin.php
  168. +1 −2 search.php
  169. +5 −5 set_project.php
  170. +2 −1 signup.php
  171. +0 −1 signup_page.php
  172. +0 −1 summary_graph_bycategory.php
  173. +1 −2 summary_graph_bycategory_pct.php
  174. +1 −1 summary_graph_bypriority_mix.php
  175. +1 −1 summary_graph_bypriority_pct.php
  176. +1 −1 summary_graph_byresolution.php
  177. +1 −1 summary_graph_byseverity.php
  178. +1 −1 summary_graph_byseverity_mix.php
  179. +1 −1 summary_graph_byseverity_pct.php
  180. +1 −1 summary_graph_bystatus.php
  181. +1 −1 summary_graph_bystatus_pct.php
  182. +3 −2 summary_jpgraph_page.php
  183. +6 −6 summary_page.php
  184. +3 −3 tag_attach.php
  185. +1 −1 tag_delete.php
  186. +1 −1 tag_detach.php
  187. +3 −3 tag_update.php
  188. +4 −4 tag_update_page.php
  189. +4 −4 tag_view_page.php
  190. +12 −12 tests/MantisEnumTest.php
  191. +0 −3 tests/test_config_get_set.php
  192. +1 −1 view_all_bug_page.php
  193. +3 −4 view_all_inc.php
  194. +5 −6 view_all_set.php
  195. +4 −4 view_filters_page.php
  196. +1 −1 view_user_page.php
  197. +1 −1 wiki.php
View
92 account_delete.php
@@ -14,69 +14,63 @@
# You should have received a copy of the GNU General Public License
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
- /**
- * CALLERS
- * This page is called from:
- * - account_page.php
- *
- * EXPECTED BEHAVIOUR
- * - Delete the currently logged in user account
- * - Logout the current user
- * - Redirect to the page specified in the logout_redirect_page config option
- *
- * CALLS
- * This page conditionally redirects upon completion
- *
- * RESTRICTIONS & PERMISSIONS
- * - User must be authenticated
- * - allow_account_delete config option must be enabled
- *
- * @package MantisBT
- * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
- * @copyright Copyright (C) 2002 - 2009 MantisBT Team - mantisbt-dev@lists.sourceforge.net
- * @link http://www.mantisbt.org
- */
- /**
- * MantisBT Core API's
- */
- require_once( 'core.php' );
+/**
+ * CALLERS
+ * This page is called from:
+ * - account_page.php
+ *
+ * EXPECTED BEHAVIOUR
+ * - Delete the currently logged in user account
+ * - Logout the current user
+ * - Redirect to the page specified in the logout_redirect_page config option
+ *
+ * CALLS
+ * This page conditionally redirects upon completion
+ *
+ * RESTRICTIONS & PERMISSIONS
+ * - User must be authenticated
+ * - allow_account_delete config option must be enabled
+ * @todo review form security tokens for this page
+ * @todo should page_top1 be before meta redirect?
+ *
+ * @package MantisBT
+ * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
+ * @copyright Copyright (C) 2002 - 2009 MantisBT Team - mantisbt-dev@lists.sourceforge.net
+ * @link http://www.mantisbt.org
+ */
+ /**
+ * MantisBT Core API's
+ */
+require_once( 'core.php' );
- #============ Parameters ============
- # (none)
+auth_ensure_user_authenticated();
- #============ Permissions ============
- # helper_ensure_post();
+current_user_ensure_unprotected();
- auth_ensure_user_authenticated();
+if ( OFF == config_get( 'allow_account_delete' ) ) {
+ print_header_redirect( 'account_page.php' );
+}
- current_user_ensure_unprotected();
+helper_ensure_confirmed( lang_get( 'confirm_delete_msg' ),
+ lang_get( 'delete_account_button' ) );
- if ( OFF == config_get( 'allow_account_delete' ) ) {
- print_header_redirect( 'account_page.php' );
- }
-?>
-<?php
- helper_ensure_confirmed( lang_get( 'confirm_delete_msg' ),
- lang_get( 'delete_account_button' ) );
-
- user_delete( auth_get_current_user_id() );
+user_delete( auth_get_current_user_id() );
- auth_logout();
+auth_logout();
- $t_redirect = config_get( 'logout_redirect_page' );
+html_meta_redirect( config_get( 'logout_redirect_page' ) );
- html_meta_redirect( $t_redirect );
-
- html_page_top1();
+html_page_top1();
?>
<br />
<div align="center">
<?php
- echo lang_get( 'operation_successful' ) . '<br />';
- print_bracket_link( $t_redirect, lang_get( 'proceed' ) );
+echo lang_get( 'operation_successful' ) . '<br />';
+print_bracket_link( $t_redirect, lang_get( 'proceed' ) );
?>
</div>
-<?php html_page_bottom( __FILE__ ) ?>
+<?php
+ html_page_bottom( __FILE__ );
View
9 account_page.php
@@ -71,7 +71,7 @@
# In case we're using LDAP to get the email address... this will pull out
# that version instead of the one in the DB
$u_email = user_get_email( $u_id, $u_username );
-
+
# note if we are being included by a script of a different name, if so,
# this is a mandatory password change request
$t_force_pw_reset = is_page_name( 'verify.php' );
@@ -83,8 +83,8 @@
<br />
<?php if ( $t_force_pw_reset ) { ?>
<center><div style="color:red; width:75%">
- <?php
- echo lang_get( 'verify_warning' );
+ <?php
+ echo lang_get( 'verify_warning' );
if ( helper_call_custom_function( 'auth_can_change_password', array() ) ) {
echo '<br />' . lang_get( 'verify_change_password' );
}
@@ -271,4 +271,5 @@
<?php } ?>
<?php # Delete Account Form END ?>
-<?php html_page_bottom( __FILE__ ) ?>
+<?php
+ html_page_bottom( __FILE__ );
View
1 account_prefs_inc.php
@@ -321,4 +321,3 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
<?php
} # end of edit_account_prefs()
-?>
View
1 account_prefs_page.php
@@ -63,4 +63,3 @@
edit_account_prefs();
html_page_bottom( __FILE__ );
-?>
View
1 account_prefs_reset.php
@@ -58,4 +58,3 @@
user_pref_set_default( $f_user_id );
print_header_redirect( $f_redirect_url, true, true );
-?>
View
4 account_prof_menu_page.php
@@ -129,9 +129,9 @@
<?php # Add Profile Form END ?>
<?php # Edit or Delete Profile Form BEGIN ?>
-<?php
+<?php
$t_profiles = profile_get_all_for_user( $t_user_id );
- if( $t_profiles ) {
+ if( $t_profiles ) {
?>
<br />
<div align="center">
View
48 account_sponsor_page.php
@@ -19,7 +19,7 @@
* This page is called from:
* - print_menu()
* - print_account_menu()
- *
+ *
* EXPECTED BEHAVIOUR
* - Display the user's current sponsorships
* - Allow the user to edit the payment flag
@@ -54,12 +54,12 @@
if ( current_user_is_anonymous() ) {
access_denied();
}
-
+
$t_show_all = gpc_get_bool( 'show_all', false );
# start the page
html_page_top( lang_get( 'my_sponsorship' ) );
-
+
$t_project = helper_get_current_project();
?>
<br />
@@ -80,17 +80,17 @@
$t_bug_table = db_get_table( 'mantis_bug_table' );
$t_sponsor_table = db_get_table( 'mantis_sponsorship_table' );
$t_payment = config_get( 'payment_enable', 0 );
-
+
$t_show_clause = $t_show_all ? '' : 'AND ( b.status < ' . $t_resolved . ' OR s.paid < ' . SPONSORSHIP_PAID . ')';
$t_project_clause = helper_project_specific_where( $t_project );
-
- $query = "SELECT b.id as bug, s.id as sponsor, s.paid, b.project_id, b.fixed_in_version, b.status
- FROM $t_bug_table b, $t_sponsor_table s
+
+ $query = "SELECT b.id as bug, s.id as sponsor, s.paid, b.project_id, b.fixed_in_version, b.status
+ FROM $t_bug_table b, $t_sponsor_table s
WHERE s.user_id=$t_user AND s.bug_id = b.id $t_show_clause AND $t_project_clause
ORDER BY s.paid ASC, b.project_id ASC, b.fixed_in_version ASC, b.status ASC, b.id DESC";
-
+
$result = db_query( $query );
-
+
$t_sponsors = db_num_rows( $result );
if ( 0 == $t_sponsors ) {
echo '<p>' . lang_get( 'no_own_sponsored' ) . '</p>';
@@ -119,14 +119,14 @@
<td class="form-title" width="7%"><?php echo lang_get( 'status' ) ?></td>
<td class="form-title" width="10%">&nbsp;</td>
</tr>
-<?php
+<?php
$t_total_owing = 0;
$t_total_paid = 0;
for ( $i=0; $i < $t_sponsors; ++$i ) {
$row = db_fetch_array( $result );
$t_bug = bug_get( $row['bug'] );
$t_sponsor = sponsorship_get( $row['sponsor'] );
-
+
# describe bug
$t_status = string_attribute( get_enum_element( 'status', $t_bug->status ) );
$t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution ) );
@@ -152,17 +152,17 @@
printf( ' <img src="%s" alt="(%s)" title="%s" />', $t_icon_path . 'protected.gif', lang_get( 'private' ), lang_get( 'private' ) );
}
echo '</td>';
-
+
# describe sponsorship amount
echo '<td class="right">' . sponsorship_format_amount( $t_sponsor->amount ) . '</td>';
echo '<td>' . get_enum_element( 'sponsorship', $t_sponsor->paid ) . '</td>';
-
+
if ( SPONSORSHIP_PAID == $t_sponsor->paid ) {
$t_total_paid += $t_sponsor->amount;
} else {
$t_total_owing += $t_sponsor->amount;
}
-
+
echo '<td>';
if ( $t_payment ) {
echo '(paypal button)';
@@ -190,11 +190,11 @@
</div>
<?php } # end sponsored issues
- $query = "SELECT b.id as bug, s.id as sponsor, s.paid, b.project_id, b.fixed_in_version, b.status
- FROM $t_bug_table b, $t_sponsor_table s
+ $query = "SELECT b.id as bug, s.id as sponsor, s.paid, b.project_id, b.fixed_in_version, b.status
+ FROM $t_bug_table b, $t_sponsor_table s
WHERE b.handler_id=$t_user AND s.bug_id = b.id $t_show_clause AND $t_project_clause
ORDER BY s.paid ASC, b.project_id ASC, b.fixed_in_version ASC, b.status ASC, b.id DESC";
-
+
$result = db_query( $query );
$t_sponsors = db_num_rows( $result );
if ( 0 == $t_sponsors ) {
@@ -224,7 +224,7 @@
<td class="form-title" width="10%"><?php echo lang_get( 'amount' ) ?></td>
<td class="form-title" width="10%"><?php echo lang_get( 'status' ) ?></td>
</tr>
-<?php
+<?php
$t_bug_list = array();
$t_total_owing = 0;
$t_total_paid = 0;
@@ -233,7 +233,7 @@
$t_bug = bug_get( $row['bug'] );
$t_sponsor = sponsorship_get( $row['sponsor'] );
$t_buglist[] = $row['bug'] . ':' . $row['sponsor'];
-
+
# describe bug
$t_status = string_attribute( get_enum_element( 'status', $t_bug->status ) );
$t_resolution = string_attribute( get_enum_element( 'resolution', $t_bug->resolution ) );
@@ -255,7 +255,7 @@
if ( VS_PRIVATE == $t_bug->view_state ) {
printf( ' <img src="%s" alt="(%s)" title="%s" />', $t_icon_path . 'protected.gif', lang_get( 'private' ), lang_get( 'private' ) );
}
-
+
# describe sponsorship amount
echo '<td>';
print_user( $t_sponsor->user_id );
@@ -264,14 +264,14 @@
echo '<td><select name="sponsor_' . $row['bug'] . '_' . $t_sponsor->id . '">';
print_enum_string_option_list( 'sponsorship', $t_sponsor->paid );
echo '</select></td>';
-
+
echo '</tr>';
if ( SPONSORSHIP_PAID == $t_sponsor->paid ) {
$t_total_paid += $t_sponsor->amount;
} else {
$t_total_owing += $t_sponsor->amount;
}
-
+
}
$t_hidden_bug_list = implode( ',', $t_buglist );
?>
@@ -305,8 +305,8 @@
<br />
<div align="center">
<?php
- html_button ( 'account_sponsor_page.php',
- lang_get( ( $t_show_all ? 'sponsor_hide' : 'sponsor_show' ) ),
+ html_button ( 'account_sponsor_page.php',
+ lang_get( ( $t_show_all ? 'sponsor_hide' : 'sponsor_show' ) ),
array( 'show_all' => ( $t_show_all ? 0 : 1 ) ) );
?>
</div>
View
12 account_sponsor_update.php
@@ -39,24 +39,24 @@
$f_bug_list = gpc_get_string( 'buglist', '' );
$t_bug_list = explode( ',', $f_bug_list );
-
+
foreach ( $t_bug_list as $t_bug ) {
list( $t_bug_id, $t_sponsor_id ) = explode( ':', $t_bug );
$c_bug_id = (int) $t_bug_id;
-
+
bug_ensure_exists( $c_bug_id ); # dies if bug doesn't exist
-
+
access_ensure_bug_level( config_get( 'handle_sponsored_bugs_threshold' ), $c_bug_id ); # dies if user can't handle bug
-
+
$t_bug = bug_get( $c_bug_id );
$t_sponsor = sponsorship_get( (int) $t_sponsor_id );
-
+
$t_new_payment = gpc_get_int( 'sponsor_' . $c_bug_id . '_' . $t_sponsor->id, $t_sponsor->paid );
if ( $t_new_payment != $t_sponsor->paid ) {
sponsorship_update_paid( $t_sponsor_id, $t_new_payment );
}
}
-
+
$t_redirect = 'account_sponsor_page.php';
html_page_top( null, $t_redirect );
View
2 adm_config_delete.php
@@ -48,4 +48,4 @@
config_delete( $f_config_option, $f_user_id, $f_project_id );
print_successful_redirect( 'adm_config_report.php' );
-?>
+
View
6 adm_config_report.php
@@ -68,7 +68,7 @@ function print_config_value_as_string( $p_type, $p_value ) {
$t_value = config_eval( $p_value );
break;
}
-
+
echo '<pre>';
if ( $t_corrupted ) {
@@ -173,7 +173,7 @@ function print_config_value_as_string( $p_type, $p_value ) {
<td class="form-title" colspan="2">
<?php echo lang_get( 'set_configuration_option' ) ?>
</td>
-</tr>
+</tr>
<tr <?php echo helper_alternate_class() ?> valign="top">
<td>
<?php echo lang_get( 'username' ) ?>
@@ -229,7 +229,7 @@ function print_config_value_as_string( $p_type, $p_value ) {
<td colspan="2">
<input type="submit" name="config_set" class="button" value="<?php echo lang_get( 'set_configuration_option' ) ?>" />
</td>
-</tr>
+</tr>
</table>
</form>
<?php
View
8 adm_config_set.php
@@ -36,7 +36,7 @@
$f_config_option = gpc_get_string( 'config_option' );
$f_type = gpc_get_string( 'type' );
$f_value = gpc_get_string( 'value' );
-
+
if ( is_blank( $f_config_option ) ) {
error_parameters( 'config_option' );
trigger_error( ERROR_EMPTY_FIELD, ERROR );
@@ -48,7 +48,7 @@
project_ensure_exists( $f_project_id );
access_ensure_project_level( config_get('set_configuration_threshold' ), $f_project_id );
}
-
+
# make sure that configuration option specified is a valid one.
$t_not_found_value = '***CONFIG OPTION NOT FOUND***';
if ( config_get_global( $f_config_option, $t_not_found_value ) === $t_not_found_value ) {
@@ -61,7 +61,7 @@
error_parameters( $f_config_option );
trigger_error( ERROR_CONFIG_OPT_CANT_BE_SET_IN_DB, ERROR );
}
-
+
if ( $f_type === 'default' ) {
$t_config_global_value = config_get_global( $f_config_option );
if ( is_string( $t_config_global_value ) ) {
@@ -111,7 +111,7 @@
print_successful_redirect( 'adm_config_report.php' );
- /**
+ /**
* Check if the passed string is a constant and return its value
*/
function constant_replace( $p_name ) {
View
10 admin/check.php
@@ -144,15 +144,13 @@ function check_zend_optimiser_version() {
$t_info = 'Zend Optimizer Detected - Unknown Version.';
$t_pass = false;
} else {
- $t_version = str_replace("v","",$t_version);
+ $t_version = str_replace("v","",$t_version);
$t_version = explode(".",$t_version);
$t_subVersion = $t_version[2];
$t_dummy = array_pop($t_version);
$t_version = implode(".",$t_version);
-
- if (($t_version > ZEND_OPTIMIZER_VERSION) || ($t_version==ZEND_OPTIMIZER_VERSION && $t_subVersion>=ZEND_OPTIMIZER_SUBVERSION)) {
- /* pass = true */
- } else {
+
+ if (!($t_version > ZEND_OPTIMIZER_VERSION) || ($t_version==ZEND_OPTIMIZER_VERSION && $t_subVersion>=ZEND_OPTIMIZER_SUBVERSION)) {
$t_pass = false;
$t_info = 'Fail - Installed Version: ' . $t_version . '.' . $t_subVersion . '.';
}
@@ -409,7 +407,7 @@ function check_zend_optimiser_version() {
require_once( $t_jpgraph_path . 'jpgraph.php' );
print_test_row( 'Checking Jpgraph version (if installed)...', version_compare(JPG_VERSION, '2.3.0') ? true : false, JPG_VERSION );
- }
+ }
print_test_row( 'check configuration: jpgraph (if used) requires php bundled gd for antialiasing support',
( config_get_global( 'jpgraph_antialias' ) == OFF || function_exists('imageantialias') ) );
View
2 admin/schema.php
@@ -369,7 +369,7 @@
/* apparently mysql now has a STRICT mode, where setting a DEFAULT value on a blob/text is now an error, instead of being silently ignored */
if ( isset( $f_db_type ) && ( $f_db_type == 'mysql' || $f_db_type == 'mysqli' ) ) {
$upgrade[] = Array('AlterColumnSQL', Array( db_get_table( 'mantis_custom_field_table' ), "possible_values X NOTNULL" ) );
-} else {
+} else {
$upgrade[] = Array('AlterColumnSQL', Array( db_get_table( 'mantis_custom_field_table' ), "possible_values X NOTNULL DEFAULT \" '' \"" ) );
}
View
2 admin/test_langs.php
@@ -93,7 +93,7 @@ function checklangdir( $p_path, $p_subpath = '' ) {
echo "Checking language files for plugin $file:<br />";
}
if( !is_dir( $p_path . DIRECTORY_SEPARATOR . $file ) && $p_subpath == 'lang' ) {
- checkfile( $p_path, $file );
+ checkfile( $p_path, $file );
} else {
if ( is_dir( $p_path . DIRECTORY_SEPARATOR . $file ) )
checklangdir( $p_path, $file);
View
4 billing_inc.php
@@ -37,7 +37,7 @@
<a name="bugnotestats" id="bugnotestats" /><br />
-<?php
+<?php
collapse_open( 'bugnotestats' );
$t_today = date( "d:m:Y" );
@@ -170,7 +170,7 @@
</td>
<?php } ?>
</tr>
-<?php } # end for loop
+<?php } # end for loop
?>
<tr <?php echo helper_alternate_class() ?>>
<td class="small-caption">
View
6 billing_page.php
@@ -24,7 +24,7 @@
* MantisBT Core API's
*/
require_once( 'core.php' );
-
+
$t_core_path = config_get( 'core_path' );
access_ensure_global_level( config_get( 'time_tracking_reporting_threshold' ) );
@@ -40,6 +40,6 @@
<?php
# Work break-down
include( $t_mantis_dir . 'billing_inc.php' );
-
+
html_page_bottom( __FILE__ );
-?>
+
View
2 browser_search_plugin.php
@@ -32,7 +32,7 @@
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<?php
-$t_path = config_get( 'path' );
+$t_path = config_get( 'path' );
if ( strtolower( $f_type ) == 'id' ) {
echo '<ShortName>MantisBT IssueId</ShortName>';
View
6 bug_actiongroup.php
@@ -37,7 +37,7 @@
$f_custom_field_id = gpc_get_int( 'custom_field_id', 0 );
$f_bug_arr = gpc_get_int_array( 'bug_arr', array() );
$f_bug_notetext = gpc_get_string( 'bugnote_text', '' );
- $f_bug_noteprivate = gpc_get_bool( 'private' );
+ $f_bug_noteprivate = gpc_get_bool( 'private' );
$t_form_name = 'bug_actiongroup_' . $f_action;
form_security_validate( $t_form_name );
@@ -182,7 +182,7 @@
if ( TRUE == bug_check_workflow($t_status, $f_status ) ) {
/** @todo we need to issue a helper_call_custom_function( 'issue_update_validate', array( $t_bug_id, $t_bug_data, $f_bugnote_text ) ); */
bug_set_field( $t_bug_id, 'status', $f_status );
-
+
# Add bugnote if supplied
if ( !is_blank( $f_bug_notetext ) ) {
bugnote_add( $t_bug_id, $f_bug_notetext, null, $f_bug_noteprivate );
@@ -211,7 +211,7 @@
$t_failed_ids[$t_bug_id] = lang_get( 'bug_actiongroup_access' );
}
break;
-
+
case 'UP_FIXED_IN_VERSION':
$f_fixed_in_version = gpc_get_string( 'fixed_in_version' );
$t_project_id = bug_get_field( $t_bug_id, 'project_id' );
View
14 bug_actiongroup_add_note_inc.php
@@ -22,20 +22,20 @@
*/
/**
- * Prints the title for the custom action page.
+ * Prints the title for the custom action page.
*/
function action_add_note_print_title() {
echo '<tr class="form-title">';
echo '<td colspan="2">';
echo lang_get( 'add_bugnote_title' );
- echo '</td></tr>';
+ echo '</td></tr>';
}
/**
* Prints the field within the custom action form. This has an entry for
* every field the user need to supply + the submit button. The fields are
* added as rows in a table that is already created by the calling code.
- * A row has two columns.
+ * A row has two columns.
*/
function action_add_note_print_fields() {
echo '<tr class="row-1" valign="top"><td class="category">', lang_get( 'add_bugnote_title' ), '</td><td><textarea name="bugnote_text" cols="80" rows="10"></textarea></td></tr>';
@@ -66,8 +66,8 @@ function action_add_note_print_fields() {
/**
* Validates the action on the specified bug id.
- *
- * @returns true|array Action can be applied., ( bug_id => reason for failure )
+ *
+ * @returns true|array Action can be applied., ( bug_id => reason for failure )
*/
function action_add_note_validate( $p_bug_id ) {
$f_bugnote_text = gpc_get_string( 'bugnote_text' );
@@ -96,9 +96,9 @@ function action_add_note_validate( $p_bug_id ) {
/**
* Executes the custom action on the specified bug id.
- *
+ *
* @param $p_bug_id The bug id to execute the custom action on.
- * @returns true|array Action executed successfully., ( bug_id => reason for failure )
+ * @returns true|array Action executed successfully., ( bug_id => reason for failure )
*/
function action_add_note_process( $p_bug_id ) {
$f_bugnote_text = gpc_get_string( 'bugnote_text' );
View
14 bug_actiongroup_attach_tags_inc.php
@@ -20,22 +20,22 @@
* @copyright Copyright (C) 2002 - 2009 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*/
-
+
$t_core_path = config_get( 'core_path' );
/**
* Requires Tag API
- */
+ */
require_once( $t_core_path . 'tag_api.php' );
/**
- * Prints the title for the custom action page.
+ * Prints the title for the custom action page.
*/
function action_attach_tags_print_title() {
echo '<tr class="form-title">';
echo '<td colspan="2">';
echo lang_get( 'tag_attach_long' );
- echo '</td></tr>';
+ echo '</td></tr>';
}
/**
@@ -61,7 +61,7 @@ function action_attach_tags_validate( $p_bug_id ) {
$f_tag_string = gpc_get_string( 'tag_string' );
$f_tag_select = gpc_get_string( 'tag_select' );
- global $g_action_attach_tags_attach, $g_action_attach_tags_create, $g_action_attach_tags_failed;
+ global $g_action_attach_tags_attach, $g_action_attach_tags_create, $g_action_attach_tags_failed;
$g_action_attach_tags_attach = array();
$g_action_attach_tags_create = array();
$g_action_attach_tags_failed = array();
@@ -89,7 +89,7 @@ function action_attach_tags_validate( $p_bug_id ) {
}
- global $g_action_attach_tags_attach, $g_action_attach_tags_create, $g_action_attach_tags_failed;
+ global $g_action_attach_tags_attach, $g_action_attach_tags_create, $g_action_attach_tags_failed;
return true;
}
@@ -100,7 +100,7 @@ function action_attach_tags_validate( $p_bug_id ) {
* @return boolean True if all tags attach properly
*/
function action_attach_tags_process( $p_bug_id ) {
- global $g_action_attach_tags_attach, $g_action_attach_tags_create;
+ global $g_action_attach_tags_attach, $g_action_attach_tags_create;
$t_user_id = auth_get_current_user_id();
View
6 bug_actiongroup_ext.php
@@ -49,16 +49,16 @@
foreach( $f_bug_arr as $t_bug_id ) {
bug_ensure_exists( $t_bug_id );
$t_bug = bug_get( $t_bug_id, true );
-
+
if ( isset( $t_projects_bugs[$t_bug->project_id] ) ) {
$t_projects_bugs[$t_bug->project_id][] = $t_bug_id;
} else {
$t_projects_bugs[$t_bug->project_id] = array( $t_bug_id );
}
}
-
+
$t_failed_ids = array();
-
+
# validate all bugs before we start the processing, we may fail the whole action
# group, or some of the bugs.
foreach( $t_projects_bugs as $t_project_id => $t_bug_ids ) {
View
1 bug_actiongroup_ext_page.php
@@ -72,4 +72,3 @@
<?php
bug_group_action_print_bug_list( $f_bug_arr );
bug_group_action_print_bottom();
-?>
View
10 bug_actiongroup_page.php
@@ -42,9 +42,9 @@
# run through the issues to see if they are all from one project
$t_project_id = ALL_PROJECTS;
$t_multiple_projects = false;
-
+
bug_cache_array_rows( $f_bug_arr );
-
+
foreach( $f_bug_arr as $t_bug_id ) {
$t_bug = bug_get( $t_bug_id );
if ( $t_project_id != $t_bug->project_id ) {
@@ -77,7 +77,7 @@
}
$t_custom_group_actions = config_get( 'custom_group_actions' );
-
+
foreach( $t_custom_group_actions as $t_custom_group_action ) {
if ( $f_action == $t_custom_group_action['action'] ) {
require_once( $t_custom_group_action['form_page'] );
@@ -173,7 +173,7 @@
$t_button_title = lang_get( 'view_status_group_bugs_button' );
$t_form = 'view_status';
break;
-
+
case 'UP_FIXED_IN_VERSION':
$t_question_title = lang_get( 'fixed_in_version_bugs_conf_msg' );
$t_button_title = lang_get( 'fixed_in_version_group_bugs_button' );
@@ -198,7 +198,7 @@
}
bug_group_action_print_top();
-
+
if ( $t_multiple_projects ) {
echo '<p class="bold">' . lang_get( 'multiple_projects' ) . '</p>';
}
View
10 bug_actiongroup_update_product_build_inc.php
@@ -22,7 +22,7 @@
*/
/**
- * Prints the title for the custom action page.
+ * Prints the title for the custom action page.
*/
function action_update_product_build_print_title() {
echo '<tr class="form-title">';
@@ -35,7 +35,7 @@ function action_update_product_build_print_title() {
* Prints the field within the custom action form. This has an entry for
* every field the user need to supply + the submit button. The fields are
* added as rows in a table that is already created by the calling code.
- * A row has two columns.
+ * A row has two columns.
*/
function action_update_product_build_print_fields() {
echo '<tr class="row-1" valign="top"><td class="category">', lang_get( 'product_build' ), '</td><td><input type="text" name="build" size="32" maxlength="32" /></td></tr>';
@@ -44,7 +44,7 @@ function action_update_product_build_print_fields() {
/**
* Validates the action on the specified bug id.
- *
+ *
* @param $p_bug_id Bug ID
* @return true|array Action can be applied., bug_id => reason for failure
*/
@@ -68,9 +68,9 @@ function action_update_product_build_validate( $p_bug_id ) {
/**
* Executes the custom action on the specified bug id.
- *
+ *
* @param $p_bug_id The bug id to execute the custom action on.
- * @returns true|array Action executed successfully., ( bug_id => reason for failure )
+ * @returns true|array Action executed successfully., ( bug_id => reason for failure )
*/
function action_update_product_build_process( $p_bug_id ) {
$f_build = gpc_get_string( 'build' );
View
2 bug_assign.php
@@ -35,7 +35,7 @@
$f_bug_id = gpc_get_int( 'bug_id' );
$t_bug = bug_get( $f_bug_id );
-
+
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...
# ... override the current project. This to avoid problems with categories and handlers lists etc.
View
12 bug_change_status_page.php
@@ -37,13 +37,13 @@
<?php
$f_bug_id = gpc_get_int( 'bug_id' );
$t_bug = bug_get( $f_bug_id );
-
+
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...
# ... override the current project. This to avoid problems with categories and handlers lists etc.
$g_project_override = $t_bug->project_id;
}
-
+
$f_new_status = gpc_get_int( 'new_status' );
$f_reopen_flag = gpc_get_int( 'reopen_flag', OFF );
@@ -125,7 +125,7 @@
</td>
<td>
<select name="resolution">
- <?php
+ <?php
$t_resolution = $t_bug_is_open ? FIXED : $t_current_resolution;
print_enum_string_option_list( "resolution", $t_resolution );
?>
@@ -188,8 +188,8 @@
<?php
/** @todo thraxisp - I undid part of the change for #5068 for #5527
* We really need to say what fields are shown in which statusses. For now,
- * this page will show required custom fields in update mode, or
- * display or required fields on resolve or close
+ * this page will show required custom fields in update mode, or
+ * display or required fields on resolve or close
*/
$t_custom_status_label = "update"; # Don't show custom fields by default
if ( ( $f_new_status == $t_resolved ) &&
@@ -206,7 +206,7 @@
$t_def = custom_field_get_definition( $t_id );
$t_display = $t_def['display_' . $t_custom_status_label];
$t_require = $t_def['require_' . $t_custom_status_label];
-
+
if ( ( "update" == $t_custom_status_label ) && ( !$t_require ) ) {
continue;
}
View
5 bug_file_add.php
@@ -40,7 +40,7 @@
# _POST/_FILES does not seem to get populated if you exceed size limit so check if bug_id is -1
trigger_error( ERROR_FILE_TOO_BIG, ERROR );
}
-
+
if ( !file_allow_bug_upload( $f_bug_id ) ) {
access_denied();
}
@@ -69,4 +69,5 @@
?>
</div>
-<?php html_page_bottom( __FILE__ ) ?>
+<?php
+ html_page_bottom( __FILE__ );
View
34 bug_graph_bycategory.php
@@ -38,7 +38,7 @@
$t_interval->set_period_from_selector( 'interval' );
$f_show_as_table = gpc_get_bool( 'show_table', FALSE );
$f_summary = gpc_get_bool( 'summary', FALSE );
-
+
$t_interval_days = $t_interval->get_elapsed_days();
if ( $t_interval_days <= 14 ) {
$t_incr = 60 * 60; // less than 14 days, use hourly
@@ -63,7 +63,7 @@
// no data to graph
exit();
}
-
+
$t_bug_table = db_get_table( 'mantis_bug_table' );
$t_bug_hist_table = db_get_table( 'mantis_bug_history_table' );
@@ -72,15 +72,15 @@
$t_ptr = 0;
$t_end = $t_interval->get_end_timestamp();
$t_start = $t_interval->get_start_timestamp();
-
+
$t_resolved = config_get( 'bug_resolved_status_threshold' );
$t_closed = CLOSED;
-
+
$t_bug = array();
$t_bug_cat = array(); // save categoties or bugs to look up resolved ones.
$t_category = array();
- // walk through all issues and grab their category for 'now'
+ // walk through all issues and grab their category for 'now'
$t_marker[$t_ptr] = time();
$t_data[$t_ptr] = array();
foreach ($rows as $t_row) {
@@ -93,7 +93,7 @@
$t_data[$t_ptr][$t_cat] ++;
} else {
$t_data[$t_ptr][$t_cat] = 1;
- $t_category[] = $t_cat;
+ $t_category[] = $t_cat;
}
}
$t_bug[] = $t_row['id'];
@@ -111,7 +111,7 @@
' order by date_modified DESC';
$t_result = db_query( $t_select );
$row = db_fetch_array( $t_result );
-
+
for ($t_now = time() - $t_incr; $t_now >= $t_start; $t_now -= $t_incr) {
// walk through the data points and use the data retrieved to update counts
while( ( $row !== false ) && ( db_unixtimestamp($row['date_modified']) >= $t_now ) ) {
@@ -125,7 +125,7 @@
$t_data[$t_ptr][$t_cat] --;
} else {
$t_data[$t_ptr][$t_cat] = 0;
- $t_category[] = $t_cat;
+ $t_category[] = $t_cat;
}
$t_cat = $row['old_value'];
if ($t_cat == '')
@@ -134,13 +134,13 @@
$t_data[$t_ptr][$t_cat] ++;
} else {
$t_data[$t_ptr][$t_cat] = 1;
- $t_category[] = $t_cat;
+ $t_category[] = $t_cat;
}
// change the category associated with the bug to match in case the bug was
// created during the scan
- $t_bug_cat[$row['bug_id']] = $t_cat;
+ $t_bug_cat[$row['bug_id']] = $t_cat;
} else { // change of status access_compare_level( $t_row['status'], $t_resolved )
- if ( access_compare_level( $row['new_value'], $t_resolved ) &&
+ if ( access_compare_level( $row['new_value'], $t_resolved ) &&
!access_compare_level( $row['old_value'], $t_resolved ) ) {
// transition from open to closed
$t_cat = $t_bug_cat[$row['bug_id']];
@@ -150,7 +150,7 @@
$t_data[$t_ptr][$t_cat] ++;
} else {
$t_data[$t_ptr][$t_cat] = 1;
- $t_category[] = $t_cat;
+ $t_category[] = $t_cat;
}
}
}
@@ -163,7 +163,7 @@
$t_data[$t_ptr][$t_cat] --;
} else {
$t_data[$t_ptr][$t_cat] = 0;
- $t_category[] = $t_cat;
+ $t_category[] = $t_cat;
}
break;
}
@@ -190,7 +190,7 @@
$t_not_zero = true;
break;
}
- }
+ }
if ( !$t_not_zero ) {
unset( $t_category[ $t ] );
}
@@ -215,8 +215,8 @@
foreach ( $t_category as $t_cat ) {
echo '<td>'.(isset($t_data[$t_ptr][$t_cat]) ? $t_data[$t_ptr][$t_cat] : 0).'</td>';
}
- echo '</tr>';
- }
+ echo '</tr>';
+ }
echo '</table>';
html_body_end();
html_end();
@@ -229,7 +229,7 @@
$i = 0;
foreach ( $t_category as $t_cat ) {
$t_metrics[++$i][$t_ptr] = isset($t_data[$t][$t_cat]) ? $t_data[$t][$t_cat] : 0;
- }
+ }
}
array_unshift( $t_category, '' ); // add placeholder
graph_bydate( $t_metrics, $t_category, lang_get( 'by_category' ), $f_width, $f_width * $t_ar );
View
55 bug_graph_bystatus.php
@@ -38,7 +38,7 @@
$t_interval->set_period_from_selector( 'interval' );
$f_show_as_table = gpc_get_bool( 'show_table', FALSE );
$f_summary = gpc_get_bool( 'summary', FALSE );
-
+
$t_interval_days = $t_interval->get_elapsed_days();
if ( $t_interval_days <= 14 ) {
$t_incr = 60 * 60; // less than 14 days, use hourly
@@ -63,7 +63,7 @@
// no data to graph
exit();
}
-
+
$t_bug_table = db_get_table( 'mantis_bug_table' );
$t_bug_hist_table = db_get_table( 'mantis_bug_history_table' );
@@ -72,22 +72,22 @@
$t_ptr = 0;
$t_end = $t_interval->get_end_timestamp();
$t_start = $t_interval->get_start_timestamp();
-
+
// grab all status levels
$t_status_arr = MantisEnum::getAssocArrayIndexedByValues( config_get( 'status_enum_string' ) );
$t_status_labels = MantisEnum::getAssocArrayIndexedByValues( lang_get( 'status_enum_string' ) );
-
+
$t_bug = array();
$t_view_status = array();
// walk through all issues and grab their status for 'now'
$t_marker[$t_ptr] = time();
foreach ($rows as $t_row) {
if ( isset( $t_data[$t_ptr][$t_row['status']] ) ) {
- $t_data[$t_ptr][$t_row['status']] ++;
+ $t_data[$t_ptr][$t_row['status']] ++;
} else {
$t_data[$t_ptr][$t_row['status']] = 1;
- $t_view_status[$t_row['status']] =
+ $t_view_status[$t_row['status']] =
isset($t_status_arr[$t_row['status']]) ? $t_status_arr[$t_row['status']] : '@'.$t_row['status'].'@';
}
$t_bug[] = $t_row['id'];
@@ -98,40 +98,40 @@
// type = 1 are new bugs
$t_select = 'SELECT bug_id, type, old_value, new_value, date_modified FROM '.$t_bug_hist_table.
' WHERE bug_id in ('.implode(',', $t_bug).
- ') and ( (type='.NORMAL_TYPE.' and field_name=\'status\')
+ ') and ( (type='.NORMAL_TYPE.' and field_name=\'status\')
or type='.NEW_BUG.' ) and date_modified >= \''.db_date( $t_start ).'\''.
' order by date_modified DESC';
$t_result = db_query( $t_select );
$t_row = db_fetch_array( $t_result );
-
+
for ($t_now = time() - $t_incr; $t_now >= $t_start; $t_now -= $t_incr) {
// walk through the data points and use the data retrieved to update counts
while( ( $t_row !== false ) && ( db_unixtimestamp($t_row['date_modified']) >= $t_now ) ) {
switch ($t_row['type']) {
case 0: // updated bug
if ( isset( $t_data[$t_ptr][$t_row['new_value']] ) ) {
if ( $t_data[$t_ptr][$t_row['new_value']] > 0 )
- $t_data[$t_ptr][$t_row['new_value']] --;
+ $t_data[$t_ptr][$t_row['new_value']] --;
} else {
$t_data[$t_ptr][$t_row['new_value']] = 0;
- $t_view_status[$t_row['new_value']] =
+ $t_view_status[$t_row['new_value']] =
isset($t_status_arr[$t_row['new_value']]) ? $t_status_arr[$t_row['new_value']] : '@'.$t_row['new_value'].'@';
}
if ( isset( $t_data[$t_ptr][$t_row['old_value']] ) ) {
- $t_data[$t_ptr][$t_row['old_value']] ++;
+ $t_data[$t_ptr][$t_row['old_value']] ++;
} else {
$t_data[$t_ptr][$t_row['old_value']] = 1;
- $t_view_status[$t_row['old_value']] =
+ $t_view_status[$t_row['old_value']] =
isset($t_status_arr[$t_row['old_value']]) ? $t_status_arr[$t_row['old_value']] : '@'.$t_row['old_value'].'@';
}
break;
case 1: // new bug
if ( isset( $t_data[$t_ptr][NEW_] ) ) {
if ( $t_data[$t_ptr][NEW_] > 0 )
- $t_data[$t_ptr][NEW_] --;
+ $t_data[$t_ptr][NEW_] --;
} else {
$t_data[$t_ptr][NEW_] = 0;
- $t_view_status[NEW_] =
+ $t_view_status[NEW_] =
isset($t_status_arr[NEW_]) ? $t_status_arr[NEW_] : '@'.NEW_.'@';
}
break;
@@ -147,20 +147,20 @@
}
}
}
-
+
ksort($t_view_status);
/* @todo - these should probably be separate strings, but in the summary page context,
the string is used as the title for all columns */
$t_label_string = lang_get('orct'); //use the (open/resolved/closed/total) label
$t_label_strings = explode('/', substr($t_label_string, 1, strlen($t_label_string)-2));
-
+
// add headers for table
if ($f_show_as_table) {
html_begin();
html_head_begin();
html_css();
html_content_type();
- html_title( lang_get( 'by_status' ) );
+ html_title( lang_get( 'by_status' ) );
html_head_end();
html_body_begin();
echo '<table class="width100"><tr><td></td>';
@@ -174,25 +174,25 @@
}
}
echo '</tr>';
- }
+ }
$t_resolved = config_get( 'bug_resolved_status_threshold' );
$t_closed = CLOSED;
$t_bin_count = $t_ptr;
$t_labels = array();
$i = 0;
if ($f_summary) {
-
+
$t_labels[++$i] = $t_label_strings[0];
$t_labels[++$i] = $t_label_strings[1];
$t_labels[++$i] = $t_label_strings[2];
} else {
foreach ( $t_view_status as $t_status => $t_label ) {
$t_labels[++$i] = isset($t_status_labels[$t_status]) ? $t_status_labels[$t_status] : lang_get_defaulted($t_label);
- }
- }
+ }
+ }
$t_label_count = $i;
-
+
// reverse the array and consolidate the data, if necessary
$t_metrics = array();
for ($t_ptr=0; $t_ptr<$t_bin_count; $t_ptr++) {
@@ -201,14 +201,14 @@
if ($f_summary) {
$t_metrics[1][$t_ptr] = 0;
$t_metrics[2][$t_ptr] = 0;
- $t_metrics[3][$t_ptr] = 0;
+ $t_metrics[3][$t_ptr] = 0;
foreach ( $t_view_status as $t_status => $t_label ) {
if ( isset( $t_data[$t][$t_status] ) ) {
if ( $t_status < $t_resolved )
$t_metrics[1][$t_ptr] += $t_data[$t][$t_status];
else if ( $t_status < $t_closed )
$t_metrics[2][$t_ptr] += $t_data[$t][$t_status];
- else
+ else
$t_metrics[3][$t_ptr] += $t_data[$t][$t_status];
}
}
@@ -219,15 +219,15 @@
$t_metrics[++$i][$t_ptr] = $t_data[$t][$t_status];
else
$t_metrics[++$i][$t_ptr] = 0;
- }
+ }
}
if ( $f_show_as_table ) {
echo '<tr class="row-'.($t_ptr%2+1).'"><td>'.$t_ptr.' ('.db_date( $t_metrics[0][$t_ptr] ).')'.'</td>';
for ( $i=1; $i<=$t_label_count; $i++ ) {
echo '<td>'.$t_metrics[$i][$t_ptr].'</td>';
}
- echo '</tr>';
- }
+ echo '</tr>';
+ }
}
if ($f_show_as_table) {
@@ -237,4 +237,3 @@
} else {
graph_bydate( $t_metrics, $t_labels, lang_get( 'by_status' ), $f_width, $f_width * $t_ar );
}
-?>
View
16 bug_graph_page.php
@@ -52,12 +52,12 @@
4 => lang_get( 'select_bycat'),
6 => lang_get( 'select_both')
);
-
+
$t_show = array(
0 => lang_get( 'show_as_graph' ),
1 => lang_get( 'show_as_table' ),
);
-
+
?>
<form name="graph_form" method="post" action="bug_graph_page.php">
<table class="width100" cellspacing="1">
@@ -80,32 +80,32 @@
</form>
<?php
// build the graphs if both an interval and graph type are selected
- if ( ( 0 != $f_type ) && ( $f_interval > 0 ) && ( gpc_get( 'show', '' ) != '') ) {
+ if ( ( 0 != $f_type ) && ( $f_interval > 0 ) && ( gpc_get( 'show', '' ) != '') ) {
$t_width = config_get( 'graph_window_width' );
$t_summary = ( $f_type % 2 ) != 0;
$t_body = (int)( $f_type / 2 );
$f_start = $t_period->get_start_formatted();
$f_end = $t_period->get_end_formatted();
if ( ($t_body == 1 ) || ($t_body == 3) ) {
if ( $f_show_as_table ) {
- echo '<br /><iframe src="bug_graph_bystatus.php?width='.$t_width.'&amp;interval=' . $f_interval .
+ echo '<br /><iframe src="bug_graph_bystatus.php?width='.$t_width.'&amp;interval=' . $f_interval .
'&amp;start_date=' . $f_start . '&amp;end_date=' . $f_end .
'&amp;summary=' . $t_summary . '&amp;show_table=1" width="100%" height="80%" frameborder="0"' .
' marginwidth="0" marginheight="0"></iframe>';
} else {
- echo '<br /><img src="bug_graph_bystatus.php?width=600&amp;interval=' . $f_interval .
+ echo '<br /><img src="bug_graph_bystatus.php?width=600&amp;interval=' . $f_interval .
'&amp;start_date=' . $f_start . '&amp;end_date=' . $f_end .
'&amp;summary=' . $t_summary . '&amp;show_table=0" alt="Bug Graph" />';
}
- }
+ }
if ( ($t_body == 2 ) || ($t_body == 3) ) {
if ( $f_show_as_table ) {
- echo '<br /><iframe src="bug_graph_bycategory.php?width='.$t_width.'&amp;interval=' . $f_interval .
+ echo '<br /><iframe src="bug_graph_bycategory.php?width='.$t_width.'&amp;interval=' . $f_interval .
'&amp;start_date=' . $f_start . '&amp;end_date=' . $f_end .
'&amp;summary=' . $t_summary . '&amp;show_table=1" width="100%" height="80%" frameborder="0"' .
' marginwidth="0" marginheight="0"></iframe>';
} else {
- echo '<br /><img src="bug_graph_bycategory.php?width=600&amp;interval=' . $f_interval .
+ echo '<br /><img src="bug_graph_bycategory.php?width=600&amp;interval=' . $f_interval .
'&amp;start_date=' . $f_start . '&amp;end_date=' . $f_end .
'&amp;summary=' . $t_summary . '&amp;show_table=0" alt="Bug Graph" />';
}
View
4 bug_monitor.php
@@ -37,7 +37,7 @@
$t_bug = bug_get( $f_bug_id, true );
$f_username = gpc_get_string( 'username', '' );
- $t_logged_in_user_id = auth_get_current_user_id();
+ $t_logged_in_user_id = auth_get_current_user_id();
if ( is_blank( $f_username ) ) {
$t_user_id = $t_logged_in_user_id;
@@ -58,7 +58,7 @@
$f_action = gpc_get_string( 'action' );
if ( $t_logged_in_user_id == $t_user_id ) {
- access_ensure_bug_level( config_get( 'monitor_bug_threshold' ), $f_bug_id );
+ access_ensure_bug_level( config_get( 'monitor_bug_threshold' ), $f_bug_id );
} else {
access_ensure_bug_level( config_get( 'monitor_add_others_bug_threshold' ), $f_bug_id );
}
View
11 bug_monitor_list_view_inc.php
@@ -24,7 +24,7 @@
* @link http://www.mantisbt.org
*/
- if ( access_has_bug_level( config_get( 'show_monitor_list_threshold' ), $f_bug_id ) ) {
+ if ( access_has_bug_level( config_get( 'show_monitor_list_threshold' ), $f_bug_id ) ) {
$c_bug_id = db_prepare_int( $f_bug_id );
$t_bug_monitor_table = db_get_table( 'mantis_bug_monitor_table' );
$t_user_table = db_get_table( 'mantis_user_table' );
@@ -66,12 +66,12 @@
if ( 0 == $num_users ) {
echo lang_get( 'no_users_monitoring_bug' );
} else {
- for ( $i = 0; $i < $num_users; $i++ ) {
+ for ( $i = 0; $i < $num_users; $i++ ) {
echo ($i > 0) ? ', ' : '';
echo print_user( $t_users[$i] );
}
}
-
+
echo '<br /><br />', lang_get( 'username' );
?>
<form method="get" action="bug_monitor.php">
@@ -84,7 +84,7 @@
</tr>
</table>
<?php
- collapse_closed( 'monitoring' );
+ collapse_closed( 'monitoring' );
?>
<table class="width100" cellspacing="1">
<tr>
@@ -97,4 +97,5 @@
collapse_end( 'monitoring' );
?>
-<?php } # show monitor list ?>
+<?php
+} # show monitor list
View
1 bug_relationship_delete.php
@@ -95,4 +95,3 @@
}
print_header_redirect_view( $f_bug_id );
-?>
View
4 bug_relationship_graph.php
@@ -81,8 +81,8 @@
<tr>
<!-- Title -->
<td class="form-title">
- <?php
- if ( $t_graph_relation )
+ <?php
+ if ( $t_graph_relation )
echo lang_get( 'viewing_bug_relationship_graph_title' );
else
echo lang_get( 'viewing_bug_dependency_graph_title' );
View
1 bug_relationship_graph_img.php
@@ -59,4 +59,3 @@
$t_graph = relgraph_generate_dep_graph( $f_bug_id, $t_bug, $t_graph_horizontal );
relgraph_output_image( $t_graph );
-?>
View
2 bug_reminder.php
@@ -89,5 +89,5 @@
print_bracket_link( string_get_bug_view_url( $f_bug_id ), lang_get( 'proceed' ) );
?>
</div>
-<?php
+<?php
html_page_bottom( __FILE__ );
View
11 bug_report.php
@@ -61,7 +61,7 @@
$t_bug_data->due_date = date_get_null();
} else {
$t_bug_data->due_date = db_unixtimestamp ( $t_bug_data->due_date, true ) + 1;
- }
+ }
$f_file = gpc_get_file( 'file', null ); /** @todo (thraxisp) Note that this always returns a structure */
# size = 0, if no file
@@ -152,11 +152,11 @@
if ( $f_rel_type >= 0 ) {
# Add the relationship
relationship_add( $t_bug_id, $f_master_bug_id, $f_rel_type );
-
+
# Add log line to the history (both issues)
history_log_event_special( $f_master_bug_id, BUG_ADD_RELATIONSHIP, relationship_get_complementary_type( $f_rel_type ), $t_bug_id );
history_log_event_special( $t_bug_id, BUG_ADD_RELATIONSHIP, $f_rel_type, $f_master_bug_id );
-
+
# Send the email notification
email_relationship_added( $f_master_bug_id, $t_bug_id, relationship_get_complementary_type( $f_rel_type ) );
}
@@ -170,7 +170,7 @@
event_signal( 'EVENT_REPORT_BUG', array( $t_bug_data, $t_bug_id ) );
form_security_purge( 'bug_report' );
-
+
html_page_top1();
if ( !$f_report_stay ) {
@@ -211,4 +211,5 @@
?>
</div>
-<?php html_page_bottom( __FILE__ ) ?>
+<?php
+ html_page_bottom( __FILE__ );
View
18 bug_report_advanced_page.php
@@ -22,9 +22,9 @@
* @copyright Copyright (C) 2002 - 2009 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*/
-
+
$g_allow_browser_cache = 1;
-
+
/**
* MantisBT Core API's
*/
@@ -178,8 +178,8 @@
echo "[" . project_get_field( $t_bug->project_id, 'name' ) . "] ";
} ?>
<select <?php echo helper_get_tab_index()