Skip to content
Browse files

Whitespace

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@853 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
1 parent 21c98c4 commit 36d6864a1077b1db964845e7657fe7cec90614ef jakubvrana committed Jul 20, 2009
View
6 adminer/create.inc.php
@@ -65,7 +65,10 @@
$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 @@
}
}
}
+
page_header((strlen($_GET["create"]) ? lang('Alter table') : lang('Create table')), $error, array("table" => $_GET["create"]), $_GET["create"]);
$engines = array();
View
6 adminer/database.inc.php
@@ -38,6 +38,7 @@
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 @@
<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'); ?>">
View
1 adminer/event.inc.php
@@ -22,6 +22,7 @@
, 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();
View
1 adminer/foreign.inc.php
@@ -18,6 +18,7 @@
$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) {
View
1 adminer/indexes.inc.php
@@ -38,6 +38,7 @@
}
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"]));
View
1 adminer/privileges.inc.php
@@ -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) {
?>
View
1 adminer/procedure.inc.php
@@ -22,6 +22,7 @@
, 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");
View
1 adminer/processlist.inc.php
@@ -8,6 +8,7 @@
}
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);
?>
View
1 adminer/table.inc.php
@@ -3,6 +3,7 @@
if (!$result) {
$error = htmlspecialchars($dbh->error);
}
+
page_header(lang('Table') . ": " . htmlspecialchars($_GET["table"]), $error);
if ($result) {
View
1 adminer/trigger.inc.php
@@ -13,6 +13,7 @@
}
}
}
+
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");
View
5 adminer/user.inc.php
@@ -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 @@ function grant($grant, $privileges, $columns, $on) {
}
}
}
+
page_header((isset($_GET["host"]) ? lang('Username') . ": " . htmlspecialchars("$_GET[user]@$_GET[host]") : lang('Create user')), $error, array("privileges" => array('', lang('Privileges'))));
if ($_POST) {
View
1 adminer/view.inc.php
@@ -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";

0 comments on commit 36d6864

Please sign in to comment.
Something went wrong with that request. Please try again.