From: defacer Date: Thu, 22 Apr 2004 07:11:55 +0000 (+0000) Subject: Changed the way the fix for bug 1255 works, while making sure it still works :) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c867774d763c2887062f3822a2fb8dcbf164f50f;p=moodle.git Changed the way the fix for bug 1255 works, while making sure it still works :) It just didn't feel right to intrusively set object properties from "outside", and since it's now one variable assignment less, I thought why not... :) --- diff --git a/admin/blocks.php b/admin/blocks.php index ba97a60765..b64bf48cd3 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -125,8 +125,6 @@ } $blockbyname[$blockobject->get_title()] = $block->id; $blockobjects[$block->id] = $blockobject; - //We need to add this property to use it later (see bug 1255) - $blockobjects[$block->id]->visible = $block->visible; } ksort($blockbyname); @@ -164,7 +162,7 @@ $count = blocks_get_courses_using_block_by_id($blockid); $class = ''; // Nothing fancy, by default - if ($blockobject->visible) { + if ($blocks[$blockid]->visible) { $visible = ''. ''; } else {