Merge branch 'MDL-49662_master' of git://github.com/markn86/moodle
authorDan Poltawski <dan@moodle.com>
Wed, 13 Jan 2016 11:40:49 +0000 (11:40 +0000)
committerDan Poltawski <dan@moodle.com>
Wed, 13 Jan 2016 11:40:49 +0000 (11:40 +0000)
1  2 
lib/navigationlib.php

diff --combined lib/navigationlib.php
@@@ -1296,18 -1296,8 +1296,8 @@@ class global_navigation extends navigat
          }
  
          // Give the local plugins a chance to include some navigation if they want.
-         foreach (core_component::get_plugin_list_with_file('local', 'lib.php', true) as $plugin => $unused) {
-             $function = "local_{$plugin}_extend_navigation";
-             $oldfunction = "local_{$plugin}_extends_navigation";
-             if (function_exists($function)) {
-                 $function($this);
-             } else if (function_exists($oldfunction)) {
-                 debugging("Deprecated local plugin navigation callback: Please rename '{$oldfunction}' to '{$function}'. ".
-                     "Support for the old callback will be dropped in Moodle 3.1", DEBUG_DEVELOPER);
-                 $oldfunction($this);
-             }
+         foreach (get_plugin_list_with_function('local', 'extend_navigation') as $function) {
+             $function($this);
          }
  
          // Remove any empty root nodes
@@@ -3888,10 -3878,8 +3878,10 @@@ class settings_navigation extends navig
          }
  
          //Add badges navigation
 -        require_once($CFG->libdir .'/badgeslib.php');
 -        badges_add_course_navigation($coursenode, $course);
 +        if (!empty($CFG->enablebadges)) {
 +            require_once($CFG->libdir .'/badgeslib.php');
 +            badges_add_course_navigation($coursenode, $course);
 +        }
  
          // Backup this course
          if (has_capability('moodle/backup:backupcourse', $coursecontext)) {
       */
      protected function load_local_plugin_settings() {
  
-         foreach (core_component::get_plugin_list_with_file('local', 'lib.php', true) as $plugin => $unused) {
-             $function = "local_{$plugin}_extend_settings_navigation";
-             $oldfunction = "local_{$plugin}_extends_settings_navigation";
-             if (function_exists($function)) {
-                 $function($this, $this->context);
-             } else if (function_exists($oldfunction)) {
-                 debugging("Deprecated local plugin navigation callback: Please rename '{$oldfunction}' to '{$function}'. ".
-                     "Support for the old callback will be dropped in Moodle 3.1", DEBUG_DEVELOPER);
-                 $oldfunction($this, $this->context);
-             }
+         foreach (get_plugin_list_with_function('local', 'extend_settings_navigation') as $function) {
+             $function($this, $this->context);
          }
      }