MDL-22054 starting to switch blocks to pluginname
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user