From f7016edcb9964c225f0beac4b9f019acee9d1bd5 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 19 Sep 2007 07:47:49 +0000 Subject: [PATCH] index: use $PAGE->edit_course_allowed() instead of editcourseallowed() $PAGE->edit_course_allowed() has been reworked and is faster/smarter than editcourseallowed(). It can also be made more specific on a per-page-type basis. --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 94a4306510..2b4f9bce95 100644 --- a/index.php +++ b/index.php @@ -259,10 +259,10 @@ break; case 'right': // The right column - if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing || editcourseallowed(SITEID)) { + if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT) || $editing || $PAGE->user_allowed_editing()) { echo ''; if (!empty($THEME->customcorners)) print_custom_corners_start(); - if (editcourseallowed(SITEID)) { + if ($PAGE->user_allowed_editing()) { echo '
'.update_course_icon($SITE->id).'
'; echo '
'; } -- 2.39.5