Skip to content

Commit

Permalink
Removed some direct references to cookies + checking return value for…
Browse files Browse the repository at this point in the history
… 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
vboctor committed May 30, 2004
1 parent ddd2f83 commit afdf92d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 27 deletions.
5 changes: 2 additions & 3 deletions core/print_api.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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 *
Expand Down
21 changes: 12 additions & 9 deletions csv_export.php
Expand Up @@ -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
Expand All @@ -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;
Expand All @@ -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();
Expand Down Expand Up @@ -80,4 +83,4 @@

echo implode( $t_sep, $t_values ) . $t_nl;
}
?>
?>
5 changes: 1 addition & 4 deletions logout_page.php
Expand Up @@ -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();
Expand Down
12 changes: 4 additions & 8 deletions print_all_bug_page_excel.php
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand All @@ -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
Expand Down
9 changes: 6 additions & 3 deletions view_all_bug_page.php
Expand Up @@ -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
Expand All @@ -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();

Expand Down

0 comments on commit afdf92d

Please sign in to comment.