]> git.mjollnir.org Git - moodle.git/commitdiff
Added check if $PAGE is set. Seams that $PAGE is not set on all pages.
authorurs_hunkler <urs_hunkler>
Mon, 16 Jul 2007 20:59:38 +0000 (20:59 +0000)
committerurs_hunkler <urs_hunkler>
Mon, 16 Jul 2007 20:59:38 +0000 (20:59 +0000)
theme/custom_corners/header.html

index f479b70860299802a89f6c3e1bcbbeeb5a6a89d0..3ce57de833d8443997650a753b1edfe87748a580 100644 (file)
         // either no custom corners or too much
 
         // 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);
         }
 
         // list of pages using the layout-table to be able to view sideblocks
         $excludelist = array('mod-chat-view', 'mod-data-view', 'mod-quiz-view',
             'my-index');
-        if ((in_array($PAGE->type, $excludelist)) &&
+
+        if (!empty($PAGE) && (in_array($PAGE->type, $excludelist)) && 
             (strstr($bodytags, ' nocoursepage'))) {
             $bodytags = str_replace(' nocoursepage', '', $bodytags);
         }