Merge branch 'MDL-51781_master' of git://github.com/markn86/moodle

This commit is contained in:
Dan Poltawski
2015-10-15 11:08:26 +01:00
2 changed files with 9 additions and 2 deletions
@@ -105,7 +105,8 @@ abstract class restore_tool_log_logstore_subplugin extends restore_subplugin {
($mapping['restore'] === \core\event\base::NOT_MAPPED)) {
$data->objectid = \core\event\base::NOT_MAPPED;
} else {
$data->objectid = $this->get_mappingid($mapping['restore'], $data->objectid);
$data->objectid = $this->get_mappingid($mapping['restore'], $data->objectid,
\core\event\base::NOT_FOUND);
}
}
} else {
@@ -131,7 +132,8 @@ abstract class restore_tool_log_logstore_subplugin extends restore_subplugin {
($mapping['restore'] === \core\event\base::NOT_MAPPED)) {
$data->other[$key] = \core\event\base::NOT_MAPPED;
} else {
$data->other[$key] = $this->get_mappingid($mapping['restore'], $value);
$data->other[$key] = $this->get_mappingid($mapping['restore'], $value,
\core\event\base::NOT_FOUND);
}
}
}
+5
View File
@@ -80,6 +80,11 @@ abstract class base implements \IteratorAggregate {
*/
const NOT_MAPPED = -31337;
/**
* The value used when an id can not be found during a restore.
*/
const NOT_FOUND = -31338;
/** @var array event data */
protected $data;