MDL-39661 blocks: Removed notice when moving a block

This commit is contained in:
Frederic Massart
2014-01-06 12:44:23 +01:00
parent e71a5333a3
commit 2424069da2
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -50,6 +50,7 @@ $string['hidepanel'] = 'Hide panel';
$string['moveblock'] = 'Move {$a} block';
$string['moveblockafter'] = 'Move block to after {$a} block';
$string['moveblockbefore'] = 'Move block to before {$a} block';
$string['moveblockhere'] = 'Move block here';
$string['movingthisblockcancel'] = 'Moving this block ({$a})';
$string['onthispage'] = 'On this page';
$string['pagetypes'] = 'Page types';
+6 -1
View File
@@ -1420,7 +1420,12 @@ class core_renderer extends renderer_base {
*/
public function block_move_target($target, $zones, $previous) {
if ($previous == null) {
$position = get_string('moveblockbefore', 'block', $zones[0]);
if (empty($zones)) {
// There are no zones, probably because there are no blocks.
$position = get_string('moveblockhere', 'block');
} else {
$position = get_string('moveblockbefore', 'block', $zones[0]);
}
} else {
$position = get_string('moveblockafter', 'block', $previous);
}