1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-23 06:32:55 +02:00

Code style: Indent long statements

This commit is contained in:
Jakub Vrana
2025-03-05 15:01:05 +01:00
parent ed5de27dd3
commit 105999f62e
12 changed files with 26 additions and 19 deletions

View File

@@ -569,7 +569,8 @@ class Adminer {
// find anywhere
$cols = array();
foreach ($fields as $name => $field) {
if ((preg_match('~^[-\d.' . (preg_match('~IN$~', $val["op"]) ? ',' : '') . ']+$~', $val["val"]) || !preg_match('~' . number_type() . '|bit~', $field["type"]))
if (
(preg_match('~^[-\d.' . (preg_match('~IN$~', $val["op"]) ? ',' : '') . ']+$~', $val["val"]) || !preg_match('~' . number_type() . '|bit~', $field["type"]))
&& (!preg_match("~[\x80-\xFF]~", $val["val"]) || preg_match('~char|text|enum|set~', $field["type"]))
&& (!preg_match('~date|timestamp~', $field["type"]) || preg_match('~^\d+-\d+-\d+~', $val["val"]))
) {

View File

@@ -66,7 +66,8 @@ if ($auth) {
$permanent[$key] = "$key:" . base64_encode($private ? encrypt_string($password, $private) : "");
cookie("adminer_permanent", implode(" ", $permanent));
}
if (count($_POST) == 1 // 1 - auth
if (
count($_POST) == 1 // 1 - auth
|| DRIVER != $vendor
|| SERVER != $server
|| $_GET["username"] !== $username // "0" == "00"