Fixed data import form
authorAlexander Ebert <ebert@woltlab.com>
Fri, 15 Aug 2014 10:17:51 +0000 (12:17 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 15 Aug 2014 10:17:51 +0000 (12:17 +0200)
wcfsetup/install/files/acp/templates/dataImport.tpl
wcfsetup/install/files/lib/acp/form/DataImportForm.class.php

index de937ef16a529ccd202c4519b4460c7c279a34fe..806a270c261610d6e7bc0a46504a01607e5ed044 100644 (file)
                        
                        <div class="formSubmit">
                                <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
-                               {@SID_INPUT_TAG}
+                               <input type="hidden" name="sourceSelection" value="1" />
+                               {@SECURITY_TOKEN_INPUT_TAG}
                        </div>
                </form>
        {/if}
index 6b29d63363fefe8d8b307b5e3505345b20e797fc..75d2ed15d7063c001d358693e1eabd2173d62456 100644 (file)
@@ -190,6 +190,15 @@ class DataImportForm extends AbstractForm {
                if (isset($_POST['additionalData'])) $this->additionalData = ArrayUtil::trim($_POST['additionalData']);
        }
        
+       /**
+        * @see \wcf\form\IForm::submit()
+        */
+       public function submit() {
+               if (!isset($_POST['sourceSelection'])) {
+                       parent::submit();
+               }
+       }
+       
        /**
         * @see \wcf\form\IForm::validate()
         */