aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index e75b01714c..f3cb791438 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -562,12 +562,9 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
}
else
{
- if (isset($_GET['unwatch']))
+ if (isset($_GET['unwatch']) && $_GET['unwatch'] == $mode)
{
- if ($_GET['unwatch'] == $mode)
- {
- login_box();
- }
+ login_box();
}
else
{
@@ -1016,8 +1013,8 @@ function redirect($url)
// Make sure no &'s are in, this will break the redirect
$url = str_replace('&', '&', $url);
- // Local redirect? If not, prepend the boards url
- if (strpos($url, '://') === false && strpos($url, '/') !== 0)
+ // If relative path, prepend board url
+ if (strpos($url, '://') === false && $url{0} != '/')
{
$url = generate_board_url() . preg_replace('#^/?(.*?)/?$#', '/\1', trim($url));
}