mirror of
https://github.com/vrana/adminer.git
synced 2025-08-25 15:31:15 +02:00
Code style: Add more checks
This commit is contained in:
@@ -98,8 +98,9 @@ function pre_tr($s) {
|
||||
}
|
||||
$table = '(\+--[-+]+\+\n)';
|
||||
$row = '(\| .* \|\n)';
|
||||
echo
|
||||
preg_replace_callback("~^$table?$row$table?($row*)$table?~m", function ($match) {
|
||||
echo preg_replace_callback(
|
||||
"~^$table?$row$table?($row*)$table?~m",
|
||||
function ($match) {
|
||||
$first_row = pre_tr($match[2]);
|
||||
return "<table>\n" . ($match[1] ? "<thead>$first_row</thead>\n" : $first_row) . pre_tr($match[4]) . "\n</table>";
|
||||
},
|
||||
@@ -107,6 +108,7 @@ echo
|
||||
'~(\n( -|mysql)> )(.+)~',
|
||||
"\\1<code class='jush-sql'>\\3</code>",
|
||||
preg_replace('~(.+)\n---+\n~', "<b>\\1</b>\n", h($routine['comment']))
|
||||
));
|
||||
)
|
||||
);
|
||||
?>
|
||||
</pre>
|
||||
|
@@ -571,9 +571,9 @@ ORDER BY conkey, conname") as $row
|
||||
if ($comment !== null) {
|
||||
$queries[] = "COMMENT ON TABLE " . table($name) . " IS " . q($comment);
|
||||
}
|
||||
if ($auto_increment != "") {
|
||||
// if ($auto_increment != "") {
|
||||
//! $queries[] = "SELECT setval(pg_get_serial_sequence(" . q($name) . ", ), $auto_increment)";
|
||||
}
|
||||
// }
|
||||
foreach ($queries as $query) {
|
||||
if (!queries($query)) {
|
||||
return false;
|
||||
|
@@ -591,11 +591,11 @@ function ini_bytes($ini) {
|
||||
$val = ini_get($ini);
|
||||
switch (strtolower(substr($val, -1))) {
|
||||
case 'g':
|
||||
$val = (int)$val * 1024; // no break
|
||||
$val = (int) $val * 1024; // no break
|
||||
case 'm':
|
||||
$val = (int)$val * 1024; // no break
|
||||
$val = (int) $val * 1024; // no break
|
||||
case 'k':
|
||||
$val = (int)$val * 1024;
|
||||
$val = (int) $val * 1024;
|
||||
}
|
||||
return $val;
|
||||
}
|
||||
|
Reference in New Issue
Block a user