Skip to content
Browse files

Only save to backup_ids restoreable modules.

  • Loading branch information...
1 parent b274caf commit 22c5d5271a12a66e33a9c97558ba291b1b9e0152 stronk7 committed
Showing with 10 additions and 7 deletions.
  1. +10 −7 backup/restorelib.php
View
17 backup/restorelib.php
@@ -1216,13 +1216,16 @@ function endElementModules($parser, $tagName) {
//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 = "";
}

0 comments on commit 22c5d52

Please sign in to comment.
Something went wrong with that request. Please try again.