From e4552afb15f1c9661496138bfd7233c6a8f95fe1 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 15 May 2008 22:34:52 +0000 Subject: [PATCH] Handle properly in restore the change data->notification from NULL to NOT NULL. MDL-14548 --- mod/data/restorelib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mod/data/restorelib.php b/mod/data/restorelib.php index a0ae7dafd8..0da5bf6731 100644 --- a/mod/data/restorelib.php +++ b/mod/data/restorelib.php @@ -96,6 +96,9 @@ function data_restore_mods($mod,$restore) { $database->defaultsortdir = backup_todb($info['MOD']['#']['DEFAULTSORTDIR']['0']['#']); $database->editany = backup_todb($info['MOD']['#']['EDITANY']['0']['#']); $database->notification = backup_todb($info['MOD']['#']['NOTIFICATION']['0']['#']); + if ($database->notification == null) { /// Changed to NOT NULL between 1.9 and 2.0 - MDL-14548 + unset($database->notification); /// Unset it if null to get proper Moodle 2.0 default (0) applied + } $newid = insert_record ('data', $database); @@ -725,4 +728,4 @@ function data_decode_content_links_caller($restore) { return $status; } -?> \ No newline at end of file +?> -- 2.39.5