]> git.joonet.de Git - adminer.git/commitdiff
Use elseif
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 25 Sep 2008 14:54:28 +0000 (14:54 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 25 Sep 2008 14:54:28 +0000 (14:54 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@496 7c3ca157-0c34-0410-bff1-cbf682f78f5c

index.php

index 5810eabbe0208f35135f5701d3175264331daeb9..84cbb37967c8cbcb2a17248c9b3e89d8fdacb3d6 100644 (file)
--- a/index.php
+++ b/index.php
@@ -129,12 +129,9 @@ if (isset($_GET["download"])) {
                                                }
                                        }
                                        $message = lang('Tables have been truncated.');
-                               } else {
-                                       $result = queries((isset($_POST["optimize"]) ? "OPTIMIZE" : (isset($_POST["check"]) ? "CHECK" : (isset($_POST["repair"]) ? "REPAIR" : (isset($_POST["drop"]) ? "DROP" : "ANALYZE")))) . " TABLE " . implode(", ", array_map('idf_escape', $_POST["tables"])));
-                                       if ($result) {
-                                               while ($row = $result->fetch_assoc()) {
-                                                       $message .= htmlspecialchars("$row[Table]: $row[Msg_text]") . "<br />";
-                                               }
+                               } elseif ($result = queries((isset($_POST["optimize"]) ? "OPTIMIZE" : (isset($_POST["check"]) ? "CHECK" : (isset($_POST["repair"]) ? "REPAIR" : (isset($_POST["drop"]) ? "DROP" : "ANALYZE")))) . " TABLE " . implode(", ", array_map('idf_escape', $_POST["tables"])))) {
+                                       while ($row = $result->fetch_assoc()) {
+                                               $message .= htmlspecialchars("$row[Table]: $row[Msg_text]") . "<br />";
                                        }
                                }
                                query_redirect(queries(), substr($SELF, 0, -1), $message, $result, false, !$result);