mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Add HOOK_INSTALL_FINISH
This commit is contained in:
parent
66ecc487a1
commit
08ac8ebade
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use MyAAC\Cache\Cache;
|
||||
use MyAAC\Models\News;
|
||||
use MyAAC\Settings;
|
||||
|
||||
@ -11,15 +12,21 @@ if(isset($config['installed']) && $config['installed'] && !isset($_SESSION['save
|
||||
return;
|
||||
}
|
||||
|
||||
$cache = Cache::getInstance();
|
||||
if ($cache->enabled()) {
|
||||
// clear plugin_hooks to have fresh hooks
|
||||
$cache->delete('plugins_hooks');
|
||||
}
|
||||
|
||||
require SYSTEM . 'init.php';
|
||||
if($error) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(USE_ACCOUNT_NAME || USE_ACCOUNT_NUMBER)
|
||||
$account = isset($_SESSION['var_account']) ? $_SESSION['var_account'] : null;
|
||||
$account = $_SESSION['var_account'] ?? null;
|
||||
else
|
||||
$account_id = isset($_SESSION['var_account_id']) ? $_SESSION['var_account_id'] : null;
|
||||
$account_id = $_SESSION['var_account_id'] ?? null;
|
||||
|
||||
$password = $_SESSION['var_password'];
|
||||
|
||||
@ -190,3 +197,5 @@ unset($_SESSION['saved']);
|
||||
if(file_exists(CACHE . 'install.txt')) {
|
||||
unlink(CACHE . 'install.txt');
|
||||
}
|
||||
|
||||
$hooks->trigger(HOOK_INSTALL_FINISH);
|
||||
|
@ -74,6 +74,7 @@ define('HOOK_GUILDS_AFTER_GUILD_MEMBERS', ++$i);
|
||||
define('HOOK_GUILDS_AFTER_INVITED_CHARACTERS', ++$i);
|
||||
define('HOOK_TWIG', ++$i);
|
||||
define('HOOK_CACHE_CLEAR', ++$i);
|
||||
define('HOOK_INSTALL_FINISH', ++$i);
|
||||
|
||||
const HOOK_FIRST = HOOK_STARTUP;
|
||||
define('HOOK_LAST', $i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user