]> git.joonet.de Git - adminer.git/commitdiff
Whitespace
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 20 Jul 2009 12:12:55 +0000 (12:12 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 20 Jul 2009 12:12:55 +0000 (12:12 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@853 7c3ca157-0c34-0410-bff1-cbf682f78f5c

12 files changed:
adminer/create.inc.php
adminer/database.inc.php
adminer/event.inc.php
adminer/foreign.inc.php
adminer/indexes.inc.php
adminer/privileges.inc.php
adminer/procedure.inc.php
adminer/processlist.inc.php
adminer/table.inc.php
adminer/trigger.inc.php
adminer/user.inc.php
adminer/view.inc.php

index f728bdc705198434d8b3b21a47060df34a385a76..dc408f8c9e3eee379758045f45392d49377f1381 100644 (file)
@@ -65,7 +65,10 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
                                        $partitions[] = "\nPARTITION " . idf_escape($val) . " VALUES " . ($_POST["partition_by"] == 'RANGE' ? "LESS THAN" : "IN") . (strlen($value) ? " ($value)" : " MAXVALUE"); //! SQL injection
                                }
                        }
-                       $status .= "\nPARTITION BY $_POST[partition_by]($_POST[partition])" . ($partitions ? " (" . implode(",", $partitions) . "\n)" : ($_POST["partitions"] ? " PARTITIONS " . intval($_POST["partitions"]) : "")); // $_POST["partition"] can be expression, not only column
+                       $status .= "\nPARTITION BY $_POST[partition_by]($_POST[partition])" . ($partitions // $_POST["partition"] can be expression, not only column
+                               ? " (" . implode(",", $partitions) . "\n)"
+                               : ($_POST["partitions"] ? " PARTITIONS " . intval($_POST["partitions"]) : "")
+                       );
                } elseif ($dbh->server_info >= 5.1 && strlen($_GET["create"])) {
                        $status .= "\nREMOVE PARTITIONING";
                }
@@ -79,6 +82,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
                }
        }
 }
+
 page_header((strlen($_GET["create"]) ? lang('Alter table') : lang('Create table')), $error, array("table" => $_GET["create"]), $_GET["create"]);
 
 $engines = array();
index e6bcd39869abba09e61c94d3c04b020edc355e08..f807da57b388d5eca630a163d3baa43818b670e4 100644 (file)
@@ -38,6 +38,7 @@ if ($_POST && !$error && !isset($_POST["add_x"])) { // add is an image and PHP c
                query_redirect("ALTER DATABASE " . idf_escape($_POST["name"]) . " COLLATE " . $dbh->quote($_POST["collation"]), substr($SELF, 0, -1), lang('Database has been altered.'));
        }
 }
+
 page_header(strlen($_GET["db"]) ? lang('Alter database') : lang('Create database'), $error, array(), $_GET["db"]);
 
 $collations = collations();
@@ -70,7 +71,10 @@ if ($_POST) {
 
 <form action="" method="post">
 <p>
-<?php echo ($_POST["add_x"] ? '<textarea name="name" rows="10" cols="40">' . htmlspecialchars($name) . '</textarea><br>' : '<input name="name" value="' . htmlspecialchars($name) . '" maxlength="64">') . "\n"; ?>
+<?php echo ($_POST["add_x"]
+       ? '<textarea name="name" rows="10" cols="40">' . htmlspecialchars($name) . '</textarea><br>'
+       : '<input name="name" value="' . htmlspecialchars($name) . '" maxlength="64">'
+) . "\n"; ?>
 <select name="collation"><option value="">(<?php echo lang('collation'); ?>)<?php echo optionlist($collations, $collate); ?></select>
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 <input type="submit" value="<?php echo lang('Save'); ?>">
index a18bd55b44e3a5624dfb98812518f00401cb3dfc..6ada53ffaeeb2faef73c928578c433fea442b135 100644 (file)
@@ -22,6 +22,7 @@ if ($_POST && !$error) {
                , substr($SELF, 0, -1), (strlen($_GET["event"]) ? lang('Event has been altered.') : lang('Event has been created.')));
        }
 }
+
 page_header((strlen($_GET["event"]) ? lang('Alter event') . ": " . htmlspecialchars($_GET["event"]) : lang('Create event')), $error);
 
 $row = array();
index 0e64f481980a1cb54f6e09d141b3d6bcd6b27006..342c13a0ae0e905014682fb6fa7e0355f40eb8a7 100644 (file)
@@ -18,6 +18,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
                $error = lang('Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exists.') . "<br>$error";
        }
 }
+
 page_header(lang('Foreign key'), $error, array("table" => $_GET["foreign"]), $_GET["foreign"]);
 
 if ($_POST) {
index b316bba5890d75afeaf25d47f59f66a47fc7469f..555d228687775c74e844f1e2c9404b453ce5c268 100644 (file)
@@ -38,6 +38,7 @@ if ($_POST && !$error && !$_POST["add"]) {
        }
        query_redirect("ALTER TABLE " . idf_escape($_GET["indexes"]) . implode(",", $alter), $SELF . "table=" . urlencode($_GET["indexes"]), lang('Indexes has been altered.'));
 }
