MDL-12439, templates not imported in database preset import

This commit is contained in:
toyomoyo
2007-12-06 00:45:31 +00:00
parent ee7a11dc62
commit 1ac5aabb2f
2 changed files with 10 additions and 3 deletions
+9 -2
View File
@@ -1846,8 +1846,15 @@ class PresetImporter {
}
}
}
data_update_instance(addslashes_object($settings));
// existing valuas MUST be sent too - it can not work without them!
foreach ($this->data as $prop=>$unused) {
if (array_key_exists($prop, (array)$settings)) {
$this->data->$prop = $settings->$prop;
}
}
data_update_instance(addslashes_object($this->data));
if (strstr($this->folder, '/temp/')) clean_preset($this->folder); /* Removes the temporary files */
return true;