course-import MDL-24176 Fixed regression caused by custom backup extension+mimetype
authorSam Hemelryk <sam@moodle.com>
Thu, 16 Sep 2010 03:51:30 +0000 (03:51 +0000)
committerSam Hemelryk <sam@moodle.com>
Thu, 16 Sep 2010 03:51:30 +0000 (03:51 +0000)
backup/import.php
backup/util/ui/base_moodleform.class.php

index 35e7784..751269b 100644 (file)
@@ -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();
index f063a9d..ad99260 100644 (file)
@@ -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;
         }