mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-49389 blocklib: avoid notices when moving blocks to the bottom
This commit is contained in:
parent
06122e46fd
commit
e1ace26f11
1 changed files with 4 additions and 2 deletions
|
@ -1599,8 +1599,10 @@ class block_manager {
|
||||||
if ($bestgap < $newweight) {
|
if ($bestgap < $newweight) {
|
||||||
$newweight = floor($newweight);
|
$newweight = floor($newweight);
|
||||||
for ($weight = $bestgap + 1; $weight <= $newweight; $weight++) {
|
for ($weight = $bestgap + 1; $weight <= $newweight; $weight++) {
|
||||||
foreach ($usedweights[$weight] as $biid) {
|
if (array_key_exists($weight, $usedweights)) {
|
||||||
$this->reposition_block($biid, $newregion, $weight - 1);
|
foreach ($usedweights[$weight] as $biid) {
|
||||||
|
$this->reposition_block($biid, $newregion, $weight - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->reposition_block($block->instance->id, $newregion, $newweight);
|
$this->reposition_block($block->instance->id, $newregion, $newweight);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue