mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-52523 backup of subplugins: add missing global
This commit is contained in:
parent
0dfcc2541a
commit
8eef9244be
@ -183,6 +183,10 @@ abstract class backup_structure_step extends backup_step {
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function add_subplugin_structure($subplugintype, $element, $multiple, $plugintype = null, $pluginname = null) {
|
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.
|
// Verify if this is a BC call for an activity backup. See NOTE above for this special case.
|
||||||
if ($plugintype === null and $pluginname === null) {
|
if ($plugintype === null and $pluginname === null) {
|
||||||
|
@ -313,6 +313,10 @@ abstract class restore_structure_step extends restore_step {
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function add_subplugin_structure($subplugintype, $element, $plugintype = null, $pluginname = null) {
|
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.
|
// Verify if this is a BC call for an activity restore. See NOTE above for this special case.
|
||||||
if ($plugintype === null and $pluginname === null) {
|
if ($plugintype === null and $pluginname === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user