mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Setup
* automatically set and unset maintenance mode when data is being edited (either sql or files) * added more verbose help prompts. They should now always appear when -h is used. * added --setup as more intuitive command for --firstrun. --firstrun is now considered deprecated and will be removed in due time. * unfuck order of indizes in --siteconfig * fixed some typos * convert echo use to CLI::write * move scattered command line argument checks to CLISetup
This commit is contained in:
@@ -11,10 +11,23 @@ if (!CLI)
|
||||
/* automaticly apply sql-updates */
|
||||
/*********************************/
|
||||
|
||||
function update()
|
||||
function update() : array
|
||||
{
|
||||
[$date, $part] = array_values(DB::Aowow()->selectRow('SELECT `date`, `part` FROM ?_dbversion'));
|
||||
|
||||
if (CLISetup::getOpt('help'))
|
||||
{
|
||||
CLI::write();
|
||||
CLI::write(' usage: php aowow --update', -1, false);
|
||||
CLI::write();
|
||||
CLI::write(' Checks /setup/updates for new *.sql files and applies them. If required by an applied update, the --sql and --build command are triggered afterwards.', -1, false);
|
||||
CLI::write(' Use this after fetching the latest rev. from Github.', -1, false);
|
||||
CLI::write();
|
||||
CLI::write(' Last Update: '.date(Util::$dateFormatInternal, $date).' (Part #'.$part.')', -1, false);
|
||||
CLI::write();
|
||||
exit;
|
||||
}
|
||||
|
||||
CLI::write('checking sql updates');
|
||||
|
||||
$nFiles = 0;
|
||||
|
||||
Reference in New Issue
Block a user