From: stronk7 Date: Fri, 30 May 2003 21:56:08 +0000 (+0000) Subject: Only save to backup_ids restoreable modules. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=22c5d5271a12a66e33a9c97558ba291b1b9e0152;p=moodle.git Only save to backup_ids restoreable modules. --- diff --git a/backup/restorelib.php b/backup/restorelib.php index c256a7b9b3..78564f1394 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -1216,13 +1216,16 @@ //Get id and modtype from data $mod_id = $data["MOD"]["#"]["ID"]["0"]["#"]; $mod_type = $data["MOD"]["#"]["MODTYPE"]["0"]["#"]; - //Serialize it - $mod_temp = serialize($data); - //Now add slashes - $sla_mod_temp = addslashes($mod_temp); - //Save to db - backup_putid($this->preferences->backup_unique_code,$mod_type,$mod_id, - null,$sla_mod_temp); + //Only if we've selected to restore it + if ($this->preferences->mods[$mod_type]->restore) { + //Serialize it + $mod_temp = serialize($data); + //Now add slashes + $sla_mod_temp = addslashes($mod_temp); + //Save to db + backup_putid($this->preferences->backup_unique_code,$mod_type,$mod_id, + null,$sla_mod_temp); + } //Reset info to empty $this->info = ""; }