]> git.joonet.de Git - adminer.git/commitdiff
Handle sending the form without AJAX after AJAX request
authorJakub Vrana <jakub@vrana.cz>
Tue, 19 Oct 2010 14:44:12 +0000 (16:44 +0200)
committerJakub Vrana <jakub@vrana.cz>
Tue, 19 Oct 2010 14:44:12 +0000 (16:44 +0200)
adminer/edit.inc.php
adminer/select.inc.php

index 1a478c58a6648df59f12ccec629cc51bd72c4109..f3f860875318be4563142d96e9b2921ea524354b 100644 (file)
@@ -64,7 +64,7 @@ if ($_POST["save"]) {
 }
 ?>
 
-<form action="" method="post" enctype="multipart/form-data">
+<form action="<?php echo h($_SERVER["REQUEST_URI"]); // required for sending the form after an AJAX request ?>" method="post" enctype="multipart/form-data">
 <?php
 if ($fields) {
        echo "<table cellspacing='0'>\n";
index c7315f7a9c16ad48418be8895e5afeeb7924a79f..bdfdced8d9abaadde96c5615b7f1dd577becb360 100644 (file)
@@ -231,7 +231,7 @@ if (!$columns) {
                        $result->seek($limit * $page);
                }
                $email_fields = array();
-               echo "<form action='' method='post' enctype='multipart/form-data'>\n";
+               echo "<form action='" . h($_SERVER["REQUEST_URI"]) . "' method='post' enctype='multipart/form-data'>\n"; // $_SERVER["REQUEST_URI"] is required for sending the form after an AJAX request
                $rows = array();
                while ($row = $result->fetch_assoc()) {
                        $rows[] = $row;