]> git.mjollnir.org Git - moodle.git/commitdiff
Oops... fix for the fix :-)
authordefacer <defacer>
Fri, 12 Nov 2004 18:47:39 +0000 (18:47 +0000)
committerdefacer <defacer>
Fri, 12 Nov 2004 18:47:39 +0000 (18:47 +0000)
lib/blocklib.php

index 7fbd3e6a99b99055d3484feee94b136c0a07fd9d..3bfac65b6ed71090973fb7708d434b4918749d0e 100644 (file)
@@ -366,7 +366,7 @@ function blocks_execute_action($page, &$pageblocks, $blockaction, $instanceorid)
                 // The block is the first one, so a move "up" probably means it changes position
                 // Where is the instance going to be moved?
                 $newpos = $page->blocks_move_position($instance, BLOCK_MOVE_UP);
-                $newweight = (empty($pageblocks[$newpos]) ? 0 : max(array_keys($pageblocks[$newpos]))) + 1;
+                $newweight = (empty($pageblocks[$newpos]) ? 0 : max(array_keys($pageblocks[$newpos])) + 1);
 
                 blocks_execute_repositioning($instance, $newpos, $newweight);
             }
@@ -395,7 +395,7 @@ function blocks_execute_action($page, &$pageblocks, $blockaction, $instanceorid)
                 // The block is the last one, so a move "down" probably means it changes position
                 // Where is the instance going to be moved?
                 $newpos = $page->blocks_move_position($instance, BLOCK_MOVE_DOWN);
-                $newweight = (empty($pageblocks[$newpos]) ? 0 : max(array_keys($pageblocks[$newpos]))) + 1;
+                $newweight = (empty($pageblocks[$newpos]) ? 0 : max(array_keys($pageblocks[$newpos])) + 1);
 
                 blocks_execute_repositioning($instance, $newpos, $newweight);
             }
@@ -422,7 +422,7 @@ function blocks_execute_action($page, &$pageblocks, $blockaction, $instanceorid)
 
             // Where is the instance going to be moved?
             $newpos = $page->blocks_move_position($instance, BLOCK_MOVE_LEFT);
-            $newweight = (empty($pageblocks[$newpos]) ? 0 : max(array_keys($pageblocks[$newpos]))) + 1;
+            $newweight = (empty($pageblocks[$newpos]) ? 0 : max(array_keys($pageblocks[$newpos])) + 1);
 
             blocks_execute_repositioning($instance, $newpos, $newweight);
         break;
@@ -433,7 +433,7 @@ function blocks_execute_action($page, &$pageblocks, $blockaction, $instanceorid)
 
             // Where is the instance going to be moved?
             $newpos    = $page->blocks_move_position($instance, BLOCK_MOVE_RIGHT);
-            $newweight = (empty($pageblocks[$newpos]) ? 0 : max(array_keys($pageblocks[$newpos]))) + 1;
+            $newweight = (empty($pageblocks[$newpos]) ? 0 : max(array_keys($pageblocks[$newpos])) + 1);
 
             blocks_execute_repositioning($instance, $newpos, $newweight);
         break;