diff --git a/CHANGELOG-1.x.md b/CHANGELOG-1.x.md index 4c231dad..3efc7ad7 100644 --- a/CHANGELOG-1.x.md +++ b/CHANGELOG-1.x.md @@ -1,5 +1,18 @@ # Changelog +## [1.8.9 - 06.04.2026] +### Added +* Settings: Possibility to add custom HTML for the head and body tags like Google Analytics code etc. (https://github.com/slawkens/myaac/commit/108e83806df5686a06826931ed5e243c19cbe130) +* Add command: give-admin (https://github.com/slawkens/myaac/commit/9fa9ec746c4b344387a21f21886c2251319806fc) + * Usage: php aac give:admin slawkens@gmail.com + Parameter: account email, name or id + * It's admin for the website, not the GM for the game! For that, go into the admin panel and change the group manually +* Add page load time to an Admin Panel footer (https://github.com/slawkens/myaac/commit/4ae2fdd0dfcd56697612395c14aecc2dfd33b1c3) + +### Changed +* Better character name validation, like in the original game website (#356) +* Install: don't suggest deleting of install folder - it's not required (https://github.com/slawkens/myaac/commit/5fcde4708a39255cf68edc8c43f2ac6597e2601d) + ## [1.8.8 - 31.01.2026] ### Added * Change Comment: Add missing hooks - patched from 0.8 (https://github.com/slawkens/myaac/commit/a60a23b84f61d41d1503073b52e01e3120f6d92a) diff --git a/CHANGELOG-2.x.md b/CHANGELOG-2.x.md index 24e6694d..a066b4eb 100644 --- a/CHANGELOG-2.x.md +++ b/CHANGELOG-2.x.md @@ -1,9 +1,12 @@ ## [2.0-dev - x.x.2025] ### Added -* Add an "access" option to Menus (#340) - * Possibility to hide menus for unauthorized users -* Add the possibility to fetch skills, balance and frags in the getTopPlayers function (#347) +* Menus: Add an "access" option to Menus (#340) + * Possibility to hide menus for unauthorized users +* Settings: Add Reset button (https://github.com/slawkens/myaac/commit/7104c2258fd724a55239821b46a616dab845b22a, https://github.com/slawkens/myaac/commit/e274b8350451a20c24e652ea05ed1964ebb86b54) +* New Setting: block create account spam by ip (https://github.com/slawkens/myaac/commit/54265f42e987522803288477952d6e5c4daeeb24) +* Functions: Add the possibility to fetch skills, balance and frags in the getTopPlayers function (#347) +* Plugins: autoload init-priority option (https://github.com/slawkens/myaac/commit/f1aa12840875960849fa0c99a2bbe0ad2949bbec) ### Changed * Better handling of vocations: (#345) @@ -11,6 +14,7 @@ * Support for Monk vocation * Better gallery, loads images from images/gallery folder * Reworked account action logs to use a single IP column as varchar(45) for both ipv4 and ipv6 (#289) +* Make myaac_config table columns bigger (https://github.com/slawkens/myaac/commit/2c62a97160a3ffe9976ee5bd1d770a0abc576742) * Admin Panel: save menu collapse state (https://github.com/slawkens/myaac/commit/55da00520df7463a1d1ca41931df1598e9f2ffeb) ### Internal diff --git a/README.md b/README.md index 54b27d07..ecea52f0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Official website: https://my-aac.org [![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/slawkens/myaac/cypress.yml)](https://github.com/slawkens/myaac/actions) [![License: GPL-3.0](https://img.shields.io/github/license/slawkens/myaac)](https://opensource.org/licenses/gpl-license) [![Downloads Count](https://img.shields.io/github/downloads/slawkens/myaac/total)](https://github.com/slawkens/myaac/releases) -[![OpenTibia Discord](https://img.shields.io/discord/288399552581468162)](https://discord.gg/2J39Wus) +[![MyAAC Discord](https://img.shields.io/discord/1468205461319848049)](https://discord.gg/aVagGPJt3g) [![Closed Issues](https://img.shields.io/github/issues-closed-raw/slawkens/myaac)](https://github.com/slawkens/myaac/issues?q=is%3Aissue+is%3Aclosed) | Version | Status | Branch | Requirements | @@ -86,12 +86,6 @@ Look: [Contributing](https://docs.my-aac.org/misc/contributing) in our wiki. If you have a great idea or want to contribute to the project - visit our website at https://www.my-aac.org -## Project supported by JetBrains - -Many thanks to Jetbrains for kindly providing a license for me to work on this and other open-source projects. - -[![JetBrains](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/?from=https://github.com/slawkens) - ### License This program and all associated files are released under the GNU Public License. diff --git a/admin/pages/settings.php b/admin/pages/settings.php index 2c4979e1..5a708380 100644 --- a/admin/pages/settings.php +++ b/admin/pages/settings.php @@ -46,6 +46,15 @@ if (!is_array($settingsFile)) { return; } +if (isset($_POST['reset']) && $_POST['reset'] == '1') { + $settings = Settings::getInstance(); + + $settings->deleteFromDatabase($settingsFile['key']); + $settings->clearCache(); + + success('Settings for this plugin has been reset.'); +} + $settingsKeyName = ($plugin == 'core' ? $plugin : $settingsFile['key']); $title = ($plugin == 'core' ? 'Settings' : 'Plugin Settings - ' . $settingsFile['name']); @@ -57,4 +66,5 @@ $twig->display('admin.settings.html.twig', [ 'settings' => $settingsFile['settings'], 'script' => $settingsParsed['script'], 'settingsKeyName' => $settingsKeyName, + 'pluginName' => $plugin, ]); diff --git a/admin/template/template.php b/admin/template/template.php index cdb20519..318e14f1 100644 --- a/admin/template/template.php +++ b/admin/template/template.php @@ -172,7 +172,8 @@
- + + diff --git a/common.php b/common.php index 3ea4681c..af48a960 100644 --- a/common.php +++ b/common.php @@ -27,7 +27,7 @@ if (version_compare(phpversion(), '8.1', '<')) die('PHP version 8.1 or higher is const MYAAC = true; const MYAAC_VERSION = '2.0-dev'; -const DATABASE_VERSION = 50; +const DATABASE_VERSION = 52; const TABLE_PREFIX = 'myaac_'; define('START_TIME', microtime(true)); define('MYAAC_OS', stripos(PHP_OS, 'WIN') === 0 ? 'WINDOWS' : (strtoupper(PHP_OS) === 'DARWIN' ? 'MAC' : 'LINUX')); diff --git a/install/includes/schema.sql b/install/includes/schema.sql index 3d97be16..0c35aec0 100644 --- a/install/includes/schema.sql +++ b/install/includes/schema.sql @@ -5,7 +5,9 @@ CREATE TABLE IF NOT EXISTS `myaac_account_actions` `ip` varchar(45) NOT NULL DEFAULT '', `date` int NOT NULL DEFAULT 0, `action` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`id`) + PRIMARY KEY (`id`), + INDEX `myaac_account_actions_account_id` (`account_id`), + INDEX `myaac_account_actions_ip` (`ip`) ) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8mb4; CREATE TABLE IF NOT EXISTS `myaac_account_emails_verify` @@ -43,8 +45,8 @@ CREATE TABLE IF NOT EXISTS `myaac_changelog` CREATE TABLE IF NOT EXISTS `myaac_config` ( `id` int NOT NULL AUTO_INCREMENT, - `name` varchar(30) NOT NULL, - `value` varchar(1000) NOT NULL, + `name` varchar(255) NOT NULL, + `value` varchar(10000) NOT NULL, PRIMARY KEY (`id`), UNIQUE (`name`) ) ENGINE=InnoDB DEFAULT CHARACTER SET=utf8mb4; diff --git a/install/index.php b/install/index.php index 3893c9a2..c449cf09 100644 --- a/install/index.php +++ b/install/index.php @@ -30,7 +30,7 @@ if(file_exists(CACHE . 'install.txt')) { $install_status = unserialize(file_get_contents(CACHE . 'install.txt')); if(!isset($_REQUEST['step'])) { - $step = isset($install_status['step']) ? $install_status['step'] : ''; + $step = $install_status['step'] ?? ''; } } @@ -53,7 +53,7 @@ if($step == 'finish' && (!isset($config['installed']) || !$config['installed'])) // step verify $steps = array(1 => 'welcome', 2 => 'license', 3 => 'requirements', 4 => 'config', 5 => 'database', 6 => 'admin', 7 => 'finish'); -if(!in_array($step, $steps)) // check if step is valid +if(!in_array($step, $steps)) // check if a step is valid throw new RuntimeException('ERROR: Unknown step.'); $install_status['step'] = $step; @@ -61,7 +61,7 @@ $errors = array(); if($step == 'database') { foreach($_SESSION as $key => $value) { - if(strpos($key, 'var_') === false) { + if(!str_contains($key, 'var_')) { continue; } @@ -182,7 +182,7 @@ $error = false; clearstatcache(); if(is_writable(CACHE) && (MYAAC_OS != 'WINDOWS' || win_is_writable(CACHE))) { if(!file_exists(BASE . 'install/ip.txt')) { - $content = warning('AAC installation is disabled. To enable it make file ip.txt in install/ directory and put there your IP.
+ $content = warning('AAC installation is disabled. To enable it make a file ip.txt in install/ directory and put there your IP.
Your IP is:
' . get_browser_real_ip() . '', true); } else { @@ -198,7 +198,7 @@ if(is_writable(CACHE) && (MYAAC_OS != 'WINDOWS' || win_is_writable(CACHE))) { if(!$allow) { $content = warning('In file install/ip.txt must be your IP!
- In file is:
' . nl2br($file_content) . '
+ In the file is:
' . nl2br($file_content) . '
Your IP is:
' . get_browser_real_ip() . '', true); } else { diff --git a/install/tools/7-finish.php b/install/tools/7-finish.php index 2b429e37..727a4772 100644 --- a/install/tools/7-finish.php +++ b/install/tools/7-finish.php @@ -30,6 +30,8 @@ $up(); DataLoader::setLocale($locale); DataLoader::load(); +clearCache(); + // add menus entries require_once SYSTEM . 'migrations/17.php'; $up(); @@ -67,6 +69,10 @@ if(file_exists(CACHE . 'install.txt')) { unlink(CACHE . 'install.txt'); } +if(file_exists(BASE . 'install/ip.txt')) { + unlink(BASE . 'install/ip.txt'); +} + $locale['step_finish_desc'] = str_replace('$ADMIN_PANEL$', generateLink(str_replace('tools/', '',ADMIN_URL), $locale['step_finish_admin_panel'], true), $locale['step_finish_desc']); $locale['step_finish_desc'] = str_replace('$HOMEPAGE$', generateLink(str_replace('tools/', '', BASE_URL), $locale['step_finish_homepage'], true), $locale['step_finish_desc']); $locale['step_finish_desc'] = str_replace('$LINK$', generateLink('https://my-aac.org', 'https://my-aac.org', true), $locale['step_finish_desc']); diff --git a/login.php b/login.php index 438754e2..8f821ba0 100644 --- a/login.php +++ b/login.php @@ -93,9 +93,9 @@ switch ($action) { $creatureBoost = $db->query("SELECT * FROM " . $db->tableName('boosted_creature'))->fetchAll(); $bossBoost = $db->query("SELECT * FROM " . $db->tableName('boosted_boss'))->fetchAll(); die(json_encode([ - 'boostedcreature' => true, + //'boostedcreature' => true, + 'bossraceid' => intval($bossBoost[0]['raceid']), 'creatureraceid' => intval($creatureBoost[0]['raceid']), - 'bossraceid' => intval($bossBoost[0]['raceid']) ])); } diff --git a/package-lock.json b/package-lock.json index 4901f59f..2a675da8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1431,9 +1431,9 @@ } }, "node_modules/lodash": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", - "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", "dev": true, "license": "MIT" }, @@ -1743,9 +1743,9 @@ } }, "node_modules/qs": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", - "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", "dev": true, "license": "BSD-3-Clause", "dependencies": { diff --git a/system/locale/de/install.php b/system/locale/de/install.php index 351f6009..b725da9c 100644 --- a/system/locale/de/install.php +++ b/system/locale/de/install.php @@ -20,7 +20,7 @@ $locale['not_loaded'] = 'Nicht geladen'; $locale['loading_spinner'] = 'Bitte warten, installieren...'; $locale['importing_spinner'] = 'Bitte warte, Daten werden importiert...'; $locale['please_fill_all'] = 'Bitte füllen Sie alle Felder aus!'; -$locale['already_installed'] = 'MyAAC wurde bereits installiert. Bitte löschen install/ Verzeichnis. Wenn Sie MyAAC neu installieren möchten, löschen Sie die Datei config.local.php aus dem Hauptverzeichnis und aktualisieren Sie die Seite.'; +$locale['already_installed'] = 'MyAAC wurde bereits installiert. Wenn Sie MyAAC neu installieren möchten, löschen Sie die Datei config.local.php aus dem Hauptverzeichnis und aktualisieren Sie die Seite.'; // welcome $locale['step_welcome'] = 'Willkommen'; diff --git a/system/locale/en/install.php b/system/locale/en/install.php index c623035c..a278cd64 100644 --- a/system/locale/en/install.php +++ b/system/locale/en/install.php @@ -20,7 +20,7 @@ $locale['not_loaded'] = 'Not loaded'; $locale['loading_spinner'] = 'Please wait, installing...'; $locale['importing_spinner'] = 'Please wait, importing data...'; $locale['please_fill_all'] = 'Please fill all inputs!'; -$locale['already_installed'] = 'MyAAC has been already installed. Please delete install/ directory. If you want to reinstall MyAAC - please delete config.local.php file from the main directory and refresh the page.'; +$locale['already_installed'] = 'MyAAC has been already installed. If you want to reinstall MyAAC - please delete config.local.php file from the main directory and refresh the page.'; // welcome $locale['step_welcome'] = 'Welcome'; diff --git a/system/locale/pl/install.php b/system/locale/pl/install.php index a8ea0cf6..34152cfd 100644 --- a/system/locale/pl/install.php +++ b/system/locale/pl/install.php @@ -20,7 +20,7 @@ $locale['not_loaded'] = 'Nie załadowane'; $locale['loading_spinner'] = 'Proszę czekać, trwa instalacja...'; $locale['importing_spinner'] = 'Proszę czekać, trwa importowanie danych...'; $locale['please_fill_all'] = 'Proszę wypełnić wszystkie pola!'; -$locale['already_installed'] = 'MyAAC został już zainstalowany. Proszę usunąć katalog install/. Jeśli chcesz zainstalować MyAAC od nowa - proszę usuń plik config.local.php z katalogu głównego i odśwież stronę.'; +$locale['already_installed'] = 'MyAAC został już zainstalowany. Jeśli chcesz zainstalować MyAAC od nowa - proszę usuń plik config.local.php z katalogu głównego i odśwież stronę.'; // welcome $locale['step_welcome'] = 'Witamy'; diff --git a/system/locale/pt_br/install.php b/system/locale/pt_br/install.php index 3a9ca9cc..d6b89dee 100644 --- a/system/locale/pt_br/install.php +++ b/system/locale/pt_br/install.php @@ -20,7 +20,7 @@ $locale['not_loaded'] = 'Não carregado'; $locale['loading_spinner'] = 'Por favor aguarde, instalando...'; $locale['importing_spinner'] = 'Por favor, aguarde, importando dados...'; $locale['please_fill_all'] = 'Por favor, preencha todas as entradas!'; -$locale['already_installed'] = 'MyAAC já foi instalado. Por favor, apague o diretório install/ . Se você quiser reinstalar o MyAAC - exclua o arquivo config.local.php do diretório principal e atualize a página.'; +$locale['already_installed'] = 'MyAAC já foi instalado. Se você quiser reinstalar o MyAAC - exclua o arquivo config.local.php do diretório principal e atualize a página.'; // welcome $locale['step_welcome'] = 'Bem vindo'; diff --git a/system/locale/sv/install.php b/system/locale/sv/install.php index 328ce91a..3d0b3ffd 100644 --- a/system/locale/sv/install.php +++ b/system/locale/sv/install.php @@ -18,7 +18,7 @@ $locale['loaded'] = 'Laddad'; $locale['not_loaded'] = 'Inte Laddad'; $locale['please_fill_all'] = 'Vänligen fyll i allt!'; -$locale['already_installed'] = 'MyAAC är redan installerat. Vänligen ta bort install/ mappen. Om du vill installera MyAAC igen - ta bort filen config.local.php från huvudkatalogen och uppdatera sidan.'; +$locale['already_installed'] = 'MyAAC är redan installerat. Om du vill installera MyAAC igen - ta bort filen config.local.php från huvudkatalogen och uppdatera sidan.'; // welcome $locale['step_welcome'] = 'Välkommen'; diff --git a/system/migrations/51.php b/system/migrations/51.php new file mode 100644 index 00000000..dcb4341f --- /dev/null +++ b/system/migrations/51.php @@ -0,0 +1,10 @@ +modifyColumn(TABLE_PREFIX . 'config', 'name', "varchar(255) NOT NULL"); + $db->modifyColumn(TABLE_PREFIX . 'config', 'value', "varchar(10000) NOT NULL"); +}; + +$down = function () { + // nothing to do, to not lose data +}; diff --git a/system/migrations/52.php b/system/migrations/52.php new file mode 100644 index 00000000..4f4e5108 --- /dev/null +++ b/system/migrations/52.php @@ -0,0 +1,13 @@ +query("CREATE INDEX `myaac_account_actions_account_id` ON `myaac_account_actions` (`account_id`);"); + $db->query("CREATE INDEX `myaac_account_actions_ip` ON `myaac_account_actions` (`ip`);"); +}; + +$down = function () { + // nothing to do, to not lose data +}; diff --git a/system/pages/account/create.php b/system/pages/account/create.php index 5d9edf59..093c2707 100644 --- a/system/pages/account/create.php +++ b/system/pages/account/create.php @@ -171,7 +171,7 @@ if($save) } if(setting('core.account_create_character_create')) { - $character_name = isset($_POST['name']) ? stripslashes(ucwords(strtolower($_POST['name']))) : null; + $character_name = isset($_POST['name']) ? trim(stripslashes($_POST['name'])) : null; $character_sex = isset($_POST['sex']) ? (int)$_POST['sex'] : null; $character_vocation = isset($_POST['vocation']) ? (int)$_POST['vocation'] : null; $character_town = isset($_POST['town']) ? (int)$_POST['town'] : null; diff --git a/system/src/Commands/GiveAdminCommand.php b/system/src/Commands/GiveAdminCommand.php index d2565783..61070a95 100644 --- a/system/src/Commands/GiveAdminCommand.php +++ b/system/src/Commands/GiveAdminCommand.php @@ -39,7 +39,7 @@ class GiveAdminCommand extends Command } if (!$account->isLoaded()) { - $io->error('Cannot find account mit supplied parameter: ' . $accountParam); + $io->error('Cannot find account with supplied parameter: ' . $accountParam); return self::FAILURE; } diff --git a/system/src/Hooks.php b/system/src/Hooks.php index 8dac8eda..75ad0fe4 100644 --- a/system/src/Hooks.php +++ b/system/src/Hooks.php @@ -14,6 +14,26 @@ class Hooks self::$_hooks[$hook->type()][] = $hook; } + public function unregister($name, $type, $file): void + { + if (is_string($type)) { + $type = constant($type); + } + + if(!isset(self::$_hooks[$type])) { + return; + } + + foreach(self::$_hooks[$type] as $id => $hook) { + if($name == $hook->name() + && $type == $hook->type() + && $file == $hook->file() + ) { + unset(self::$_hooks[$type][$id]); + } + } + } + public function trigger($type, $params = []): bool { $ret = true; diff --git a/system/src/Models/Account.php b/system/src/Models/Account.php index 4b44b153..07655b6d 100644 --- a/system/src/Models/Account.php +++ b/system/src/Models/Account.php @@ -18,6 +18,15 @@ class Account extends Model { public $timestamps = false; + protected $fillable = [ + 'name', 'number', 'email', 'password', + 'key', 'created', 'rlname', 'location', 'country', + 'web_lastlogin', 'web_flags', + 'email_new', 'email_new_time', 'email_code', + 'premium_points', 'coins', 'coins_transferable', + 'premium_ends_at', 'premend', 'lastday', 'premdays', + ]; + protected $casts = [ 'lastday' => 'integer', 'premdays' => 'integer', diff --git a/system/src/Models/BugTracker.php b/system/src/Models/BugTracker.php deleted file mode 100644 index 8c97ce4a..00000000 --- a/system/src/Models/BugTracker.php +++ /dev/null @@ -1,15 +0,0 @@ - $path, + 'priority' => $initPriority + ]; } } - return $inits; + usort($inits, function ($a, $b) + { + return $a['priority'] <=> $b['priority']; + }); + + $ret = []; + foreach ($inits as $init) { + $ret[] = $init['file']; + } + + return $ret; }); } @@ -39,7 +59,7 @@ class Plugins { continue; } - $adminPagesDefaultPriority = 1000; + $adminPagesDefaultPriority = self::DEFAULT_PRIORITY; if (isset($plugin['admin-pages-default-priority'])) { $adminPagesDefaultPriority = $plugin['admin-pages-default-priority']; } @@ -117,7 +137,7 @@ class Plugins { $routes = []; foreach(self::getAllPluginsJson() as $plugin) { - $routesDefaultPriority = 1000; + $routesDefaultPriority = self::DEFAULT_PRIORITY; if (isset($plugin['routes-default-priority'])) { $routesDefaultPriority = $plugin['routes-default-priority']; } @@ -165,7 +185,7 @@ class Plugins { } } - $pagesDefaultPriority = 1000; + $pagesDefaultPriority = self::DEFAULT_PRIORITY; if (isset($plugin['pages-default-priority'])) { $pagesDefaultPriority = $plugin['pages-default-priority']; } @@ -318,7 +338,7 @@ class Plugins { foreach(self::getAllPluginsJson() as $plugin) { if (isset($plugin['hooks'])) { foreach ($plugin['hooks'] as $_name => $info) { - $priority = 1000; + $priority = self::DEFAULT_PRIORITY; if (str_contains($info['type'], 'HOOK_')) { $info['type'] = str_replace('HOOK_', '', $info['type']); @@ -432,7 +452,7 @@ class Plugins { return $plugins; } - public static function getPluginSettings($filename) + public static function getPluginSettings($filename): mixed { $plugin_json = self::getPluginJson($filename); if (!$plugin_json) { @@ -868,6 +888,11 @@ class Plugins { } } + global $hooks; + foreach($plugin_info['hooks'] ?? [] as $name => $info) { + $hooks->unregister($name, $info['type'], $info['file']); + } + clearCache(); return true; } @@ -892,15 +917,15 @@ class Plugins { return Semver::satisfies($plugin_info['version'], $version); } - public static function getWarnings() { + public static function getWarnings(): array { return self::$warnings; } - public static function clearWarnings() { + public static function clearWarnings(): void { self::$warnings = []; } - public static function getError() { + public static function getError(): string { return self::$error; } @@ -911,7 +936,7 @@ class Plugins { * @param string $templateName * @param array $menus */ - public static function installMenus($templateName, $menus, $clearOld = false) + public static function installMenus($templateName, $menus, $clearOld = false): void { global $db; @@ -962,7 +987,7 @@ class Plugins { } } - private static function getAutoLoadOption(array $plugin, string $optionName, bool $default = true) + private static function getAutoLoadOption(array $plugin, string $optionName, bool $default = true): bool { if (isset($plugin['autoload'])) { $autoload = $plugin['autoload']; @@ -971,7 +996,7 @@ class Plugins { return getBoolean($autoload[$optionName]); } } - else if (is_bool($autoload)) { + elseif (is_bool($autoload)) { return $autoload; } } diff --git a/system/src/Settings.php b/system/src/Settings.php index e24eaa25..114e04e3 100644 --- a/system/src/Settings.php +++ b/system/src/Settings.php @@ -367,6 +367,7 @@ class Settings implements \ArrayAccess
+ +
+
{{ settingsParsed|raw }} @@ -18,6 +21,12 @@ + +
+ {{ csrf() }} + +
+