+
 page_header(lang('Indexes'), $error, array("table" => $_GET["indexes"]), $_GET["indexes"]);
 
 $fields = array_keys(fields($_GET["indexes"]));
index 2c4caa13ff8e16cd48ffe27b9ca8c51b7dc0fe46..3dbaa8b356a78289cbe15ed70aa9f262a8b6707d 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 page_header(lang('Privileges'));
 echo '<p><a href="' . htmlspecialchars($SELF) . 'user=">' . lang('Create user') . "</a>";
+
 $result = $dbh->query("SELECT User, Host FROM mysql.user ORDER BY Host, User");
 if (!$result) {
        ?>
index 653433d713644b758f7805f72f362a4b3e96d550..e59226c25a3f6ed459ca22d318000fa534b53614 100644 (file)
@@ -22,6 +22,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
                , substr($SELF, 0, -1), (strlen($_GET["procedure"]) ? lang('Routine has been altered.') : lang('Routine has been created.')));
        }
 }
+
 page_header((strlen($_GET["procedure"]) ? (isset($_GET["function"]) ? lang('Alter function') : lang('Alter procedure')) . ": " . htmlspecialchars($_GET["procedure"]) : (isset($_GET["function"]) ? lang('Create function') : lang('Create procedure'))), $error);
 
 $collations = get_vals("SHOW CHARACTER SET");
index c7bdb9261514e1654e9bceeee33e68133de3d327..76d299555de3dec9909c77582fd8042666bc1a3a 100644 (file)
@@ -8,6 +8,7 @@ if ($_POST && !$error) {
        }
        query_redirect(queries(), $SELF . "processlist=", lang('%d process(es) has been killed.', $killed), $killed || !$_POST["kill"], false, !$killed && $_POST["kill"]);
 }
+
 page_header(lang('Process list'), $error);
 ?>
 
index c0d03c3820bdc44f8fe6fd2bf0cb8750eaffc27d..5751e465cba16d295ee1db132eaf0a569042ec60 100644 (file)
@@ -3,6 +3,7 @@ $result = $dbh->query("SHOW COLUMNS FROM " . idf_escape($_GET["table"]));
 if (!$result) {
        $error = htmlspecialchars($dbh->error);
 }
+
 page_header(lang('Table') . ": " . htmlspecialchars($_GET["table"]), $error);
 
 if ($result) {
index e79ba9591c6b39a2e5a1bb84dafb26b9e02c0d80..b178fc2a62c5fdf1fd31cec2bdb85c0622eacba0 100644 (file)
@@ -13,6 +13,7 @@ if ($_POST && !$error) {
                }
        }
 }
+
 page_header((strlen($_GET["name"]) ? lang('Alter trigger') . ": " . htmlspecialchars($_GET["name"]) : lang('Create trigger')), $error, array("table" => $_GET["trigger"]));
 
 $row = array("Trigger" => "$_GET[trigger]_bi");
index 502a49e9b8b738555d0a7d8db2b4a6c3749ed56e..3ce8d0b8861eaeda65e3f367c94673e5ac93a83c 100644 (file)
@@ -26,8 +26,8 @@ function grant($grant, $privileges, $columns, $on) {
        if ($privileges == array("ALL PRIVILEGES", "GRANT OPTION")) {
                // can't be granted or revoked together
                return ($grant == "GRANT"
-               ? queries("$grant ALL PRIVILEGES$on WITH GRANT OPTION")
-               : queries("$grant ALL PRIVILEGES$on") && queries("$grant GRANT OPTION$on")
+                       ? queries("$grant ALL PRIVILEGES$on WITH GRANT OPTION")
+                       : queries("$grant ALL PRIVILEGES$on") && queries("$grant GRANT OPTION$on")
                );
        }
        return queries("$grant " . preg_replace('~(GRANT OPTION)\\([^)]*\\)~', '\\1', implode("$columns, ", $privileges) . $columns) . $on);
@@ -113,6 +113,7 @@ if ($_POST && !$error) {
                }
        }
 }
+
 page_header((isset($_GET["host"]) ? lang('Username') . ": " . htmlspecialchars("$_GET[user]@$_GET[host]") : lang('Create user')), $error, array("privileges" => array('', lang('Privileges'))));
 
 if ($_POST) {
index ab99929ade025990bfc52aaabb48d1a3fd480a62..7540dae5465b40a2efe54fe146e337be93793c52 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 page_header(lang('View') . ": " . htmlspecialchars($_GET["view"]));
+
 $view = view($_GET["view"]);
 echo "<pre class='jush-sql'>" . htmlspecialchars($view["select"]) . "</pre>\n";
 echo '<p><a href="' . htmlspecialchars($SELF) . 'createv=' . urlencode($_GET["view"]) . '">' . lang('Alter view') . "</a>\n";