mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-22054 starting to switch blocks to pluginname
This commit is contained in:
parent
9770b8f03a
commit
bac6e62eba
@ -4326,7 +4326,7 @@ function get_component_string($component, $contextlevel) {
|
||||
$string = get_string('enrolname', $langname);
|
||||
} else if (preg_match('|^block/|', $component)) {
|
||||
$langname = str_replace('/', '_', $component);
|
||||
$string = get_string('blockname', $langname);
|
||||
$string = get_string('pluginname', $langname);
|
||||
} else if (preg_match('|^local|', $component)) {
|
||||
$langname = str_replace('/', '_', $component);
|
||||
$string = get_string('local');
|
||||
@ -4372,7 +4372,7 @@ function get_component_string($component, $contextlevel) {
|
||||
if( $component == 'moodle' ){
|
||||
$string = get_string('block');
|
||||
}else{
|
||||
$string = get_string('blockname', basename($component));
|
||||
$string = get_string('pluginname', basename($component));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -4584,7 +4584,7 @@ class admin_page_manageblocks extends admin_externalpage {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
$strblockname = get_string('blockname', 'block_'.$block->name);
|
||||
$strblockname = get_string('pluginname', 'block_'.$block->name);
|
||||
if (strpos($textlib->strtolower($strblockname), $query) !== false) {
|
||||
$found = true;
|
||||
break;
|
||||
|
@ -9145,8 +9145,8 @@ function get_plugin_name($plugin, $type='mod') {
|
||||
$plugin_name = get_string('modulename', $plugin);
|
||||
break;
|
||||
case 'blocks':
|
||||
$plugin_name = get_string('blockname', "block_$plugin");
|
||||
if (empty($plugin_name) || $plugin_name == '[[blockname]]') {
|
||||
$plugin_name = get_string('pluginname', "block_$plugin");
|
||||
if (empty($plugin_name) || $plugin_name == '[[pluginname]]') {
|
||||
if (($block = block_instance($plugin)) !== false) {
|
||||
$plugin_name = $block->get_title();
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user