mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 06:37:33 +02:00
Fix errors discovered by tests
This commit is contained in:
@@ -233,7 +233,7 @@ if (support("partitioning")) {
|
||||
echo '<tr>';
|
||||
echo '<td><input name="partition_names[]" value="' . h($val) . '" autocapitalize="off">';
|
||||
echo ($key == count($row["partition_names"]) - 1 ? script("qsl('input').oninput = partitionNameChange;") : '');
|
||||
echo '<td><input name="partition_values[]" value="' . h($row["partition_values"][$key]) . '">';
|
||||
echo '<td><input name="partition_values[]" value="' . h(idx($row["partition_values"], $key)) . '">';
|
||||
}
|
||||
echo "</table>\n</div></fieldset>\n";
|
||||
}
|
||||
|
@@ -385,7 +385,7 @@ if (isset($_GET["sqlite"])) {
|
||||
|
||||
function drop_databases($databases) {
|
||||
global $connection;
|
||||
$connection->__construct(":memory:"); // to unlock file, doesn't work in PDO on Windows
|
||||
$connection->connect(":memory:"); // to unlock file, doesn't work in PDO on Windows
|
||||
foreach ($databases as $db) {
|
||||
if (!@unlink($db)) {
|
||||
$connection->error = lang('File exists.');
|
||||
@@ -400,7 +400,7 @@ if (isset($_GET["sqlite"])) {
|
||||
if (!check_sqlite_name($name)) {
|
||||
return false;
|
||||
}
|
||||
$connection->__construct(":memory:");
|
||||
$connection->connect(":memory:");
|
||||
$connection->error = lang('File exists.');
|
||||
return @rename(DB, $name);
|
||||
}
|
||||
|
@@ -385,7 +385,7 @@ class Adminer {
|
||||
$i = 0;
|
||||
$select[""] = array();
|
||||
foreach ($select as $key => $val) {
|
||||
$val = $_GET["columns"][$key];
|
||||
$val = idx($_GET["columns"], $key, array());
|
||||
$column = select_input(
|
||||
" name='columns[$i][col]'",
|
||||
$columns,
|
||||
@@ -879,7 +879,7 @@ class Adminer {
|
||||
$values = array();
|
||||
foreach ($row as $val) {
|
||||
$field = $result->fetch_field();
|
||||
if ($fields[$field->name]['generated']) {
|
||||
if (idx($fields[$field->name], 'generated')) {
|
||||
$generated[$field->name] = true;
|
||||
continue;
|
||||
}
|
||||
|
@@ -139,7 +139,7 @@ foreach ($row["indexes"] as $index) {
|
||||
"partial(" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . ", '" . js_escape(JUSH == "sql" ? "" : $_GET["indexes"] . "_") . "')"
|
||||
);
|
||||
echo "<span class='idxopts" . ($show_options ? "" : " hidden") . "'>";
|
||||
echo ($lengths ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "' title='" . lang('Length') . "'>" : "");
|
||||
echo ($lengths ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h(idx($index["lengths"], $key)) . "' title='" . lang('Length') . "'>" : "");
|
||||
echo (support("descidx") ? checkbox("indexes[$j][descs][$i]", 1, idx($index["descs"], $key), lang('descending')) : "");
|
||||
echo "</span> </span>";
|
||||
$i++;
|
||||
|
@@ -145,7 +145,7 @@
|
||||
<table cellpadding="1" cellspacing="1" border="1">
|
||||
<thead><tr><td rowspan="1" colspan="3">Schema</td></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>open</td><td>/adminer/sqlite.php?sqlite=&username=ODBC&db=adminer_test&schema=</td><td></td></tr>
|
||||
<tr><td>open</td><td>/adminer/sqlite.php?sqlite=&username=ODBC&db=adminer_test.sqlite&schema=</td><td></td></tr>
|
||||
<tr><td>verifyTextPresent</td><td>Permanent link</td><td></td></tr>
|
||||
</tbody></table>
|
||||
|
||||
|
Reference in New Issue
Block a user