diff --git a/backup/moodle2/restore_plugin.class.php b/backup/moodle2/restore_plugin.class.php index 8103adaeeec..02039876352 100644 --- a/backup/moodle2/restore_plugin.class.php +++ b/backup/moodle2/restore_plugin.class.php @@ -174,9 +174,12 @@ abstract class restore_plugin { /** * Return the new id of a mapping for the given itemname * + * @param string $itemname the type of item + * @param int $oldid the item ID from the backup + * @param mixed $ifnotfound what to return if $oldid wasnt found. Defaults to false */ - protected function get_mappingid($itemname, $oldid) { - return $this->step->get_mappingid($itemname, $oldid); + protected function get_mappingid($itemname, $oldid, $ifnotfound = false) { + return $this->step->get_mappingid($itemname, $oldid, $ifnotfound); } /** diff --git a/backup/moodle2/restore_subplugin.class.php b/backup/moodle2/restore_subplugin.class.php index d22a0d9c1f8..8972e358405 100644 --- a/backup/moodle2/restore_subplugin.class.php +++ b/backup/moodle2/restore_subplugin.class.php @@ -123,9 +123,12 @@ abstract class restore_subplugin { /** * Return the new id of a mapping for the given itemname * + * @param string $itemname the type of item + * @param int $oldid the item ID from the backup + * @param mixed $ifnotfound what to return if $oldid wasnt found. Defaults to false */ - protected function get_mappingid($itemname, $oldid) { - return $this->step->get_mappingid($itemname, $oldid); + protected function get_mappingid($itemname, $oldid, $ifnotfound = false) { + return $this->step->get_mappingid($itemname, $oldid, $ifnotfound); } /** diff --git a/backup/util/plan/restore_structure_step.class.php b/backup/util/plan/restore_structure_step.class.php index 927f71c7f01..ae648bc4911 100644 --- a/backup/util/plan/restore_structure_step.class.php +++ b/backup/util/plan/restore_structure_step.class.php @@ -196,9 +196,10 @@ abstract class restore_structure_step extends restore_step { /** * Return the new id of a mapping for the given itemname - * @param string $itemname the type of item. For example 'scale' or 'outcome' + * + * @param string $itemname the type of item * @param int $oldid the item ID from the backup - * @param $ifnotfound what to return if $oldid wasnt found + * @param mixed $ifnotfound what to return if $oldid wasnt found. Defaults to false */ public function get_mappingid($itemname, $oldid, $ifnotfound = false) { $mapping = $this->get_mapping($itemname, $oldid);