PageRenderTime 50ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/view_all_bug_page.php

https://github.com/markkimsal/mantisbt
PHP | 98 lines | 48 code | 17 blank | 33 comment | 3 complexity | c3e3053a2963cadf4f7657ee75390e5f MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
  1. <?php
  2. # MantisBT - A PHP based bugtracking system
  3. # MantisBT is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 2 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # MantisBT is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with MantisBT. If not, see <http://www.gnu.org/licenses/>.
  15. /**
  16. * @package MantisBT
  17. * @copyright Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
  18. * @copyright Copyright (C) 2002 - 2010 MantisBT Team - mantisbt-dev@lists.sourceforge.net
  19. * @link http://www.mantisbt.org
  20. *
  21. * @uses core.php
  22. * @uses authentication_api.php
  23. * @uses compress_api.php
  24. * @uses config_api.php
  25. * @uses current_user_api.php
  26. * @uses filter_api.php
  27. * @uses gpc_api.php
  28. * @uses html_api.php
  29. * @uses lang_api.php
  30. * @uses print_api.php
  31. * @uses project_api.php
  32. * @uses user_api.php
  33. */
  34. require_once( 'core.php' );
  35. require_api( 'authentication_api.php' );
  36. require_api( 'compress_api.php' );
  37. require_api( 'config_api.php' );
  38. require_api( 'current_user_api.php' );
  39. require_api( 'filter_api.php' );
  40. require_api( 'gpc_api.php' );
  41. require_api( 'html_api.php' );
  42. require_api( 'lang_api.php' );
  43. require_api( 'print_api.php' );
  44. require_api( 'project_api.php' );
  45. require_api( 'user_api.php' );
  46. auth_ensure_user_authenticated();
  47. $f_page_number = gpc_get_int( 'page_number', 1 );
  48. $t_per_page = null;
  49. $t_bug_count = null;
  50. $t_page_count = null;
  51. $rows = filter_get_bug_rows( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, null, null, null, true );
  52. if ( $rows === false ) {
  53. print_header_redirect( 'view_all_set.php?type=0' );
  54. }
  55. $t_bugslist = Array();
  56. $t_users_handlers = Array();
  57. $t_project_ids = Array();
  58. $t_row_count = count( $rows );
  59. for($i=0; $i < $t_row_count; $i++) {
  60. array_push($t_bugslist, $rows[$i]->id );
  61. $t_users_handlers[] = $rows[$i]->handler_id;
  62. $t_project_ids[] = $rows[$i]->project_id;
  63. }
  64. $t_unique_users_handlers = array_unique( $t_users_handlers );
  65. $t_unique_project_ids = array_unique( $t_project_ids );
  66. user_cache_array_rows( $t_unique_users_handlers );
  67. project_cache_array_rows( $t_unique_project_ids );
  68. gpc_set_cookie( config_get( 'bug_list_cookie' ), implode( ',', $t_bugslist ) );
  69. compress_enable();
  70. # don't index view issues pages
  71. html_robots_noindex();
  72. html_page_top1( lang_get( 'view_bugs_link' ) );
  73. html_javascript_link( 'bugFilter.js' );
  74. if ( current_user_get_pref( 'refresh_delay' ) > 0 ) {
  75. html_meta_redirect( 'view_all_bug_page.php?page_number='.$f_page_number, current_user_get_pref( 'refresh_delay' )*60 );
  76. }
  77. html_page_top2();
  78. print_recently_visited();
  79. define( 'VIEW_ALL_INC_ALLOW', true );
  80. include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'view_all_inc.php' );
  81. html_page_bottom();