aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-10-14 15:49:52 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-10-14 15:49:52 +0000
commit2d839365aa3772b1bd7c9946a4b22338509f3bba (patch)
tree8c468be6975ff96bc7403aa68fc415a0b5e25c16 /phpBB
parent6c7d359a841e9167246f99aeb8e27ba702e56113 (diff)
downloadforums-2d839365aa3772b1bd7c9946a4b22338509f3bba.tar
forums-2d839365aa3772b1bd7c9946a4b22338509f3bba.tar.gz
forums-2d839365aa3772b1bd7c9946a4b22338509f3bba.tar.bz2
forums-2d839365aa3772b1bd7c9946a4b22338509f3bba.tar.xz
forums-2d839365aa3772b1bd7c9946a4b22338509f3bba.zip
Various updates mainly URI session related ... login still having problem with full URI sessions
git-svn-id: file:///svn/phpbb/trunk@1183 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/login.php28
-rw-r--r--phpBB/posting.php20
-rw-r--r--phpBB/viewtopic.php10
3 files changed, 30 insertions, 28 deletions
diff --git a/phpBB/login.php b/phpBB/login.php
index 155b15b548..926bf69776 100644
--- a/phpBB/login.php
+++ b/phpBB/login.php
@@ -33,13 +33,12 @@ init_userprefs($userdata);
// End session management
//
-if(isset($HTTP_POST_VARS['submit']) || isset($HTTP_GET_VARS['submit']))
+if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) )
{
- if($HTTP_POST_VARS['submit'] == "Login" && !$userdata['session_logged_in'])
+ if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] )
{
-
- $username = $HTTP_POST_VARS['username'];
- $password = $HTTP_POST_VARS['password'];
+ $username = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : "";
+ $password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : "";
$sql = "SELECT user_id, username, user_password, user_active
FROM ".USERS_TABLE."
@@ -61,9 +60,10 @@ if(isset($HTTP_POST_VARS['submit']) || isset($HTTP_GET_VARS['submit']))
if($session_id)
{
- if(!empty($HTTP_POST_VARS['forward_page']))
+ if( !empty($HTTP_POST_VARS['forward_page']) )
{
- header("Location: " . append_sid($HTTP_POST_VARS['forward_page']));
+// echo $HTTP_POST_VARS['forward_page'];
+ header("Location: " . $HTTP_POST_VARS['forward_page']);
}
else
{
@@ -85,13 +85,13 @@ if(isset($HTTP_POST_VARS['submit']) || isset($HTTP_GET_VARS['submit']))
message_die(GENERAL_MESSAGE, $lang['Error_login']);
}
}
- else if($HTTP_GET_VARS['submit'] == "logout" && $userdata['session_logged_in'])
+ else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] )
{
- if($userdata['session_logged_in'])
+ if( $userdata['session_logged_in'] )
{
session_end($userdata['session_id'], $userdata['user_id']);
}
- if(!empty($HTTP_POST_VARS['forward_page']))
+ if( !empty($HTTP_POST_VARS['forward_page']) )
{
header("Location: " . append_sid($HTTP_POST_VARS['forward_page']));
}
@@ -102,7 +102,7 @@ if(isset($HTTP_POST_VARS['submit']) || isset($HTTP_GET_VARS['submit']))
}
else
{
- if(!empty($HTTP_POST_VARS['forward_page']))
+ if( !empty($HTTP_POST_VARS['forward_page']) )
{
header(append_sid("Location: ".$HTTP_POST_VARS['forward_page']));
}
@@ -127,11 +127,11 @@ else
"body" => "login_body.tpl")
);
- if(isset($HTTP_POST_VARS['forward_page']) || isset($HTTP_GET_VARS['forward_page']))
+ if( isset($HTTP_POST_VARS['forward_page']) || isset($HTTP_GET_VARS['forward_page']) )
{
- $forward_to = $HTTP_SERVER_VARS['QUERY_STRING'];
+ echo $forward_to = $HTTP_SERVER_VARS['QUERY_STRING'];
- if(preg_match("/^forward_page=(.*)(&sid=[0-9]*)$|^forward_page=(.*)$/si", $forward_to, $forward_matches))
+ if( preg_match("/^forward_page=(.*)(&sid=[0-9]*)$|^forward_page=(.*)$/si", $forward_to, $forward_matches) )
{
$forward_to = ($forward_matches[3]) ? $forward_matches[3] : $forward_matches[1];
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 1f7e09f942..6793b8364f 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -848,7 +848,7 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
// If we get here the post has been inserted successfully.
//
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewtopic.' . $phpEx . '?' . POST_POST_URL . '=' . $new_post_id .'#' . $new_post_id . '">')
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$new_post_id") . '#' . $new_post_id . '">')
);
$msg_die = $lang['Stored'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$new_post_id") . "#$new_post_id\">" . $lang['Here'] . "</a> " . $lang['to_view_message'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['Here'] . "</a> ". $lang['to_return_forum'];
@@ -988,7 +988,7 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
if($db->sql_query($sql))
{
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $topic_id . '">')
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
);
$msg_die = $lang['Poll_delete'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . "\">" . $lang['Here'] . "</a> ". $lang['to_return_topic'];
@@ -1163,7 +1163,7 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
if( !$is_first_post_topic && !$is_last_post_topic )
{
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $topic_id . '">')
+ "META" => '<meta http-equiv="refresh" content="3;url= ' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
);
$msg_die .= "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_topic'];
@@ -1171,7 +1171,7 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
else
{
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewforum.' . $phpEx . '?' . POST_FORUM_URL . '=' . $forum_id . '">')
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
);
}
$msg_die .= "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['Here'] . "</a> ". $lang['to_return_forum'];
@@ -1373,7 +1373,7 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
// If we get here the post has been inserted successfully.
//
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewtopic.' . $phpEx . '?' . POST_POST_URL . '=' . $post_id . '#' . $post_id . '">')
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id") . '#' . $post_id . '">')
);
$msg_die = $lang['Stored'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id") . "#$post_id\">" . $lang['Here'] . "</a> " . $lang['to_view_message'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['Here'] . "</a> ". $lang['to_return_forum'];
@@ -1398,7 +1398,7 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
// If we get here the post has been inserted successfully.
//
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewtopic.' . $phpEx . '?' . POST_POST_URL . '=' . $post_id . '#' . $post_id . '">')
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id") . '#' . $post_id . '">')
);
$msg_die = $lang['Stored'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id") . "#$post_id\">" . $lang['Here'] . "</a> " . $lang['to_view_message'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">" . $lang['Here'] . "</a> ". $lang['to_return_forum'];
@@ -1444,7 +1444,7 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
if( $vote_info['max_vote_option'] < $vote_option_id )
{
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $topic_id . '">')
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "= $topic_id") . '">')
);
$message = $lang['No_vote_option'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_topic'];
@@ -1479,7 +1479,7 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
{
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $topic_id . '">')
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
);
$message = $lang['Vote_cast'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_topic'];
@@ -1508,7 +1508,7 @@ if( ( $submit || $confirm || $mode == "delete" ) && !$error )
else
{
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $topic_id . '">')
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
);
$message = $lang['Already_voted'] . "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_topic'];
@@ -2107,6 +2107,8 @@ $template->assign_vars(array(
"L_NOTIFY_ON_REPLY" => $lang['Notify'],
"L_DELETE_POST" => $lang['Delete_post'],
+ "U_TOPIC_REVIEW" => ( $mode == "reply" ) ? append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;postorder=desc") : "",
+
"S_HTML_CHECKED" => (!$html_on) ? "checked=\"checked\"" : "",
"S_BBCODE_CHECKED" => (!$bbcode_on) ? "checked=\"checked\"" : "",
"S_SMILIES_CHECKED" => (!$smilies_on) ? "checked=\"checked\"" : "",
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index c216289a76..4c8786a10d 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -235,10 +235,10 @@ if($userdata['user_id'] != ANONYMOUS)
}
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $topic_id . '&amp;start=' . $start .'">')
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start") . '">')
);
- $message = $lang['No_longer_watching']. "<br /><br />" . $lang['Click'] . " <a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start\">" . $lang['HERE'] . "</a> " . $lang['to_return_topic'];
+ $message = $lang['No_longer_watching']. "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_topic'];
message_die(GENERAL_MESSAGE, $message);
}
else
@@ -279,10 +279,10 @@ if($userdata['user_id'] != ANONYMOUS)
}
$template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="3;url=viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $topic_id . '&amp;start=' . $start .'">')
+ "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start") . '">')
);
- $message = $lang['You_are_watching']. "<br /><br />" . $lang['Click'] . " <a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start\">" . $lang['HERE'] . "</a> " . $lang['to_return_topic'];
+ $message = $lang['You_are_watching']. "<br /><br />" . $lang['Click'] . " <a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;start=$start") . "\">" . $lang['Here'] . "</a> " . $lang['to_return_topic'];
message_die(GENERAL_MESSAGE, $message);
}
else
@@ -297,7 +297,7 @@ else
{
if( $HTTP_GET_VARS['unwatch'] == "topic" )
{
- header("Location: login.$phpEx?forward_page=viewtopic.$phpEx&" . POST_TOPIC_URL . "=$topic_id&amp;unwatch=topic");
+ header("Location: " . append_sid("login.$phpEx?forward_page=viewtopic.$phpEx&" . POST_TOPIC_URL . "=$topic_id&unwatch=topic"));
}
}
else