mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
PHP/Core
* enforced v7.1 compliance, preparations for v7.2 * removed deprecated usage of each() * prefer array deconstruction via [] instead of calling list() * try to catch failed session_start() * prefer ... - Token instead of calling func_get_args() func_num_args() * enforce return types in AjaxHandler * revision push
This commit is contained in:
@@ -13,7 +13,7 @@ if (!CLI)
|
||||
|
||||
function update()
|
||||
{
|
||||
list($date, $part) = array_values(DB::Aowow()->selectRow('SELECT `date`, `part` FROM ?_dbversion'));
|
||||
[$date, $part] = array_values(DB::Aowow()->selectRow('SELECT `date`, `part` FROM ?_dbversion'));
|
||||
|
||||
CLI::write('checking sql updates');
|
||||
|
||||
@@ -21,7 +21,7 @@ function update()
|
||||
foreach (glob('setup/updates/*.sql') as $file)
|
||||
{
|
||||
$pi = pathinfo($file);
|
||||
list($fDate, $fPart) = explode('_', $pi['filename']);
|
||||
[$fDate, $fPart] = explode('_', $pi['filename']);
|
||||
|
||||
$fData = intVal($fDate);
|
||||
|
||||
@@ -59,7 +59,7 @@ function update()
|
||||
CLI::write($nFiles ? 'applied '.$nFiles.' update(s)' : 'db is already up to date', CLI::LOG_OK);
|
||||
|
||||
// fetch sql/build after applying updates, as they may contain sync-prompts
|
||||
list($sql, $build) = array_values(DB::Aowow()->selectRow('SELECT `sql`, `build` FROM ?_dbversion'));
|
||||
[$sql, $build] = array_values(DB::Aowow()->selectRow('SELECT `sql`, `build` FROM ?_dbversion'));
|
||||
|
||||
sleep(1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user