mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
fixed warning when no referer available; merged from MOODLE_16_STABLE
This commit is contained in:
parent
d1a66080d5
commit
1322b7199a
1 changed files with 5 additions and 1 deletions
|
@ -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)");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue