mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Added check if $PAGE is set. Seams that $PAGE is not set on all pages.
This commit is contained in:
parent
85250cb314
commit
f0e4a5ee4f
1 changed files with 3 additions and 2 deletions
|
@ -20,14 +20,15 @@
|
||||||
// either no custom corners or too much
|
// either no custom corners or too much
|
||||||
|
|
||||||
// all admin pages are build with the layout-table: sideblocks and content
|
// all admin pages are build with the layout-table: sideblocks and content
|
||||||
if (($PAGE->type == 'admin') && (strstr($bodytags, ' nocoursepage'))) {
|
if (!empty($PAGE) && ($PAGE->type == 'admin') && (strstr($bodytags, ' nocoursepage'))) {
|
||||||
$bodytags = str_replace(' nocoursepage', '', $bodytags);
|
$bodytags = str_replace(' nocoursepage', '', $bodytags);
|
||||||
}
|
}
|
||||||
|
|
||||||
// list of pages using the layout-table to be able to view sideblocks
|
// list of pages using the layout-table to be able to view sideblocks
|
||||||
$excludelist = array('mod-chat-view', 'mod-data-view', 'mod-quiz-view',
|
$excludelist = array('mod-chat-view', 'mod-data-view', 'mod-quiz-view',
|
||||||
'my-index');
|
'my-index');
|
||||||
if ((in_array($PAGE->type, $excludelist)) &&
|
|
||||||
|
if (!empty($PAGE) && (in_array($PAGE->type, $excludelist)) &&
|
||||||
(strstr($bodytags, ' nocoursepage'))) {
|
(strstr($bodytags, ' nocoursepage'))) {
|
||||||
$bodytags = str_replace(' nocoursepage', '', $bodytags);
|
$bodytags = str_replace(' nocoursepage', '', $bodytags);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue