Skip to content

Commit

Permalink
Merge branch 'MDL-52523' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Dec 21, 2015
2 parents ea3ebbf + 8eef924 commit 58920c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backup/util/plan/backup_structure_step.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ protected function add_plugin_structure($plugintype, $element, $multiple) {
* @return void
*/
protected function add_subplugin_structure($subplugintype, $element, $multiple, $plugintype = null, $pluginname = null) {
global $CFG;
// This global declaration is required, because where we do require_once($backupfile);
// That file may in turn try to do require_once($CFG->dirroot ...).
// That worked in the past, we should keep it working.

// Verify if this is a BC call for an activity backup. See NOTE above for this special case.
if ($plugintype === null and $pluginname === null) {
Expand Down
4 changes: 4 additions & 0 deletions backup/util/plan/restore_structure_step.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ protected function add_plugin_structure($plugintype, $element) {
* @return void
*/
protected function add_subplugin_structure($subplugintype, $element, $plugintype = null, $pluginname = null) {
global $CFG;
// This global declaration is required, because where we do require_once($backupfile);
// That file may in turn try to do require_once($CFG->dirroot ...).
// That worked in the past, we should keep it working.

// Verify if this is a BC call for an activity restore. See NOTE above for this special case.
if ($plugintype === null and $pluginname === null) {
Expand Down

0 comments on commit 58920c8

Please sign in to comment.