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

pull/231/head
David Goodwin 7 years ago
parent e26877f2f9
commit 98536f03e8

@ -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 "

@ -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>

@ -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;
}
}

@ -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');

Loading…
Cancel
Save