MDL-12439, templates not imported in database preset import
This commit is contained in:
+9
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user