diff --git a/event.inc.php b/event.inc.php index 94fdd51d..4eb53b42 100644 --- a/event.inc.php +++ b/event.inc.php @@ -43,7 +43,7 @@ if ($_POST) { " size="6" /> " maxlength="64" /> -

diff --git a/include/editing.inc.php b/include/editing.inc.php index f40ffb6e..a55e9612 100644 --- a/include/editing.inc.php +++ b/include/editing.inc.php @@ -4,7 +4,7 @@ function input($name, $field, $value, $separator = "") { //! pass empty $name = htmlspecialchars(bracket_escape($name)); echo ""; if ($field["type"] == "enum") { - echo $separator . (isset($_GET["select"]) ? ' ' : ""); + echo ($separator ? " $separator" : "") . (isset($_GET["select"]) ? ' ' : ""); if ($field["null"] || isset($_GET["default"])) { echo ' '; } @@ -42,7 +42,7 @@ function input($name, $field, $value, $separator = "") { //! pass empty if ($field["null"] || isset($_GET["default"])) { array_unshift($options, "NULL"); } - echo (count($options) > 1 || isset($_GET["select"]) ? '' : "") . $separator; + echo (count($options) > 1 || isset($_GET["select"]) ? '' : ($separator ? " " : "")) . $separator; if ($field["type"] == "set") { //! 64 bits preg_match_all("~'((?:[^']+|'')*)'~", $field["length"], $matches); foreach ($matches[1] as $i => $val) { diff --git a/include/functions.inc.php b/include/functions.inc.php index 330b06cf..34e32a30 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -201,6 +201,8 @@ function select($result, $dbh2 = null) { } else { if ($blobs[$key] && !is_utf8($val)) { $val = "" . lang('%d byte(s)', strlen($val)) . ""; //! link to download + } elseif (!strlen(trim($val))) { + $val = " "; } else { $val = nl2br(htmlspecialchars($val)); if ($types[$key] == 254) { diff --git a/index.php b/index.php index 8b91c6b6..02b52737 100644 --- a/index.php +++ b/index.php @@ -176,11 +176,11 @@ if (isset($_GET["download"])) { echo '' . htmlspecialchars($row["Name"]) . "$row[Engine]$row[Collation]"; foreach (array("Data_length" => "create", "Index_length" => "indexes", "Data_free" => "edit", "Auto_increment" => "create", "Rows" => "select") as $key => $link) { $val = number_format($row[$key], 0, '.', lang(',')); - echo '' . (strlen($row[$key]) ? '' . ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? lang('~ %s', $val) : $val) . '' : '') . ''; + echo '' . (strlen($row[$key]) ? '' . ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? lang('~ %s', $val) : $val) . '' : ' ') . ''; } - echo "" . htmlspecialchars($row["Comment"]) . ""; + echo "" . (strlen(trim($row["Comment"])) ? htmlspecialchars($row["Comment"]) : " ") . ""; } else { - echo '' . htmlspecialchars($row["Name"]) . '' . lang('View') . ''; + echo ' ' . htmlspecialchars($row["Name"]) . '' . lang('View') . ''; } echo "\n"; } diff --git a/privileges.inc.php b/privileges.inc.php index 5d1a6140..c026b378 100644 --- a/privileges.inc.php +++ b/privileges.inc.php @@ -15,7 +15,7 @@ if (!$result) { $result = $dbh->query("SELECT SUBSTRING_INDEX(CURRENT_USER, '@', 1) AS User, SUBSTRING_INDEX(CURRENT_USER, '@', -1) AS Host"); } echo "\n"; -echo "\n"; +echo "\n"; while ($row = $result->fetch_assoc()) { echo '\n"; } diff --git a/processlist.inc.php b/processlist.inc.php index b5c88150..aea5c2c4 100644 --- a/processlist.inc.php +++ b/processlist.inc.php @@ -17,7 +17,7 @@ page_header(lang('Process list'), $error); $result = $dbh->query("SHOW PROCESSLIST"); for ($i=0; $row = $result->fetch_assoc(); $i++) { if (!$i) { - echo "\n"; + echo "\n"; } echo "\n"; } diff --git a/select.inc.php b/select.inc.php index 59556f2d..b6a93752 100644 --- a/select.inc.php +++ b/select.inc.php @@ -249,7 +249,9 @@ if (!$columns) { } elseif (preg_match('~blob|binary~', $fields[$key]["type"]) && !is_utf8($val)) { $val = '' . lang('%d byte(s)', strlen($val)) . ''; } else { - if (intval($text_length) > 0 && preg_match('~blob|text~', $fields[$key]["type"])) { + if (!strlen(trim($val))) { + $val = " "; + } elseif (intval($text_length) > 0 && preg_match('~blob|text~', $fields[$key]["type"])) { $val = shorten_utf8($val, intval($text_length)); } else { $val = nl2br(htmlspecialchars($val)); diff --git a/table.inc.php b/table.inc.php index 7c13a05d..682730bd 100644 --- a/table.inc.php +++ b/table.inc.php @@ -52,7 +52,7 @@ if ($result) { $link = (strlen($foreign_key["db"]) ? "" . htmlspecialchars($foreign_key["db"]) . "." : "") . htmlspecialchars($foreign_key["table"]); echo '"; - echo ''; + echo ''; echo "\n"; } echo "
" . lang('Username') . "" . lang('Server') . "
 " . lang('Username') . "" . lang('Server') . "
' . lang('edit') . '' . htmlspecialchars($row["User"]) . "" . htmlspecialchars($row["Host"]) . "
" . implode("", array_keys($row)) . "
 " . implode("", array_keys($row)) . "
" . implode("", $row) . "
$link"; echo "(" . implode(", ", array_map('htmlspecialchars', $foreign_key["target"])) . ")' . (!strlen($foreign_key["db"]) ? '' . lang('Alter') . '' : '') . '' . (!strlen($foreign_key["db"]) ? '' . lang('Alter') . '' : ' ') . '
\n"; diff --git a/user.inc.php b/user.inc.php index 75be7523..b7dc681c 100644 --- a/user.inc.php +++ b/user.inc.php @@ -162,7 +162,7 @@ foreach (array( $name = '"grants[' . $i . '][' . htmlspecialchars(strtoupper($privilege)) . ']"'; $value = $grant[strtoupper($privilege)]; if ($context == "Server Admin" && $object != (isset($grants["*.*"]) ? "*.*" : "")) { - echo ""; + echo " "; } elseif (isset($_GET["grant"])) { echo ""; } else {