Skip to content
Browse files

Removed some direct references to cookies + checking return value for…

… filter_get_bug_rows()

M csv_export.php
M logout_page.php
M print_all_bug_page_excel.php
M view_all_bug_page.php
M core/print_api.php


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2594 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information...
1 parent ddd2f83 commit afdf92d2e776bfe6294b1191e78c3fd47afeb076 @vboctor vboctor committed with vboctor May 30, 2004
Showing with 25 additions and 27 deletions.
  1. +2 −3 core/print_api.php
  2. +12 −9 csv_export.php
  3. +1 −4 logout_page.php
  4. +4 −8 print_all_bug_page_excel.php
  5. +6 −3 view_all_bug_page.php
View
5 core/print_api.php
@@ -6,7 +6,7 @@
# See the README and LICENSE files for details
# --------------------------------------------------------
- # $Id: print_api.php,v 1.85 2004-05-28 00:21:02 int2str Exp $
+ # $Id: print_api.php,v 1.86 2004-05-30 01:49:31 vboctor Exp $
# --------------------------------------------------------
$t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;
@@ -409,8 +409,7 @@ function print_profile_option_list( $p_user_id, $p_select_id='' ) {
}
# --------------------
function print_news_project_option_list( $p_project_id ) {
- global $g_mantis_project_table, $g_mantis_project_user_list_table,
- $g_project_cookie;
+ global $g_mantis_project_table, $g_mantis_project_user_list_table;
if ( access_has_project_level( ADMINISTRATOR ) ) {
$query = "SELECT *
View
21 csv_export.php
@@ -6,7 +6,7 @@
# See the README and LICENSE files for details
# --------------------------------------------------------
- # $Id: csv_export.php,v 1.18 2004-04-08 11:05:11 vboctor Exp $
+ # $Id: csv_export.php,v 1.19 2004-05-30 01:49:31 vboctor Exp $
# --------------------------------------------------------
?>
<?php
@@ -24,13 +24,6 @@
print_header_redirect( 'view_all_set.php?type=0' );
}
- $t_filename = csv_get_default_filename();
-
- # Send headers to browser to activate mime loading
- header( 'Content-Type: text/plain; name=' . $t_filename );
- header( 'Content-Transfer-Encoding: BASE64;' );
- header( 'Content-Disposition: attachment; filename=' . $t_filename );
-
$t_page_number = 1;
$t_per_page = -1;
$t_bug_count = null;
@@ -41,6 +34,16 @@
# Get bug rows according to the current filter
$rows = filter_get_bug_rows( $t_page_number, $t_per_page, $t_page_count, $t_bug_count );
+ if ( $rows === false ) {
+ print_header_redirect( 'view_all_set.php?type=0' );
+ }
+
+ $t_filename = csv_get_default_filename();
+
+ # Send headers to browser to activate mime loading
+ header( 'Content-Type: text/plain; name=' . $t_filename );
+ header( 'Content-Transfer-Encoding: BASE64;' );
+ header( 'Content-Disposition: attachment; filename=' . $t_filename );
# Get columns to be exported
$t_columns = csv_get_columns();
@@ -80,4 +83,4 @@
echo implode( $t_sep, $t_values ) . $t_nl;
}
-?>
+?>
View
5 logout_page.php
@@ -6,13 +6,10 @@
# See the README and LICENSE files for details
# --------------------------------------------------------
- # $Id: logout_page.php,v 1.16 2004-05-26 00:59:27 int2str Exp $
+ # $Id: logout_page.php,v 1.17 2004-05-30 01:49:31 vboctor Exp $
# --------------------------------------------------------
?>
<?php
- # Removes all the cookies and then redirect to the page specified in
- # the config option logout_redirect_page
-
require_once( 'core.php' );
auth_logout();
View
12 print_all_bug_page_excel.php
@@ -6,7 +6,7 @@
# See the README and LICENSE files for details
# --------------------------------------------------------
- # $Id: print_all_bug_page_excel.php,v 1.37 2004-04-15 09:27:30 yarick123 Exp $
+ # $Id: print_all_bug_page_excel.php,v 1.38 2004-05-30 01:49:31 vboctor Exp $
# --------------------------------------------------------
?>
<?php
@@ -40,13 +40,6 @@
header( 'Content-Disposition: attachment; filename="' . $t_export_title . '.xls"' );
}
- $t_cookie_value = gpc_get_cookie( config_get( 'view_all_cookie' ), '' );
-
- # check to see if new cookie is needed
- if ( ! filter_is_cookie_valid() ) {
- print_header_redirect( 'view_all_set.php?type=0&amp;print=1' );
- }
-
#settings for choosing the fields to print
# get the fields list
$t_field_name_arr = get_field_names();
@@ -58,6 +51,9 @@
$t_page_count = null;
$result = filter_get_bug_rows( $t_page_number, $t_per_page, $t_page_count, $t_bug_count );
+ if ( $result === false ) {
+ print_header_redirect( 'view_all_set.php?type=0&amp;print=1' );
+ }
$row_count = sizeof( $result );
#settings for choosing the fields to print
View
9 view_all_bug_page.php
@@ -6,11 +6,11 @@
# See the README and LICENSE files for details
# --------------------------------------------------------
- # $Revision: 1.51 $
+ # $Revision: 1.52 $
# $Author: vboctor $
- # $Date: 2004-01-11 07:16:08 $
+ # $Date: 2004-05-30 01:49:31 $
#
- # $Id: view_all_bug_page.php,v 1.51 2004-01-11 07:16:08 vboctor Exp $
+ # $Id: view_all_bug_page.php,v 1.52 2004-05-30 01:49:31 vboctor Exp $
# --------------------------------------------------------
?>
<?php
@@ -35,6 +35,9 @@
$t_page_count = null;
$rows = filter_get_bug_rows( $f_page_number, $t_per_page, $t_page_count, $t_bug_count );
+ if ( $rows === false ) {
+ print_header_redirect( 'view_all_set.php?type=0' );
+ }
compress_enable();

0 comments on commit afdf92d

Please sign in to comment.
Something went wrong with that request. Please try again.