0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

fix sqlite upgrade check; remove test database between runs; ignore lib/array_column.php from linting

This commit is contained in:
David Goodwin 2019-01-06 21:39:54 +00:00
parent e26877f2f9
commit 98536f03e8
4 changed files with 8 additions and 9 deletions

View File

@ -13,7 +13,7 @@
],
"check-format": "php-cs-fixer fix --ansi --dry-run --diff",
"format": "php-cs-fixer fix --ansi",
"lint": "@php ./vendor/bin/parallel-lint --exclude vendor/ --exclude lib/block_random_int.php .",
"lint": "@php ./vendor/bin/parallel-lint --exclude vendor/ --exclude lib/block_random_int.php --exclude lib/array_column.php .",
"test": "@php ./vendor/bin/phpunit tests/",
"test-fixup": "mkdir -p templates_c ; test -f config.local.php || touch config.local.php",
"psalm": "@php ./vendor/bin/psalm --show-info=false "

View File

@ -346,8 +346,7 @@ if ($error != 0) {
<td colspan="3"><h4>Warning: connection not secure, switch to https if possible</h4></td>
</tr>
<?php
endif;
?>
endif; ?>
<tr>
<td><label for="setup_password">Setup password</label></td>
<td><input class="flat" type="password" name="setup_password" id="setup_password" value="" /></td>
@ -387,8 +386,7 @@ if ($error != 0) {
<td colspan="3"><h4>Warning: connection not secure, switch to https if possible</h4></td>
</tr>
<?php
endif;
?>
endif; ?>
<tr>
<td><label for="setup_password">Setup password</label></td>
<td><input id=setup_password class="flat" type="password" name="setup_password" value="" /></td>

View File

@ -66,7 +66,7 @@ function _sqlite_field_exists($table, $field) {
$r = db_query_all($sql);
foreach ($r as $row) {
if ($row[1] == $field) {
if ($row['name'] == $field) {
return true;
}
}

View File

@ -18,9 +18,10 @@ Config::write('database_type', 'sqlite');
Config::write('database_name', $db_file);
clearstatcache();
//if (file_exists($db_file)) {
// unlink($db_file);
//}
if (file_exists($db_file)) {
unlink($db_file);
}
require_once(dirname(__FILE__) . '/../public/upgrade.php');