PageRenderTime 44ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/MantisBT/view_all_bug_page.php

https://bitbucket.org/crypticrod/sr_wp_code
PHP | 78 lines | 38 code | 17 blank | 23 comment | 3 complexity | 78917e19e25084436e67b4be73932a03 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1, GPL-3.0, LGPL-2.0, AGPL-3.0
  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 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net
  19. * @link http://www.mantisbt.org
  20. */
  21. /**
  22. * MantisBT Core API's
  23. */
  24. require_once( 'core.php' );
  25. require_once( 'compress_api.php' );
  26. require_once( 'filter_api.php' );
  27. require_once( 'last_visited_api.php' );
  28. auth_ensure_user_authenticated();
  29. $f_page_number = gpc_get_int( 'page_number', 1 );
  30. $t_per_page = null;
  31. $t_bug_count = null;
  32. $t_page_count = null;
  33. $rows = filter_get_bug_rows( $f_page_number, $t_per_page, $t_page_count, $t_bug_count, null, null, null, true );
  34. if ( $rows === false ) {
  35. print_header_redirect( 'view_all_set.php?type=0' );
  36. }
  37. $t_bugslist = Array();
  38. $t_users_handlers = Array();
  39. $t_project_ids = Array();
  40. $t_row_count = count( $rows );
  41. for($i=0; $i < $t_row_count; $i++) {
  42. array_push($t_bugslist, $rows[$i]->id );
  43. $t_users_handlers[] = $rows[$i]->handler_id;
  44. $t_project_ids[] = $rows[$i]->project_id;
  45. }
  46. $t_unique_users_handlers = array_unique( $t_users_handlers );
  47. $t_unique_project_ids = array_unique( $t_project_ids );
  48. user_cache_array_rows( $t_unique_users_handlers );
  49. project_cache_array_rows( $t_unique_project_ids );
  50. gpc_set_cookie( config_get( 'bug_list_cookie' ), implode( ',', $t_bugslist ) );
  51. compress_enable();
  52. # don't index view issues pages
  53. html_robots_noindex();
  54. html_page_top1( lang_get( 'view_bugs_link' ) );
  55. if ( current_user_get_pref( 'refresh_delay' ) > 0 ) {
  56. html_meta_redirect( 'view_all_bug_page.php?page_number='.$f_page_number, current_user_get_pref( 'refresh_delay' )*60 );
  57. }
  58. html_page_top2();
  59. print_recently_visited();
  60. include( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'view_all_inc.php' );
  61. html_page_bottom();