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;
|
||||
|
||||
+1
-1
@@ -327,7 +327,7 @@ echo '<fieldset class="invisiblefieldset">';
|
||||
echo '<input type="hidden" name="d" value="'.$data->id.'" />';
|
||||
echo '<input type="hidden" name="action" value="importzip" />';
|
||||
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
|
||||
echo '<input name="file" size="20" value="" id="fromfile" type="text" /><input name="coursefiles" value="'.$strchooseorupload.'" onclick="return openpopup('."'/files/index.php?id=2&choose=uploadpreset.file', 'coursefiles', 'menubar=0,location=0,scrollbars,resizable,width=750,height=500', 0".');" type="button" />';
|
||||
echo '<input name="file" size="20" value="" id="fromfile" type="text" /><input name="coursefiles" value="'.$strchooseorupload.'" onclick="return openpopup('."'/files/index.php?id={$course->id}&choose=uploadpreset.file', 'coursefiles', 'menubar=0,location=0,scrollbars,resizable,width=750,height=500', 0".');" type="button" />';
|
||||
echo '<input type="submit" value="'.$strimport.'" />';
|
||||
echo '</fieldset></form>';
|
||||
echo '</td></tr>';
|
||||
|
||||
Reference in New Issue
Block a user