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:
+1
-3
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user