Permalink
Browse files

Code Standards/PHP Doc improvements

Improvements to code base to follow coding standards,
and improve phpdoc validation from PHP Codesniffer rules
  • Loading branch information...
1 parent 3a4ae91 commit 5458f7020999317b35f403fa2a0e477d6182ec12 @grangeway grangeway committed Jun 30, 2014
Showing with 10,187 additions and 10,605 deletions.
  1. +2 −2 account_delete.php
  2. +1 −1 account_manage_columns_page.php
  3. +4 −4 account_page.php
  4. +7 −6 account_prefs_inc.php
  5. +1 −1 account_prefs_update.php
  6. +3 −3 account_prof_edit_page.php
  7. +11 −10 account_prof_update.php
  8. +10 −10 account_sponsor_page.php
  9. +3 −3 account_sponsor_update.php
  10. +3 −3 account_update.php
  11. +0 −3 adm_config_delete.php
  12. +28 −37 adm_config_report.php
  13. +25 −28 adm_config_set.php
  14. +4 −7 adm_permissions_report.php
  15. +1 −3 admin/check/check_L10n_inc.php
  16. +1 −3 admin/check/check_anonymous_inc.php
  17. +28 −22 admin/check/check_api.php
  18. +4 −9 admin/check/check_attachments_inc.php
  19. +2 −4 admin/check/check_config_inc.php
  20. +1 −3 admin/check/check_crypto_inc.php
  21. +13 −28 admin/check/check_database_inc.php
  22. +5 −10 admin/check/check_display_inc.php
  23. +1 −3 admin/check/check_email_inc.php
  24. +1 −3 admin/check/check_i18n_inc.php
  25. +14 −17 admin/check/check_integrity_inc.php
  26. +1 −3 admin/check/check_paths_inc.php
  27. +4 −6 admin/check/check_php_inc.php
  28. +1 −0 admin/check/check_webservice_inc.php
  29. +2 −2 admin/check/index.php
  30. +6 −5 admin/db_stats.php
  31. +8 −9 admin/email_queue.php
  32. +5 −4 admin/index.php
  33. +64 −68 admin/install.php
  34. +8 −20 admin/move_attachments.php
  35. +2 −7 admin/move_attachments_page.php
  36. +203 −204 admin/schema.php
  37. +1 −3 admin/test_icons.php
  38. +76 −74 admin/test_langs.php
  39. +30 −33 admin/upgrade_unattended.php
  40. +10 −10 api/soap/mantisconnect.php
  41. +3 −3 api/soap/mc_account_api.php
  42. +127 −123 api/soap/mc_api.php
  43. +3 −3 api/soap/mc_config_api.php
  44. +5 −6 api/soap/mc_custom_field_api.php
  45. +48 −51 api/soap/mc_enum_api.php
  46. +30 −29 api/soap/mc_file_api.php
  47. +21 −19 api/soap/mc_filter_api.php
  48. +252 −236 api/soap/mc_issue_api.php
  49. +14 −14 api/soap/mc_issue_attachment_api.php
  50. +148 −144 api/soap/mc_project_api.php
  51. +16 −16 api/soap/mc_project_attachment_api.php
  52. +56 −52 api/soap/mc_tag_api.php
  53. +5 −5 api/soap/mc_user_pref_api.php
  54. +9 −9 api/soap/mc_user_profile_api.php
  55. +13 −13 billing_inc.php
  56. +3 −2 billing_page.php
  57. +14 −14 bug_actiongroup.php
  58. +5 −3 bug_actiongroup_add_note_inc.php
  59. +5 −3 bug_actiongroup_attach_tags_inc.php
  60. +2 −2 bug_actiongroup_ext.php
  61. +4 −2 bug_actiongroup_update_product_build_inc.php
  62. +4 −2 bug_actiongroup_update_severity_inc.php
  63. +3 −3 bug_change_status_page.php
  64. +1 −1 bug_file_delete.php
  65. +2 −2 bug_monitor_list_view_inc.php
  66. +2 −2 bug_relationship_delete.php
  67. +17 −12 bug_relationship_graph.php
  68. +5 −3 bug_relationship_graph_img.php
  69. +2 −2 bug_reminder.php
  70. +1 −1 bug_reminder_page.php
  71. +22 −22 bug_report.php
  72. +12 −13 bug_report_page.php
  73. +2 −2 bug_revision_view_page.php
  74. +5 −5 bug_set_sponsorship.php
  75. +2 −4 bug_sponsorship_list_view_inc.php
  76. +3 −3 bug_update.php
  77. +5 −9 bug_update_page.php
  78. +6 −6 bug_view_inc.php
  79. +1 −1 bugnote_add_inc.php
  80. +3 −3 bugnote_edit_page.php
  81. +6 −6 bugnote_stats_inc.php
  82. +9 −8 bugnote_view_inc.php
  83. +8 −8 changelog_page.php
  84. +7 −4 core.php
  85. +91 −96 core/access_api.php
  86. +56 −68 core/authentication_api.php
  87. +269 −301 core/bug_api.php
  88. +22 −15 core/bug_group_action_api.php
  89. +32 −34 core/bug_revision_api.php
  90. +103 −117 core/bugnote_api.php
  91. +89 −95 core/category_api.php
  92. +113 −109 core/cfdefs/cfdef_standard.php
  93. +14 −0 core/classes/IssueAssignedTimelineEvent.class.php
  94. +9 −0 core/classes/IssueCreatedTimelineEvent.class.php
  95. +10 −0 core/classes/IssueMonitorTimelineEvent.class.php
  96. +14 −0 core/classes/IssueNoteCreatedTimelineEvent.class.php
  97. +12 −1 core/classes/IssueStatusChangeTimelineEvent.class.php
  98. +11 −0 core/classes/IssueTagTimelineEvent.class.php
  99. +12 −10 core/classes/MantisColumn.class.php
  100. +3 −3 core/classes/MantisCorePlugin.class.php
  101. +38 −43 core/classes/MantisCoreWikiPlugin.class.php
  102. +23 −24 core/classes/MantisEnum.class.php
  103. +8 −7 core/classes/MantisFilter.class.php
  104. +13 −14 core/classes/MantisFormattingPlugin.class.php
  105. +14 −8 core/classes/MantisPlugin.class.php
  106. +12 −9 core/classes/MantisWikiPlugin.class.php
  107. +35 −1 core/classes/TimelineEvent.class.php
  108. +23 −25 core/collapse_api.php
  109. +293 −289 core/columns_api.php
  110. +10 −12 core/compress_api.php
  111. +100 −96 core/config_api.php
  112. +17 −17 core/constant_inc.php
  113. +5 −6 core/crypto_api.php
  114. +71 −67 core/csv_api.php
  115. +16 −13 core/current_user_api.php
  116. +182 −203 core/custom_field_api.php
  117. +61 −43 core/custom_function_api.php
  118. +199 −201 core/database_api.php
  119. +39 −41 core/date_api.php
  120. +185 −197 core/email_api.php
  121. +30 −43 core/email_queue_api.php
  122. +31 −31 core/error_api.php
  123. +52 −55 core/event_api.php
  124. +160 −156 core/excel_api.php
  125. +145 −159 core/file_api.php
  126. +340 −325 core/filter_api.php
  127. +1 −1 core/filter_constants_inc.php
  128. +8 −7 core/form_api.php
  129. +64 −68 core/gpc_api.php
  130. +49 −56 core/graphviz_api.php
  131. +85 −85 core/helper_api.php
  132. +46 −44 core/history_api.php
  133. +148 −153 core/html_api.php
  134. +13 −7 core/http_api.php
  135. +8 −8 core/icon_api.php
  136. +68 −66 core/install_helper_functions_api.php
  137. +19 −16 core/json_api.php
  138. +20 −20 core/lang_api.php
  139. +5 −4 core/last_visited_api.php
  140. +23 −23 core/ldap_api.php
  141. +17 −16 core/logging_api.php
  142. +45 −54 core/news_api.php
  143. +7 −7 core/php_api.php
  144. +109 −99 core/plugin_api.php
  145. +5 −5 core/prepare_api.php
  146. +341 −280 core/print_api.php
  147. +51 −61 core/profile_api.php
  148. +160 −200 core/project_api.php
  149. +59 −59 core/project_hierarchy_api.php
  150. +115 −131 core/relationship_api.php
  151. +27 −30 core/relationship_graph_api.php
  152. +17 −17 core/rss_api.php
  153. +50 −51 core/session_api.php
  154. +86 −110 core/sponsorship_api.php
  155. +135 −136 core/string_api.php
  156. +201 −202 core/summary_api.php
  157. +149 −172 core/tag_api.php
  158. +34 −6 core/timeline_api.php
  159. +1 −1 core/timeline_inc.php
  160. +45 −36 core/tokens_api.php
  161. +1 −2 core/url_api.php
  162. +267 −292 core/user_api.php
  163. +135 −149 core/user_pref_api.php
  164. +56 −46 core/utility_api.php
  165. +157 −167 core/version_api.php
  166. +5 −5 core/wiki_api.php
  167. +6 −6 core/workflow_api.php
  168. +8 −8 core/xmlhttprequest_api.php
  169. +0 −3 csv_export.php
  170. +0 −3 excel_xml_export.php
  171. +17 −19 file_download.php
  172. +11 −12 issues_rss.php
  173. +17 −20 javascript_config.php
  174. +7 −10 javascript_translations.php
  175. +0 −3 jump_to_bug.php
  176. +2 −2 login.php
  177. +7 −8 login_page.php
  178. +4 −4 login_select_proj_page.php
  179. +5 −5 lost_pwd.php
  180. +2 −2 main_page.php
  181. +29 −27 manage_config_email_page.php
  182. +2 −2 manage_config_email_set.php
  183. +3 −3 manage_config_revert.php
  184. +32 −25 manage_config_work_threshold_page.php
  185. +12 −9 manage_config_work_threshold_set.php
  186. +1 −1 manage_config_workflow_graph_page.php
  187. +28 −19 manage_config_workflow_page.php
  188. +10 −10 manage_config_workflow_set.php
  189. +2 −2 manage_custom_field_create.php
  190. +2 −2 manage_custom_field_delete.php
  191. +2 −2 manage_custom_field_proj_add.php
  192. +2 −2 manage_custom_field_update.php
  193. +3 −6 manage_plugin_page.php
  194. +3 −3 manage_proj_cat_copy.php
  195. +1 −1 manage_proj_create_page.php
  196. +15 −17 manage_proj_edit_page.php
  197. +1 −1 manage_proj_page.php
  198. +1 −1 manage_proj_user_copy.php
  199. +2 −2 manage_user_delete.php
  200. +1 −1 manage_user_edit_page.php
  201. +16 −19 manage_user_page.php
  202. +2 −2 manage_user_proj_add.php
  203. +6 −6 manage_user_prune.php
  204. +2 −2 manage_user_reset.php
  205. +12 −12 manage_user_update.php
  206. +8 −8 my_view_inc.php
  207. +17 −29 my_view_page.php
  208. +6 −6 news_edit_page.php
  209. +3 −3 news_list_page.php
  210. +40 −41 news_rss.php
  211. +6 −4 news_update.php
  212. +15 −13 plugins/MantisCoreFormatting/MantisCoreFormatting.php
  213. +2 −5 plugins/MantisCoreFormatting/pages/config.php
  214. +17 −9 plugins/MantisGraph/MantisGraph.php
  215. +109 −89 plugins/MantisGraph/core/Period.php
  216. +391 −389 plugins/MantisGraph/core/graph_api.php
  217. +41 −36 plugins/MantisGraph/pages/bug_graph_bycategory.php
  218. +32 −28 plugins/MantisGraph/pages/bug_graph_bystatus.php
  219. +7 −7 plugins/MantisGraph/pages/bug_graph_page.php
  220. +4 −4 plugins/MantisGraph/pages/config.php
  221. +1 −1 plugins/MantisGraph/pages/config_edit.php
  222. +1 −1 plugins/MantisGraph/pages/summary_graph_bypriority.php
  223. +1 −1 plugins/MantisGraph/pages/summary_graph_bypriority_mix.php
  224. +1 −1 plugins/MantisGraph/pages/summary_graph_bypriority_pct.php
  225. +1 −1 plugins/MantisGraph/pages/summary_graph_byresolution.php
  226. +1 −1 plugins/MantisGraph/pages/summary_graph_byseverity.php
  227. +1 −1 plugins/MantisGraph/pages/summary_graph_imp_category.php
  228. +2 −2 plugins/MantisGraph/pages/summary_graph_imp_priority.php
  229. +5 −5 plugins/MantisGraph/pages/summary_graph_imp_resolution.php
  230. +4 −4 plugins/MantisGraph/pages/summary_graph_imp_severity.php
  231. +3 −3 plugins/MantisGraph/pages/summary_graph_imp_status.php
  232. +3 −3 plugins/MantisGraph/pages/summary_jpgraph_page.php
  233. +45 −46 plugins/XmlImportExport/ImportXml.php
  234. +6 −4 plugins/XmlImportExport/ImportXml/Interface.php
  235. +77 −76 plugins/XmlImportExport/ImportXml/Issue.php
  236. +13 −11 plugins/XmlImportExport/ImportXml/Mapper.php
  237. +15 −11 plugins/XmlImportExport/XmlImportExport.php
  238. +74 −74 plugins/XmlImportExport/pages/export.php
  239. +1 −1 plugins/XmlImportExport/pages/import.php
  240. +2 −2 plugins/XmlImportExport/pages/import_action.php
  241. +50 −58 print_all_bug_options_inc.php
  242. +5 −5 print_all_bug_options_reset.php
  243. +6 −6 print_all_bug_options_update.php
  244. +16 −17 print_all_bug_page.php
  245. +6 −6 print_all_bug_page_word.php
  246. +2 −2 print_bug_page.php
  247. +10 −12 print_bugnote_inc.php
  248. +2 −3 proj_doc_delete.php
  249. +5 −8 proj_doc_edit_page.php
  250. +4 −4 proj_doc_page.php
  251. +8 −10 proj_doc_update.php
  252. +3 −3 project_page.php
  253. +2 −2 query_store.php
  254. +1 −1 query_view_page.php
  255. +3 −2 return_dynamic_filters.php
  256. +9 −7 roadmap_page.php
  257. +42 −42 search.php
  258. +2 −2 set_project.php
  259. +3 −3 signup.php
  260. +18 −18 summary_page.php
  261. +3 −4 tag_attach.php
  262. +1 −1 tag_create.php
  263. +1 −1 tag_update_page.php
  264. +3 −3 tag_view_page.php
  265. +6 −6 tests/AllTests.php
  266. +9 −11 tests/Mantis/AllTests.php
  267. +13 −1 tests/Mantis/EnumTest.php
  268. +10 −16 tests/Mantis/HelperTest.php
  269. +14 −19 tests/Mantis/StringTest.php
  270. +25 −23 tests/TestConfig.php
  271. +24 −26 tests/soap/AllTests.php
  272. +47 −64 tests/soap/AttachmentTest.php
  273. +34 −33 tests/soap/CategoryTest.php
  274. +6 −11 tests/soap/CompressionTest.php
  275. +102 −90 tests/soap/EnumTest.php
  276. +196 −257 tests/soap/FilterTest.php
  277. +186 −267 tests/soap/IssueAddTest.php
  278. +55 −80 tests/soap/IssueHistoryTest.php
  279. +47 −77 tests/soap/IssueMonitorTest.php
  280. +55 −114 tests/soap/IssueNoteTest.php
  281. +194 −304 tests/soap/IssueUpdateTest.php
  282. +33 −23 tests/soap/LoginTest.php
  283. +81 −76 tests/soap/ProjectTest.php
  284. +35 −33 tests/soap/RelationshipTest.php
  285. +48 −52 tests/soap/SoapBase.php
  286. +48 −48 tests/soap/TagTest.php
  287. +4 −4 tests/soap/UserTest.php
  288. +35 −34 tests/soap/VersionTest.php
  289. +5 −5 tests/test_config_get_set.php
  290. +2 −2 verify.php
  291. +1 −1 view.php
  292. +7 −7 view_all_bug_page.php
  293. +15 −15 view_all_inc.php
  294. +103 −104 view_all_set.php
  295. +7 −7 view_filters_page.php
  296. +4 −4 view_user_page.php
  297. +1 −1 workflow_graph_img.php
