Dear all,
I'm trying to develop a restore procedure for a module. Is there a way to check whether the backup file that we're restoring has been created on the same Moodle site?
I mean for example in the process_MODULENAME($data) function.
There is a function backup_is_same_site in backup/lib.php.
Thanks for the quick reply.
Suppose that I'm inside the restore_MODULENAME_stepslib.php and in the process_MODULENAME method. Can I use backup_is_same_site here? If so, what should I pass as the parameter to it?
I had to do the same thing last week, so:
protected function process_oucontent($data) {
if (!$this->get_task()->is_samesite()) {
There you go
--sam
Thanks Sam.
This is exactly what I needed.