Permalink
Browse files

Save bytes

  • Loading branch information...
1 parent 1a30f25 commit b7e1cb09c14fa16f64e2d7b1fc0063d7dce784da @vrana committed Aug 8, 2011
Showing with 13 additions and 17 deletions.
  1. +2 −4 adminer/event.inc.php
  2. +3 −3 adminer/scheme.inc.php
  3. +3 −3 adminer/sequence.inc.php
  4. +3 −3 adminer/type.inc.php
  5. +2 −4 adminer/view.inc.php
View
@@ -26,10 +26,8 @@
page_header(($EVENT != "" ? lang('Alter event') . ": " . h($EVENT) : lang('Create event')), $error);
-$row = array();
-if ($_POST) {
- $row = $_POST;
-} elseif ($EVENT != "") {
+$row = $_POST;
+if (!$row && $EVENT != "") {
$rows = get_rows("SELECT * FROM information_schema.EVENTS WHERE EVENT_SCHEMA = " . q(DB) . " AND EVENT_NAME = " . q($EVENT));
$row = reset($rows);
}
View
@@ -17,9 +17,9 @@
page_header($_GET["ns"] != "" ? lang('Alter schema') : lang('Create schema'), $error);
-$row = array("name" => $_GET["ns"]);
-if ($_POST) {
- $row = $_POST;
+$row = $_POST;
+if (!$row) {
+ $row = array("name" => $_GET["ns"]);
}
?>
View
@@ -16,9 +16,9 @@
page_header($SEQUENCE != "" ? lang('Alter sequence') . ": " . h($SEQUENCE) : lang('Create sequence'), $error);
-$row = array("name" => $SEQUENCE);
-if ($_POST) {
- $row = $_POST;
+$row = $_POST;
+if (!$row) {
+ $row = array("name" => $SEQUENCE);
}
?>
View
@@ -12,9 +12,9 @@
page_header($TYPE != "" ? lang('Alter type') . ": " . h($TYPE) : lang('Create type'), $error);
-$row["as"] = "AS ";
-if ($_POST) {
- $row = $_POST;
+$row = $_POST;
+if (!$row) {
+ $row = array("as" => "AS ");
}
?>
View
@@ -15,10 +15,8 @@
page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, array("table" => $TABLE), $TABLE);
-$row = array();
-if ($_POST) {
- $row = $_POST;
-} elseif ($TABLE != "") {
+$row = $_POST;
+if (!$row && $TABLE != "") {
$row = view($TABLE);
$row["name"] = $TABLE;
}

0 comments on commit b7e1cb0

Please sign in to comment.