fixed warning when no referer available; merged from MOODLE_16_STABLE

This commit is contained in:
skodak 2006-07-31 10:05:23 +00:00
parent d1a66080d5
commit 1322b7199a

View file

@ -372,7 +372,11 @@
} else if (!empty($forum)) { } else if (!empty($forum)) {
/// User is starting a new discussion in a forum /// User is starting a new discussion in a forum
if (!empty($_SERVER["HTTP_REFERER"])) {
$SESSION->fromurl = $_SERVER["HTTP_REFERER"]; $SESSION->fromurl = $_SERVER["HTTP_REFERER"];
} else {
$SESSION->fromurl = '';
}
if (! $forum = get_record("forum", "id", $forum)) { if (! $forum = get_record("forum", "id", $forum)) {
error("The forum number was incorrect ($forum)"); error("The forum number was incorrect ($forum)");