course-import MDL-24176 Fixed regression caused by custom backup extension+mimetype
This commit is contained in:
+1
-1
@@ -97,7 +97,7 @@ if ($backup->get_stage() == backup_ui::STAGE_FINAL) {
|
||||
if (!file_exists($tempdestination) || !is_dir($tempdestination)) {
|
||||
$results = $backup->get_controller()->get_results();
|
||||
$file = $results['backup_destination'];
|
||||
$file->extract_to_pathname(get_file_packer($file->get_mimetype()), $tempdestination);
|
||||
$file->extract_to_pathname(get_file_packer('application/zip'), $tempdestination);
|
||||
}
|
||||
// Delete the backup file, we only want the directory
|
||||
$results['backup_destination']->delete();
|
||||
|
||||
@@ -275,12 +275,12 @@ abstract class base_moodleform extends moodleform {
|
||||
|
||||
/**
|
||||
* Removes an element from the form if it exists
|
||||
* @param string $elementName
|
||||
* @param string $elementname
|
||||
* @return bool
|
||||
*/
|
||||
public function remove_element($elementName) {
|
||||
public function remove_element($elementname) {
|
||||
if ($this->_form->elementExists($elementname)) {
|
||||
return $this->_form->removeElement($elementName);
|
||||
return $this->_form->removeElement($elementname);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user