From 4d38c7d9635fb008af11dd4ced1ff9193f034693 Mon Sep 17 00:00:00 2001
From: jakubvrana " . lang('None of supported PHP extensions (%s) are available.', 'mysqli, mysql, pdo') . " " . lang('None of supported PHP extensions (%s) are available.', 'MySQLi, MySQL, PDO') . " " . htmlspecialchars($error) . " " . lang('Unable to operate table') . ": " . htmlspecialchars($error) . " " . lang('Unable to operate table') . ": " . htmlspecialchars($error) . " " . lang('Unable to operate database') . ": " . htmlspecialchars($error) . " " . lang('Error during saving') . ": " . htmlspecialchars($error) . " " . lang('Unable to operate foreign keys') . ": " . htmlspecialchars($error) . " " . lang('Unable to operate foreign keys') . ": " . htmlspecialchars($error) . "
' . lang('Database schema') . "
\n"; diff --git a/indexes.inc.php b/indexes.inc.php index e1acd43e..4e8ccaf5 100644 --- a/indexes.inc.php +++ b/indexes.inc.php @@ -40,12 +40,13 @@ if ($_POST && !$error && !$_POST["add"]) { } page_header(lang('Indexes'), array("table" => $_GET["indexes"]), $_GET["indexes"]); +if ($error) { + echo "" . lang('Unable to operate indexes') . ": " . htmlspecialchars($error) . "
\n"; +} $fields = array_keys(fields($_GET["indexes"])); if ($_POST) { $row = $_POST; - if (!$_POST["add"]) { - echo "" . lang('Unable to operate indexes') . ": " . htmlspecialchars($error) . "
\n"; - } else { + if ($_POST["add"]) { foreach ($row["indexes"] as $key => $index) { if (strlen($index["columns"][count($index["columns"])])) { $row["indexes"][$key]["columns"][] = ""; diff --git a/lang/cs.inc.php b/lang/cs.inc.php index ad82bae8..7fa3723e 100644 --- a/lang/cs.inc.php +++ b/lang/cs.inc.php @@ -167,4 +167,5 @@ $translations = array( 'all' => 'vše', 'Delete selected' => 'Smazat označené', 'Truncate table' => 'Promazat tabulku', + 'Too big POST data. Reduce the data or increase the "post_max_size" configuration directive.' => 'Příliš velká POST data. Zmenšete data nebo zvyšte hodnotu konfigurační direktivy "post_max_size".', ); diff --git a/procedure.inc.php b/procedure.inc.php index f80384e4..e9629ce0 100644 --- a/procedure.inc.php +++ b/procedure.inc.php @@ -29,12 +29,14 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"]) { } $error = $mysql->error; } - 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')) ); +if ($error) { + echo "" . lang('Unable to operate routine') . ": " . htmlspecialchars($error) . "
\n"; +} $collations = get_vals("SHOW CHARACTER SET"); if ($_POST) { $row = $_POST; @@ -43,8 +45,6 @@ if ($_POST) { $row["fields"] = array_values($row["fields"]); if ($_POST["add"]) { array_splice($row["fields"], key($_POST["add"]), 0, array(array())); - } elseif (!$_POST["drop_col"]) { - echo "" . lang('Unable to operate routine') . ": " . htmlspecialchars($error) . "
\n"; } } elseif (strlen($_GET["procedure"])) { $row = routine($_GET["procedure"], $routine); diff --git a/processlist.inc.php b/processlist.inc.php index f8dfc170..1cd3dabd 100644 --- a/processlist.inc.php +++ b/processlist.inc.php @@ -11,10 +11,9 @@ if ($_POST && !$error) { } $error = $mysql->error; } - page_header(lang('Process list')); -if ($_POST) { +if ($error) { echo "" . lang('Unable to kill process') . ": " . htmlspecialchars($error) . "
\n"; } ?> diff --git a/select.inc.php b/select.inc.php index 27671835..1476606c 100644 --- a/select.inc.php +++ b/select.inc.php @@ -83,9 +83,9 @@ if ($_POST && !$error) { } $error = $mysql->error; } - page_header(lang('Select') . ": " . htmlspecialchars($_GET["select"])); -if ($_POST) { + +if ($error) { echo "" . lang('Error during deleting') . ": " . htmlspecialchars($error) . "
\n"; } diff --git a/sql.inc.php b/sql.inc.php index b6088ae4..d461584c 100644 --- a/sql.inc.php +++ b/sql.inc.php @@ -3,11 +3,10 @@ if (isset($_POST["query"])) { setcookie("highlight", $_POST["highlight"], strtotime("+1 month"), preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"])); $_COOKIE["highlight"] = $_POST["highlight"]; } - page_header(lang('SQL command')); -if ($_POST && $error) { - echo "$error
\n"; +if ($error) { + echo "" . htmlspecialchars($error) . "
\n"; } elseif ($_POST && is_string($query = (isset($_POST["query"]) ? $_POST["query"] : get_file("sql_file")))) { $delimiter = ";"; $offset = 0; diff --git a/trigger.inc.php b/trigger.inc.php index b74b3962..4a72bd5c 100644 --- a/trigger.inc.php +++ b/trigger.inc.php @@ -19,12 +19,13 @@ if ($_POST && !$error) { } $error = $mysql->error; } - page_header(strlen($_GET["name"]) ? lang('Alter trigger') . ": " . htmlspecialchars($_GET["name"]) : lang('Create trigger'), array("table" => $_GET["trigger"])); +if ($error) { + echo "" . lang('Unable to operate trigger') . ": " . htmlspecialchars($error) . "
\n"; +} if ($_POST) { $row = $_POST; - echo "" . lang('Unable to operate trigger') . ": " . htmlspecialchars($error) . "
\n"; } elseif (strlen($_GET["name"])) { $result = $mysql->query("SHOW TRIGGERS LIKE '" . $mysql->escape_string(addcslashes($_GET["trigger"], "%_")) . "'"); while ($row = $result->fetch_assoc()) { diff --git a/user.inc.php b/user.inc.php index 6bd8c784..e74d1e70 100644 --- a/user.inc.php +++ b/user.inc.php @@ -117,13 +117,14 @@ if ($_POST && !$error) { $error = $mysql->error; } } - page_header((isset($_GET["host"]) ? lang('Username') . ": " . htmlspecialchars("$_GET[user]@$_GET[host]") : lang('Create user')), array("privileges" => lang('Privileges'))); +if ($error) { + echo "" . lang('Unable to operate user') . ": " . htmlspecialchars($error) . "
\n"; +} if ($_POST) { $row = $_POST; $grants = $new_grants; - echo "" . lang('Unable to operate user') . ": " . htmlspecialchars($error) . "
\n"; } else { $row = $_GET + array("host" => "localhost"); $row["pass"] = $old_pass;