DB/Structure

* fix data types and data length and add default values where necessary
 * data should no longer get truncated
 * misc fixes
This commit is contained in:
Sarjuuk
2024-05-22 17:53:31 +02:00
parent 7d5930865c
commit f6565ea924
15 changed files with 1980 additions and 2003 deletions

View File

@@ -155,7 +155,7 @@ function setup() : void
if ($rCode == 301 || $rCode == 302)
{
if (!empty($res['Location']) && preg_match("/(https?:\/\/)(.*)".strtr($testFile, ['/' => '\/', '.' => '\.'])."/i", $res['Location'], $n))
if (!empty($res['Location']) && preg_match("/(https?:\/\/)(.*)".strtr($testFile, ['/' => '\/', '.' => '\.'])."/i", is_array($res['Location']) ? array_pop($res['Location']) : $res['Location'], $n))
{
$protocol = $n[1];
$host = $n[2];

View File

@@ -173,6 +173,8 @@ function siteconfig() : void
$inp = ['idx' => ['', false, '/\d/']];
if (CLI::read($inp) && $inp && $inp['idx'] !== '')
{
$inp['idx'] = intVal($inp['idx']);
// add new php setting
if ($inp['idx'] == $sumNum)
{

View File

@@ -52,7 +52,7 @@ function sync(array $s = [], array $b = []) : void
DB::Aowow()->query('UPDATE ?_dbversion SET `build` = ?', $_ ? implode(' ', $_) : '');
}
if (!$s && !$_s && !$b && !$_b)
if (!$s && !$_s && !$b && !$_b && !CLISetup::getOpt('setup'))
CLI::write('no valid table names supplied', CLI::LOG_ERROR);
}