Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
9b91efe
)
Merge branch 'MDL-30655-master' of git://github.com/sammarshallou/moodle
author
Aparup Banerjee
<aparup@moodle.com>
Tue, 13 Dec 2011 05:20:21 +0000
(13:20 +0800)
committer
Aparup Banerjee
<aparup@moodle.com>
Tue, 13 Dec 2011 05:20:21 +0000
(13:20 +0800)
lib/blocklib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/blocklib.php
b/lib/blocklib.php
index
d5d1c3b
..
508b94c
100644
(file)
--- a/
lib/blocklib.php
+++ b/
lib/blocklib.php
@@
-1467,8
+1467,10
@@
class block_manager {
} else {
$newweight = ceil($newweight);
for ($weight = $bestgap - 1; $weight >= $newweight; $weight--) {
- foreach ($usedweights[$weight] as $biid) {
- $this->reposition_block($biid, $newregion, $weight + 1);
+ if (array_key_exists($weight, $usedweights)) {
+ foreach ($usedweights[$weight] as $biid) {
+ $this->reposition_block($biid, $newregion, $weight + 1);
+ }
}
}
$this->reposition_block($block->instance->id, $newregion, $newweight);