From 64aa9e57bc66cbde4660109c460eae0b1eafe82b Mon Sep 17 00:00:00 2001 From: Julian Fitzell Date: Mon, 24 Feb 2003 09:52:13 +0000 Subject: [PATCH] Remove all traces of g_string_cookie_val. I removed a check for that cookie being set from print_source_link() since I assume the only reason was to make sure it wasn't a spider and the access check will ensure that as well. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2012 f5dc347c-c33d-0410-90a0-b07cc1902cb9 --- config_defaults_inc.php | 6 +----- core/lang_api.php | 10 +++++----- core/print_api.php | 8 ++------ doc/configuration.html | 8 -------- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/config_defaults_inc.php b/config_defaults_inc.php index 2dfacde3dc..457011624f 100644 --- a/config_defaults_inc.php +++ b/config_defaults_inc.php @@ -6,7 +6,7 @@ # See the README and LICENSE files for details # -------------------------------------------------------- - # $Id: config_defaults_inc.php,v 1.97 2003-02-24 09:44:02 jfitzell Exp $ + # $Id: config_defaults_inc.php,v 1.98 2003-02-24 09:52:01 jfitzell Exp $ # -------------------------------------------------------- @@ -758,13 +758,9 @@ # --- cookie values --------------- #@@@ this code can be removed after full conversion to #@@@ the gpc_api - $g_string_cookie_val = ''; $g_view_all_cookie_val = ''; $g_manage_cookie_val = ''; - if ( isset( $HTTP_COOKIE_VARS[$g_string_cookie] ) ) { - $g_string_cookie_val = $HTTP_COOKIE_VARS[$g_string_cookie]; - } if ( isset( $HTTP_COOKIE_VARS[$g_view_all_cookie] ) ) { $g_view_all_cookie_val = $HTTP_COOKIE_VARS[$g_view_all_cookie]; } diff --git a/core/lang_api.php b/core/lang_api.php index 36c6e40372..3076d7182e 100644 --- a/core/lang_api.php +++ b/core/lang_api.php @@ -6,7 +6,7 @@ # See the README and LICENSE files for details # -------------------------------------------------------- - # $Id: lang_api.php,v 1.12 2003-02-20 13:19:29 vboctor Exp $ + # $Id: lang_api.php,v 1.13 2003-02-24 09:52:05 jfitzell Exp $ # -------------------------------------------------------- ########################################################################### @@ -57,17 +57,17 @@ function lang_load( $p_lang ) { # ------------------ # Loads the user's language or, if the database is unavailable, the default language function lang_load_default() { - global $g_string_cookie_val; - + $t_user_language = gpc_get_cookie( config_get( 'string_cookie' ) ); + # Confirm that the user's language can be determined - if ( db_is_connected() && !is_blank( $g_string_cookie_val ) ) { + if ( db_is_connected() && !is_blank( $t_user_language ) ) { $t_mantis_user_pref_table = config_get( 'mantis_user_pref_table' ); $t_mantis_user_table = config_get( 'mantis_user_table' ); $query = "SELECT DISTINCT language FROM $t_mantis_user_pref_table p, $t_mantis_user_table u - WHERE u.cookie_string='$g_string_cookie_val' AND + WHERE u.cookie_string='$t_user_language' AND u.id=p.user_id"; $result = db_query( $query ); diff --git a/core/print_api.php b/core/print_api.php index cf1cd7626e..985a8f442c 100644 --- a/core/print_api.php +++ b/core/print_api.php @@ -6,7 +6,7 @@ # See the README and LICENSE files for details # -------------------------------------------------------- - # $Id: print_api.php,v 1.51 2003-02-24 09:44:09 jfitzell Exp $ + # $Id: print_api.php,v 1.52 2003-02-24 09:52:07 jfitzell Exp $ # -------------------------------------------------------- $t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR; @@ -981,11 +981,7 @@ function print_documentation_link( $p_a_name='' ) { # WARNING: displaying source (and the ability to do so) can be a security risk # used in html_footer() function print_source_link( $p_file ) { - global $g_show_source, $g_string_cookie_val; - - if (!isset($g_string_cookie_val)) { - return; - } + global $g_show_source; if (( ON == $g_show_source )&& ( access_has_project_level( ADMINISTRATOR ) )) { diff --git a/doc/configuration.html b/doc/configuration.html index de0b4b9a6f..2ea7a43afb 100644 --- a/doc/configuration.html +++ b/doc/configuration.html @@ -1603,14 +1603,6 @@

Content

The name for the manage settings cookie. - - - $g_string_cookie_val - - - The user's cookie_string value. This is a unique identifier for the user. - - $g_view_all_cookie_val