MDL-22054 starting to switch blocks to pluginname
authorPetr Skoda <skodak@moodle.org>
Sun, 11 Apr 2010 10:09:59 +0000 (10:09 +0000)
committerPetr Skoda <skodak@moodle.org>
Sun, 11 Apr 2010 10:09:59 +0000 (10:09 +0000)
lib/accesslib.php
lib/adminlib.php
lib/moodlelib.php

index 993efab..a8ee6d7 100755 (executable)
@@ -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;
 
index 48b083f..07fd289 100644 (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;
index caec476..06e10c5 100644 (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 {