View
@@ -63,7 +63,7 @@
require_api( 'print_api.php' );
require_api( 'user_api.php' );
-form_security_validate('account_delete');
+form_security_validate( 'account_delete' );
auth_ensure_user_authenticated();
@@ -86,7 +86,7 @@
helper_ensure_confirmed( lang_get( 'confirm_delete_msg' ),
lang_get( 'delete_account_button' ) );
-form_security_purge('account_delete');
+form_security_purge( 'account_delete' );
$t_user_id = auth_get_current_user_id();
@@ -51,7 +51,7 @@
current_user_ensure_unprotected();
# Define constant that will be checked by the include page.
-define ( 'ACCOUNT_COLUMNS', true );
+define( 'ACCOUNT_COLUMNS', true );
define( 'MANAGE_COLUMNS_INC_ALLOW', true );
include ( dirname( __FILE__ ) . '/manage_columns_inc.php' );
View
@@ -78,7 +78,7 @@
#============ Permissions ============
auth_ensure_user_authenticated();
-if( !$t_account_verification ) {
+if( !$t_account_verification ) {
auth_reauthenticate();
}
@@ -88,9 +88,9 @@
# extracts the user information for the currently logged in user
# and prefixes it with u_
-$row = user_get_row( auth_get_current_user_id() );
+$t_row = user_get_row( auth_get_current_user_id() );
-extract( $row, EXTR_PREFIX_ALL, 'u' );
+extract( $t_row, EXTR_PREFIX_ALL, 'u' );
$t_ldap = ( LDAP == config_get( 'login_method' ) );
@@ -230,7 +230,7 @@
echo '<span class="display-label"><span>' . lang_get( 'assigned_projects' ) . '</span></span>';
echo '<div class="input">';
echo '<ul class="project-list">';
- foreach( $t_projects AS $t_project_id=>$t_project ) {
+ foreach( $t_projects as $t_project_id=>$t_project ) {
$t_project_name = string_attribute( $t_project['name'] );
$t_view_state = $t_project['view_state'];
$t_access_level = $t_project['access_level'];
View
@@ -56,12 +56,13 @@
/**
* Display html form to edit account preferences
*
- * @param int $p_user_id user id
- * @param bool $p_error_if_protected error if account is protected
- * @param bool $p_accounts_menu display account preferences menu
- * @param string $p_redirect_url redirect URI
+ * @param integer $p_user_id A valid user identifier.
+ * @param boolean $p_error_if_protected Whether to error if the account is protected.
+ * @param boolean $p_accounts_menu Display account preferences menu.
+ * @param string $p_redirect_url Redirect URI.
+ * @return void
*/
-function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_accounts_menu = true, $p_redirect_url = '') {
+function edit_account_prefs( $p_user_id = null, $p_error_if_protected = true, $p_accounts_menu = true, $p_redirect_url = '' ) {
if( null === $p_user_id ) {
$p_user_id = auth_get_current_user_id();
}
@@ -241,7 +242,7 @@ function edit_account_prefs($p_user_id = null, $p_error_if_protected = true, $p_
</fieldset>
<fieldset class="field-container">
<legend><label for="email-on-priority-change"><?php echo lang_get( 'email_on_priority_change' ) ?></label></legend>
- <span class="checkbox"><input id="email-on-priority-change" type="checkbox" name="email_on_priority" <?php check_checked( (int)$t_pref->email_on_priority , ON); ?> /></span>
+ <span class="checkbox"><input id="email-on-priority-change" type="checkbox" name="email_on_priority" <?php check_checked( (int)$t_pref->email_on_priority, ON ); ?> /></span>
<label for="email-on-priority-min-severity" class="email-on-severity-label"><span><?php echo lang_get( 'with_minimum_severity' ) ?></span></label>
<span class="select email-on-severity">
<select id="email-on-priority-min-severity" name="email_on_priority_min_severity">
View
@@ -107,7 +107,7 @@
$t_prefs->email_bugnote_limit = gpc_get_int( 'email_bugnote_limit' );
# make sure the delay isn't too low
-if(( config_get( 'min_refresh_delay' ) > $t_prefs->refresh_delay )&&
+if( ( config_get( 'min_refresh_delay' ) > $t_prefs->refresh_delay )&&
( $t_prefs->refresh_delay != 0 )) {
$t_prefs->refresh_delay = config_get( 'min_refresh_delay' );
}
@@ -63,12 +63,12 @@
if( profile_is_global( $f_profile_id ) ) {
access_ensure_global_level( config_get( 'manage_global_profile_threshold' ) );
- $row = profile_get_row( ALL_USERS, $f_profile_id );
+ $t_row = profile_get_row( ALL_USERS, $f_profile_id );
} else {
- $row = profile_get_row( auth_get_current_user_id(), $f_profile_id );
+ $t_row = profile_get_row( auth_get_current_user_id(), $f_profile_id );
}
-extract( $row, EXTR_PREFIX_ALL, 'v' );
+extract( $t_row, EXTR_PREFIX_ALL, 'v' );
html_page_top();
View
@@ -50,14 +50,15 @@
trigger_error( ERROR_ACCESS_DENIED, ERROR );
}
-form_security_validate('profile_update');
+form_security_validate( 'profile_update' );
auth_ensure_user_authenticated();
current_user_ensure_unprotected();
-$f_action = gpc_get_string('action');
-if( $f_action != 'add') {
+$f_action = gpc_get_string( 'action' );
+
+if( $f_action != 'add' ) {
$f_profile_id = gpc_get_int( 'profile_id' );
# Make sure user did select an existing profile from the list
@@ -69,7 +70,7 @@
switch ( $f_action ) {
case 'edit':
- form_security_purge('profile_update');
+ form_security_purge( 'profile_update' );
print_header_redirect( 'account_prof_edit_page.php?profile_id=' . $f_profile_id );
break;
@@ -91,7 +92,7 @@
}
profile_create( $t_user_id, $f_platform, $f_os, $f_os_build, $f_description );
- form_security_purge('profile_update');
+ form_security_purge( 'profile_update' );
if( ALL_USERS == $t_user_id ) {
print_header_redirect( 'manage_prof_menu_page.php' );
@@ -110,11 +111,11 @@
access_ensure_global_level( config_get( 'manage_global_profile_threshold' ) );
profile_update( ALL_USERS, $f_profile_id, $f_platform, $f_os, $f_os_build, $f_description );
- form_security_purge('profile_update');
+ form_security_purge( 'profile_update' );
print_header_redirect( 'manage_prof_menu_page.php' );
} else {
profile_update( auth_get_current_user_id(), $f_profile_id, $f_platform, $f_os, $f_os_build, $f_description );
- form_security_purge('profile_update');
+ form_security_purge( 'profile_update' );
print_header_redirect( 'account_prof_menu_page.php' );
}
break;
@@ -124,18 +125,18 @@
access_ensure_global_level( config_get( 'manage_global_profile_threshold' ) );
profile_delete( ALL_USERS, $f_profile_id );
- form_security_purge('profile_update');
+ form_security_purge( 'profile_update' );
print_header_redirect( 'manage_prof_menu_page.php' );
} else {
profile_delete( auth_get_current_user_id(), $f_profile_id );
- form_security_purge('profile_update');
+ form_security_purge( 'profile_update' );
print_header_redirect( 'account_prof_menu_page.php' );
}
break;
case 'make_default':
current_user_set_pref( 'default_profile', $f_profile_id );
- form_security_purge('profile_update');
+ form_security_purge( 'profile_update' );
print_header_redirect( 'account_prof_menu_page.php' );
break;
}
View
@@ -125,7 +125,7 @@
$t_result = db_query_bound( $t_query, $t_show_all ? array( $t_user ) : array( $t_user , $t_resolved ) );
$t_sponsors = array();
-while ( $t_row = db_fetch_array( $t_result ) ) {
+while( $t_row = db_fetch_array( $t_result ) ) {
$t_sponsors[] = $t_row;
}
@@ -160,7 +160,7 @@
<?php
$t_total_owing = 0;
$t_total_paid = 0;
- for ( $i = 0; $i < $t_sponsor_count; ++$i ) {
+ for( $i = 0; $i < $t_sponsor_count; ++$i ) {
$t_sponsor_row = $t_sponsors[$i];
$t_bug = bug_get( $t_sponsor_row['bug'] );
$t_sponsor = sponsorship_get( $t_sponsor_row['sponsor'] );
@@ -176,9 +176,9 @@
}
# choose color based on status
- $status_label = html_get_status_css_class( $t_bug->status, auth_get_current_user_id(), $t_bug->project_id );
+ $t_status_label = html_get_status_css_class( $t_bug->status, auth_get_current_user_id(), $t_bug->project_id );
- echo '<tr class="' . $status_label . '">';
+ echo '<tr class="' . $t_status_label . '">';
echo '<td><a href="' . string_get_bug_view_url( $t_sponsor_row['bug'] ) . '">' . bug_format_id( $t_sponsor_row['bug'] ) . '</a></td>';
echo '<td>' . string_display_line( project_get_field( $t_bug->project_id, 'name' ) ) . '&#160;</td>';
echo '<td class="right">' . $t_released_label . '&#160;</td>';
@@ -241,7 +241,7 @@
$t_result = db_query_bound( $t_query, $t_show_all ? array( $t_user ) : array( $t_user , $t_resolved ) );
$t_sponsors = array();
-while ( $t_row = db_fetch_array( $t_result ) ) {
+while( $t_row = db_fetch_array( $t_result ) ) {
$t_sponsors[] = $t_row;
}
@@ -278,7 +278,7 @@
$t_bug_list = array();
$t_total_owing = 0;
$t_total_paid = 0;
- for ( $i = 0; $i < $t_sponsor_count; ++$i ) {
+ for( $i = 0; $i < $t_sponsor_count; ++$i ) {
$t_sponsor_row = $t_sponsors[$i];
$t_bug = bug_get( $t_sponsor_row['bug'] );
$t_sponsor = sponsorship_get( $t_sponsor_row['sponsor'] );
@@ -295,9 +295,9 @@
}
# choose color based on status
- $status_label = html_get_status_css_class( $t_bug->status, auth_get_current_user_id(), $t_bug->project_id );
+ $t_status_label = html_get_status_css_class( $t_bug->status, auth_get_current_user_id(), $t_bug->project_id );
- echo '<tr class="' . $status_label . '">';
+ echo '<tr class="' . $t_status_label . '">';
echo '<td><a href="' . string_get_bug_view_url( $t_sponsor_row['bug'] ) . '">' . bug_format_id( $t_sponsor_row['bug'] ) . '</a></td>';
echo '<td>' . string_display_line( project_get_field( $t_bug->project_id, 'name' ) ) . '&#160;</td>';
echo '<td class="right">' . $t_released_label . '&#160;</td>';
@@ -315,7 +315,7 @@
print_user( $t_sponsor->user_id );
echo '</td>';
echo '<td class="right">' . sponsorship_format_amount( $t_sponsor->amount ) . '</td>';
- echo '<td><select name="sponsor_' . $row['bug'] . '_' . $t_sponsor->id . '">';
+ echo '<td><select name="sponsor_' . $t_row['bug'] . '_' . $t_sponsor->id . '">';
print_enum_string_option_list( 'sponsorship', $t_sponsor->paid );
echo '</select></td>';
@@ -359,7 +359,7 @@
<br />
<div>
<?php
-html_button ( 'account_sponsor_page.php',
+html_button( 'account_sponsor_page.php',
lang_get( ( $t_show_all ? 'sponsor_hide' : 'sponsor_show' ) ),
array( 'show_all' => ( $t_show_all ? 0 : 1 ) ) );
?>
@@ -60,16 +60,16 @@
$f_bug_list = gpc_get_string( 'buglist', '' );
$t_bug_list = explode( ',', $f_bug_list );
-foreach ( $t_bug_list as $t_bug ) {
+foreach( $t_bug_list as $t_bug ) {
list( $t_bug_id, $t_sponsor_id ) = explode( ':', $t_bug );
- $c_bug_id = (int) $t_bug_id;
+ $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_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 ) {
View
@@ -55,7 +55,7 @@
require_api( 'user_api.php' );
require_api( 'utility_api.php' );
-form_security_validate('account_update');
+form_security_validate( 'account_update' );
$t_user_id = auth_get_current_user_id();
@@ -78,7 +78,7 @@
$t_redirect_url = 'index.php';
-/** @todo Listing what fields were updated is not standard behaviour of MantisBT - it also complicates the code. */
+# @todo Listing what fields were updated is not standard behaviour of MantisBT - it also complicates the code.
$t_email_updated = false;
$t_password_updated = false;
$t_realname_updated = false;
@@ -125,7 +125,7 @@
}
}
-form_security_purge('account_update');
+form_security_purge( 'account_update' );
# Clear the verification token
if( $t_account_verification ) {
View
@@ -33,9 +33,6 @@
* @uses project_api.php
*/
-/**
- * MantisBT Core API's
- */
require_once( 'core.php' );
require_api( 'access_api.php' );
require_api( 'config_api.php' );
Oops, something went wrong.

0 comments on commit 5458f70

Please sign in to comment.