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... :)
This commit is contained in:
defacer
2004-04-22 07:11:55 +00:00
parent 72957fa54b
commit c867774d76
+1 -3
View File
@@ -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 = '<a href="blocks.php?hide='.$blockid.'" title="'.$strhide.'">'.
'<img src="'.$pixpath.'/i/hide.gif" style="height: 16px; width: 16px;" /></a>';
} else {