forked from Phorum/Core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
redirect.php
35 lines (31 loc) · 1.87 KB
/
redirect.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
////////////////////////////////////////////////////////////////////////////////
// //
// Copyright (C) 2011 Phorum Development Team //
// http://www.phorum.org //
// //
// This program is free software. You can redistribute it and/or modify //
// it under the terms of either the current Phorum License (viewable at //
// phorum.org) or the Phorum License that was distributed with this file //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY, without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. //
// //
// You should have received a copy of the Phorum License //
// along with this program. //
// //
////////////////////////////////////////////////////////////////////////////////
// Redirect to another page. This is used for working around an MSIE bug
// where redirecting to an anchored URL loses the anchor if redirected
// directly from a script that acts on POST input coming from an
// enctype="multipart/mixed" form... *sigh*.
define('phorum_page', 'redirect');
require_once './common.php';
if (isset($PHORUM["args"]["phorum_redirect_to"])) {
$redir = urldecode($PHORUM["args"]["phorum_redirect_to"]);
phorum_api_redirect($redir);
} else {
phorum_api_redirect(PHORUM_INDEX_URL);
}
?>