From 2c470e4b27f4e5df4c996d6755ebbb1f7306d86a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 31 May 2004 18:00:10 +0000 Subject: - added delete cookies link - fixed global announcement links in viewforum - do not display redirects in link forums as posts in forum overview git-svn-id: file:///svn/phpbb/trunk@4904 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/session.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/session.php') diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index aa7e02fc4f..4708cd0e1a 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -31,7 +31,8 @@ class session $this->page = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : $_ENV['REQUEST_URI']; // Generate Valid URL - $this->cur_page = preg_replace('#^.*?([a-z]+?)\.' . $phpEx . '\?sid=[a-z0-9]*?(&.*)?$#i', '\1.' . $phpEx . '?\2', htmlspecialchars($this->page)); + // TODO: need another one with sid for normal redirects + $this->cur_page = preg_replace('#^.*?([a-z]+?)\.' . $phpEx . '\?sid=[a-z0-9]*?(&.*)?$#i', '\1.' . $phpEx . '?\2', str_replace('&', '&', htmlspecialchars($this->page))); $this->page = preg_replace('#^.*?([a-z]+?)\.' . $phpEx . '\?sid=[a-z0-9]*?(&.*)?$#i', '\1\2', $this->page); $this->page .= (isset($_POST['f'])) ? 'f=' . intval($_POST['f']) : ''; @@ -740,11 +741,14 @@ class user extends session return; } - $sql = 'SELECT * FROM ' . CUSTOM_PROFILE_DATA . " + // TODO: think about adding this to the session code too? + // Grabbing all user specific options (all without the need of special complicate adding to the sql query) might be useful... + $sql = 'SELECT * FROM ' . PROFILE_DATA_TABLE . " WHERE user_id = $user_id"; $result = $db->sql_query_limit($sql, 1); $user->profile_fields = (!($row = $db->sql_fetchrow($result))) ? array() : $row; + $db->sql_freeresult($result); } function img($img, $alt = '', $width = false, $suffix = '') -- cgit v1.2.1