]> git.mjollnir.org Git - moodle.git/commitdiff
Changed the way the fix for bug 1255 works, while making sure it still works :)
authordefacer <defacer>
Thu, 22 Apr 2004 07:11:55 +0000 (07:11 +0000)
committerdefacer <defacer>
Thu, 22 Apr 2004 07:11:55 +0000 (07:11 +0000)
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... :)

admin/blocks.php

index ba97a6076549ddb78f3207e2e8dd812652b8b3a6..b64bf48cd34494e9c76b6f1dd0b750c7570cb10b 100644 (file)
         }
         $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);
 
         $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 {