MDL-29504 plugin_callback() - delete some unused code
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 27 Sep 2011 00:03:50 +0000 (02:03 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 27 Sep 2011 00:03:50 +0000 (02:03 +0200)
lib/moodlelib.php

index 402e79b..dabd5a8 100644 (file)
@@ -7552,7 +7552,6 @@ function get_list_of_plugins($directory='mod', $exclude='', $basedir='') {
  * @return mixed
  */
 function plugin_callback($type, $name, $feature, $action, $options = null, $default=null) {
-    global $CFG;
 
     $component = clean_param($type . '_' . $name, PARAM_COMPONENT);
     if (empty($component)) {
@@ -7562,8 +7561,6 @@ function plugin_callback($type, $name, $feature, $action, $options = null, $defa
     list($type, $name) = normalize_component($component);
     $component = $type . '_' . $name;
 
-    $function = null;
-
     $function = $component.'_'.$feature.'_'.$action;
     $oldfunction = $name.'_'.$feature.'_'.$action;