Fixed missing default values in data import form
authorMarcel Werk <burntime@woltlab.com>
Mon, 6 Jul 2015 16:27:37 +0000 (18:27 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 6 Jul 2015 16:27:37 +0000 (18:27 +0200)
wcfsetup/install/files/lib/acp/form/DataImportForm.class.php

index 8f04f45bdd395884778f68f16f4934d7d33011a8..3b11b41af9c8e7412ef6b757ac887b4cbebca7de 100644 (file)
@@ -167,7 +167,7 @@ class DataImportForm extends AbstractForm {
                        }
                        
                        // get default database prefix
-                       if (!count($_POST)) {
+                       if (!isset($_POST['dbPrefix'])) {
                                $this->dbPrefix = $this->exporter->getDefaultDatabasePrefix();
                        }
                }
@@ -268,9 +268,9 @@ class DataImportForm extends AbstractForm {
        public function readData() {
                parent::readData();
                
+               if (!isset($_POST['fileSystemPath'])) $this->fileSystemPath = (!empty($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : WCF_DIR);
+               
                if (empty($_POST)) {
-                       $this->fileSystemPath = (!empty($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : WCF_DIR);
-                       
                        if (!$this->exporterName) {
                                $sql = "SELECT  COUNT(*) AS count
                                        FROM    wcf".WCF_N."_import_mapping";