]> git.joonet.de Git - adminer.git/commitdiff
Avoid ;;;
authorJakub Vrana <jakub@vrana.cz>
Thu, 10 Mar 2011 11:08:25 +0000 (12:08 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 10 Mar 2011 11:08:25 +0000 (12:08 +0100)
Revert "Remove useless rtrim"
This reverts commit 3f4ef94f83764b642e19dc579a07ca0999cb6fdb.

adminer/event.inc.php
adminer/procedure.inc.php
adminer/trigger.inc.php

index 63248288c8147ab29d3f571143c02a320f815c73..2cd7850fb3fbecc207258268b600bcd376773b7d 100644 (file)
@@ -19,7 +19,7 @@ if ($_POST && !$error) {
                        . ($EVENT != $_POST["EVENT_NAME"] ? "\nRENAME TO " . idf_escape($_POST["EVENT_NAME"]) : "")
                        : "CREATE EVENT " . idf_escape($_POST["EVENT_NAME"]) . $schedule
                        ) . "\n" . $statuses[$_POST["STATUS"]] . " COMMENT " . q($_POST["EVENT_COMMENT"])
-                       . " DO\n$_POST[EVENT_DEFINITION];"
+                       . rtrim(" DO\n$_POST[EVENT_DEFINITION]", ";") . ";"
                ));
        }
 }
index 94329d82ec70562390f17b1a91984075dfb4a654..198ae6e7138abf6ea8ca548192ec9295d8988ed7 100644 (file)
@@ -14,7 +14,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
        }
        $dropped = drop_create(
                "DROP $routine " . idf_escape($PROCEDURE),
-               "CREATE $routine " . idf_escape($_POST["name"]) . " (" . implode(", ", $set) . ")" . (isset($_GET["function"]) ? " RETURNS" . process_type($_POST["returns"], "CHARACTER SET") : "") . "\n$_POST[definition];",
+               "CREATE $routine " . idf_escape($_POST["name"]) . " (" . implode(", ", $set) . ")" . (isset($_GET["function"]) ? " RETURNS" . process_type($_POST["returns"], "CHARACTER SET") : "") . rtrim("\n$_POST[definition]", ";") . ";",
                substr(ME, 0, -1),
                lang('Routine has been dropped.'),
                lang('Routine has been altered.'),
index aab802469d9c62a3509211868d3d458fe81b1406..1ac3930f40c417dd3543373da6c857b84f1cb08c 100644 (file)
@@ -9,7 +9,7 @@ if ($_POST && !$error && in_array($_POST["Timing"], $trigger_options["Timing"])
        $on = " ON " . table($TABLE);
        $dropped = drop_create(
                "DROP TRIGGER " . idf_escape($_GET["name"]) . ($jush == "pgsql" ? $on : ""),
-               "CREATE TRIGGER " . idf_escape($_POST["Trigger"]) . ($jush == "mssql" ? $on . $timing_event : $timing_event . $on) . " $_POST[Type]\n$_POST[Statement];",
+               "CREATE TRIGGER " . idf_escape($_POST["Trigger"]) . ($jush == "mssql" ? $on . $timing_event : $timing_event . $on) . rtrim(" $_POST[Type]\n$_POST[Statement]", ";") . ";",
                ME . "table=" . urlencode($TABLE),
                lang('Trigger has been dropped.'),
                lang('Trigger has been altered.'),