From 8b10f85bc1a6ccf1830f6e664156e40e9a35f2b3 Mon Sep 17 00:00:00 2001 From: slawkens Date: Wed, 4 Feb 2026 18:37:03 +0100 Subject: [PATCH 01/25] Start v1.8.9-dev --- common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.php b/common.php index 8f946c6e..8606cb1b 100644 --- a/common.php +++ b/common.php @@ -26,7 +26,7 @@ if (version_compare(phpversion(), '8.1', '<')) die('PHP version 8.1 or higher is required.'); const MYAAC = true; -const MYAAC_VERSION = '1.8.8'; +const MYAAC_VERSION = '1.8.9-dev'; const DATABASE_VERSION = 46; const TABLE_PREFIX = 'myaac_'; define('START_TIME', microtime(true)); From c82e537dc70bcbb2a3ab171668d9bb8f5186e217 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 15 Feb 2026 01:23:24 +0100 Subject: [PATCH 02/25] Bump qs from 6.14.1 to 6.14.2 (#353) Bumps [qs](https://github.com/ljharb/qs) from 6.14.1 to 6.14.2. - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.14.1...v6.14.2) --- updated-dependencies: - dependency-name: qs dependency-version: 6.14.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4901f59f..901e9c59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { From 4eb7f48fd749e7e9d3ba11906d7d50bff794da45 Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 24 Feb 2026 20:13:42 +0100 Subject: [PATCH 03/25] Update discord link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 54b27d07..15c26e05 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 | From f15b0122c6a65c515820c643b5b22592cc51ee58 Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 24 Feb 2026 20:35:20 +0100 Subject: [PATCH 04/25] Nothing important, code style & grammar --- install/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 { From 5fcde4708a39255cf68edc8c43f2ac6597e2601d Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 24 Feb 2026 21:04:20 +0100 Subject: [PATCH 05/25] Install: don't suggest deleting of install folder It is not needed Instead just remove ip.txt, this will lock the installation --- install/tools/7-finish.php | 6 ++++++ system/locale/de/install.php | 2 +- system/locale/en/install.php | 2 +- system/locale/pl/install.php | 2 +- system/locale/pt_br/install.php | 2 +- system/locale/sv/install.php | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/install/tools/7-finish.php b/install/tools/7-finish.php index 9c64382b..3ddd0afe 100644 --- a/install/tools/7-finish.php +++ b/install/tools/7-finish.php @@ -57,6 +57,8 @@ if ($db->hasTable('players')) { DataLoader::setLocale($locale); DataLoader::load(); +clearCache(); + // add menus entries require_once SYSTEM . 'migrations/17.php'; $up(); @@ -105,6 +107,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/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'; From 2bf5f5a1dbe678976c36cec3acbb9813891d321d Mon Sep 17 00:00:00 2001 From: slawkens Date: Thu, 26 Feb 2026 16:46:13 +0100 Subject: [PATCH 06/25] Update GiveAdminCommand.php --- system/src/Commands/GiveAdminCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } From 4ae2fdd0dfcd56697612395c14aecc2dfd33b1c3 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 15 Mar 2026 13:02:22 +0100 Subject: [PATCH 07/25] Add page load time to admin panel --- admin/template/template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/template/template.php b/admin/template/template.php index c6b8747b..7ca4492c 100644 --- a/admin/template/template.php +++ b/admin/template/template.php @@ -172,7 +172,8 @@
- + + From dd97a749b4fda78af59b69886788bd33ca7b9c90 Mon Sep 17 00:00:00 2001 From: Slawomir Boczek Date: Mon, 6 Apr 2026 10:41:29 +0200 Subject: [PATCH 08/25] Better name validation, like in the original game website (#356) * Better name validation, like in the original game website * Don't automatically ucfirst and strtolower the cases of the word * This allows for names like: Lord of Ring, Man of the Earth etc. * Don't allow special characters like: -, [], ' * Don't allow one letter words * Require at least one vowel per word * Add notice about admin logged in * Add trim, for future Currently its stripped anyway in the init.php, but AI don't know it :P Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Implement AI recommended changes * Update tools/validate.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Trim $name * Update Validator.php --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- system/pages/account/create.php | 2 +- system/src/Validator.php | 58 ++++++++++++++++++++++----------- tools/validate.php | 12 ++++--- 3 files changed, 47 insertions(+), 25 deletions(-) diff --git a/system/pages/account/create.php b/system/pages/account/create.php index 731771b7..eb41ece5 100644 --- a/system/pages/account/create.php +++ b/system/pages/account/create.php @@ -160,7 +160,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/Validator.php b/system/src/Validator.php index 7261454e..8857f07b 100644 --- a/system/src/Validator.php +++ b/system/src/Validator.php @@ -183,7 +183,7 @@ class Validator return false; } - // installer doesn't know config.php yet + // installer doesn't know settings yet // that's why we need to ignore the nulls if(defined('MYAAC_INSTALL')) { $minLength = 4; @@ -207,21 +207,15 @@ class Validator return false; } - if(strspn($name, "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM- [ ] '") != $length) + if(strspn($name, "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM ") != $length) { - self::$lastError = "Invalid name format. Use only A-Z, spaces and '."; + self::$lastError = "This name contains invalid letters. Please use only A-Z, a-z and space!"; return false; } if(preg_match('/ {2,}/', $name)) { - self::$lastError = 'Invalid character name format. Use only A-Z and no double spaces.'; - return false; - } - - if(!preg_match("/[A-z ']/", $name)) - { - self::$lastError = "Invalid name format. Use only A-Z, spaces and '."; + self::$lastError = 'Invalid character name format. Use only A-Z, a-z and no double spaces.'; return false; } @@ -230,17 +224,23 @@ class Validator /** * Validate new character name. - * Name lenght must be 3-25 chars + * Name length must be 3-25 chars * * @param string $name Name to check * @return bool Is name valid? */ public static function newCharacterName($name) { - global $db, $config; + global $db; + $name = trim($name); $name_lower = strtolower($name); + if(strlen($name) < 1) { + self::$lastError = 'Please enter a name.'; + return false; + } + $first_words_blocked = array_merge(["'", '-'], setting('core.create_character_name_blocked_prefix')); foreach($first_words_blocked as $word) { if($word == substr($name_lower, 0, strlen($word))) { @@ -249,11 +249,6 @@ class Validator } } - if(str_ends_with($name_lower, "'") || str_ends_with($name_lower, "-")) { - self::$lastError = 'Your name contains illegal characters.'; - return false; - } - if(substr($name_lower, 1, 1) == ' ') { self::$lastError = 'Your name contains illegal space.'; return false; @@ -265,11 +260,36 @@ class Validator } if(preg_match('/ {2,}/', $name)) { - self::$lastError = 'Invalid character name format. Use only A-Z and numbers 0-9 and no double spaces.'; + self::$lastError = 'Invalid character name format. Use only A-Z and no double spaces.'; return false; } - if(strtolower($config['lua']['serverName']) == $name_lower) { + if (substr($name[0], 0, 1) !== strtoupper(substr($name[0], 0, 1))) { + self::$lastError = 'The first letter of a name has to be a capital letter.'; + return false; + } + + foreach (explode(' ', $name) as $word) { + $wordCut = substr($word, 1, strlen($word)); + $hasUpperCase = preg_match('/[A-Z]/', $wordCut); + if ($hasUpperCase) { + self::$lastError = 'In names capital letters are only allowed at the beginning of a word.'; + return false; + } + + if (strlen($word) == 1) { + self::$lastError = 'This name contains a word with only one letter. Please use more than one letter for each word.'; + return false; + } + + $hasVowel = preg_match('/[aeiouAEIOU]/', $word); + if (!$hasVowel) { + self::$lastError = 'This name contains a word without vowels. Please choose another name.'; + return false; + } + } + + if(strtolower(configLua('serverName')) == $name_lower) { self::$lastError = 'Your name cannot be same as server name.'; return false; } diff --git a/tools/validate.php b/tools/validate.php index 66b39581..bf362131 100644 --- a/tools/validate.php +++ b/tools/validate.php @@ -63,10 +63,7 @@ else if(isset($_GET['email'])) } else if(isset($_GET['name'])) { - $name = $_GET['name']; - if(!admin()) { - $name = strtolower(stripslashes($name)); - } + $name = trim(stripslashes($_GET['name'])); if(!Validator::characterName($name)) { error_(Validator::getLastError()); @@ -81,7 +78,12 @@ else if(isset($_GET['name'])) error_($errors['name']); } - success_('Good. Your name will be:
' . (admin() ? $name : ucwords($name)) . ''); + $extraText = ''; + if (admin()) { + $extraText = "
Note: You are logged in as admin, so you can create almost any name without rules."; + } + + success_("Good. Your name will be:
$name$extraText"); } else if(isset($_GET['password']) && isset($_GET['password_confirm'])) { $password = $_GET['password']; From 0413de85b5b95f700d7eeee6de5be93aa86b5381 Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 6 Apr 2026 12:23:42 +0200 Subject: [PATCH 09/25] Release v1.8.9 --- CHANGELOG-1.x.md | 13 +++++++++++++ common.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) 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/common.php b/common.php index 8606cb1b..864b3064 100644 --- a/common.php +++ b/common.php @@ -26,7 +26,7 @@ if (version_compare(phpversion(), '8.1', '<')) die('PHP version 8.1 or higher is required.'); const MYAAC = true; -const MYAAC_VERSION = '1.8.9-dev'; +const MYAAC_VERSION = '1.8.9'; const DATABASE_VERSION = 46; const TABLE_PREFIX = 'myaac_'; define('START_TIME', microtime(true)); From aa63e1c9866c0fdc87a51858ce35ea88614f4c1c Mon Sep 17 00:00:00 2001 From: slawkens Date: Fri, 10 Apr 2026 23:08:33 +0200 Subject: [PATCH 10/25] Fix client boosted + online count (?) --- login.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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']) ])); } From 578c0548ee4f81dbcd17bd16ea5941b8f36dc808 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 11 Apr 2026 15:23:46 +0200 Subject: [PATCH 11/25] Start v1.8.10-dev --- common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.php b/common.php index 864b3064..1455802c 100644 --- a/common.php +++ b/common.php @@ -26,7 +26,7 @@ if (version_compare(phpversion(), '8.1', '<')) die('PHP version 8.1 or higher is required.'); const MYAAC = true; -const MYAAC_VERSION = '1.8.9'; +const MYAAC_VERSION = '1.8.10-dev'; const DATABASE_VERSION = 46; const TABLE_PREFIX = 'myaac_'; define('START_TIME', microtime(true)); From 4570ba3801d11275404bc75b987c89545f90fda9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Apr 2026 17:23:17 +0200 Subject: [PATCH 12/25] Bump lodash from 4.17.23 to 4.18.1 (#358) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.23 to 4.18.1. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.23...4.18.1) --- updated-dependencies: - dependency-name: lodash dependency-version: 4.18.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 901e9c59..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" }, From 4145d9eb3c1fd91aa4638b79120246349dcbd44c Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 11 Apr 2026 17:49:22 +0200 Subject: [PATCH 13/25] Fix: Clear hooks on plugin uninstall Fixes error with gesior-shop-system clear-cache.php being called, despite it's removed --- system/src/Hooks.php | 20 ++++++++++++++++++++ system/src/Plugins.php | 5 +++++ 2 files changed, 25 insertions(+) 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/Plugins.php b/system/src/Plugins.php index c6651679..6a88fcab 100644 --- a/system/src/Plugins.php +++ b/system/src/Plugins.php @@ -868,6 +868,11 @@ class Plugins { } } + global $hooks; + foreach($plugin_info['hooks'] ?? [] as $name => $info) { + $hooks->unregister($name, $info['type'], $info['file']); + } + clearCache(); return true; } From 7bc8a66cc140de88517a98a585499c5a6ca4f70c Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 11 Apr 2026 18:13:25 +0200 Subject: [PATCH 14/25] BugTracker has been moved to plugins, remove the model --- system/src/Models/BugTracker.php | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 system/src/Models/BugTracker.php 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 @@ - Date: Sun, 12 Apr 2026 08:53:02 +0200 Subject: [PATCH 15/25] Make myaac_config table columns bigger --- common.php | 2 +- install/includes/schema.sql | 4 ++-- system/migrations/51.php | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 system/migrations/51.php diff --git a/common.php b/common.php index 3ea4681c..fa499419 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 = 51; 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..71993838 100644 --- a/install/includes/schema.sql +++ b/install/includes/schema.sql @@ -43,8 +43,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/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 +}; From fa93187f807992f055d8d8f63270583de0b6b547 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 12 Apr 2026 09:56:01 +0200 Subject: [PATCH 16/25] Add $fillable to Account model --- system/src/Models/Account.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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', From 7104c2258fd724a55239821b46a616dab845b22a Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 12 Apr 2026 10:43:09 +0200 Subject: [PATCH 17/25] Settings: Add Reset button --- admin/pages/settings.php | 9 +++++++++ system/src/Settings.php | 1 + system/templates/admin.settings.html.twig | 15 ++++++++++++--- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/admin/pages/settings.php b/admin/pages/settings.php index 2c4979e1..75dd8231 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($plugin); + $settings->clearCache(); + + success('Settings for this plugin has been reset.'); +} + $settingsKeyName = ($plugin == 'core' ? $plugin : $settingsFile['key']); $title = ($plugin == 'core' ? 'Settings' : 'Plugin Settings - ' . $settingsFile['name']); 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() }} + +
+