From 943630292a8c610d585f57cb8d0f373b2e884f5d Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Thu, 11 Nov 2010 09:17:47 +0000 Subject: [PATCH] message MDL-25148 fixed a bug with my popup availability bug fix --- message/lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/message/lib.php b/message/lib.php index 88102018650..0914a396956 100644 --- a/message/lib.php +++ b/message/lib.php @@ -28,7 +28,10 @@ require_once($CFG->libdir.'/eventslib.php'); define ('MESSAGE_SHORTLENGTH', 300); -$PAGE->set_popup_notification_allowed(false); // We are in a message window (so don't pop up a new one) +//$PAGE isnt set if we're being loaded by cron which doesnt display popups anyway +if (isset($PAGE)) { + $PAGE->set_popup_notification_allowed(false); // We are in a message window (so don't pop up a new one) +} define ('MESSAGE_DISCUSSION_WIDTH',600); define ('MESSAGE_DISCUSSION_HEIGHT',500);