Skip to content

Commit

Permalink
Remove all traces of g_string_cookie_val.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Julian Fitzell committed Feb 24, 2003
1 parent 47722ea commit 64aa9e5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 24 deletions.
6 changes: 1 addition & 5 deletions config_defaults_inc.php
Expand Up @@ -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 $
# --------------------------------------------------------


Expand Down Expand Up @@ -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];
}
Expand Down
10 changes: 5 additions & 5 deletions core/lang_api.php
Expand Up @@ -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 $
# --------------------------------------------------------

###########################################################################
Expand Down Expand Up @@ -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 );
Expand Down
8 changes: 2 additions & 6 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.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;
Expand Down Expand Up @@ -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 ) )) {
Expand Down
8 changes: 0 additions & 8 deletions doc/configuration.html
Expand Up @@ -1603,14 +1603,6 @@ <h2>Content</h2>
The name for the manage settings cookie.
</td>
</tr>
<tr>
<td bgcolor="#ddddff">
$g_string_cookie_val
</td>
<td bgcolor="#ffffff">
The user's cookie_string value. This is a unique identifier for the user.
</td>
</tr>
<tr>
<td bgcolor="#ddddff">
$g_view_all_cookie_val
Expand Down

0 comments on commit 64aa9e5

Please sign in to comment.