mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
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:
@@ -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];
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user