MDL-22054 starting to switch blocks to pluginname

This commit is contained in:
Petr Skoda 2010-04-11 10:09:59 +00:00
parent 9770b8f03a
commit bac6e62eba
3 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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 {