diff --git a/CHANGELOG-1.x.md b/CHANGELOG-1.x.md index e77c30f1..473bc51b 100644 --- a/CHANGELOG-1.x.md +++ b/CHANGELOG-1.x.md @@ -1,5 +1,16 @@ # Changelog +## [1.3.3 - 04.04.2025] + +### Fixed +* Fix uninstall plugin when plugin is disabled (https://github.com/slawkens/myaac/commit/6c568fd36a271270684fc412ccd556b230273a6d) + +### Changed +* Display more useful info when error parsing config.lua (https://github.com/slawkens/myaac/commit/fa6b6aa153ffc131e0d1631a4dcd9012a5850c2e) + +### Other +* Small adjustments (https://github.com/slawkens/myaac/commit/35e2483de86e295bdf089cceffa25842eeb2e34c, https://github.com/slawkens/myaac/commit/ae639d65b0bfa491e747e907e2ebc77f83f47981) + ## [1.3.2 - 01.04.2025] ### Fixed diff --git a/admin/index.php b/admin/index.php index 15ab133c..86ebf3dc 100644 --- a/admin/index.php +++ b/admin/index.php @@ -1,6 +1,8 @@ $name, 'file' => $file, 'priority' => $adminPagesDefaultPriority]; + } + + if (self::getAutoLoadOption($plugin, 'admin-pages-sub-folders', true)) { + // + // Get all plugins/*/admin-pages/subFolder/*.php pages + // + $pluginAdminPagesSubFolders = glob(PLUGINS . $plugin['filename'] . '/admin-pages/*', GLOB_ONLYDIR); + foreach ($pluginAdminPagesSubFolders as $folder) { + $folderName = pathinfo($folder, PATHINFO_FILENAME); + + $subFiles = glob(PLUGINS . $plugin['filename'] . '/admin-pages/' . $folderName . '/*.php'); + foreach ($subFiles as $file) { + $file = str_replace(PLUGINS, 'plugins/', $file); + $name = $folderName . '/' . pathinfo($file, PATHINFO_FILENAME); + + $adminPages[] = ['name' => $name, 'file' => $file, 'priority' => $adminPagesDefaultPriority]; + } + + $subFolders = glob(PLUGINS . $plugin['filename'] . '/admin-pages/' . $folderName . '/*', GLOB_ONLYDIR); + foreach ($subFolders as $subFolder) { + $subFolderName = pathinfo($subFolder, PATHINFO_FILENAME); + $subSubFiles = glob(PLUGINS . $plugin['filename'] . '/admin-pages/' . $folderName . '/' . $subFolderName . '/*.php'); + + foreach ($subSubFiles as $subSubFile) { + $subSubFile = str_replace(PLUGINS, 'plugins/', $subSubFile); + $name = $folderName . '/' . $subFolderName . '/' . pathinfo($subSubFile, PATHINFO_FILENAME); + + $adminPages[] = ['name' => $name, 'file' => $subSubFile, 'priority' => $adminPagesDefaultPriority];; + } + } + } + } + } + + usort($adminPages, function ($a, $b) + { + if ($a['priority'] == $b['priority']) { + return 0; + } + + return ($a['priority'] > $b['priority']) ? -1 : 1; + }); + + $ret = []; + foreach ($adminPages as $value) { + $ret[$value['name']] = $value['file']; + } + + return $ret; + }); + } + public static function getRoutes() { $cache = Cache::getInstance(); @@ -411,20 +486,13 @@ class Plugins { $continue = true; if(!isset($plugin_json['name']) || empty(trim($plugin_json['name']))) { - self::$warnings[] = 'Plugin "name" tag is not set.'; - } - if(!isset($plugin_json['description']) || empty(trim($plugin_json['description']))) { - self::$warnings[] = 'Plugin "description" tag is not set.'; + self::$error = 'Plugin "name" tag is not set.'; + return false; } + if(!isset($plugin_json['version']) || empty(trim($plugin_json['version']))) { self::$warnings[] = 'Plugin "version" tag is not set.'; } - if(!isset($plugin_json['author']) || empty(trim($plugin_json['author']))) { - self::$warnings[] = 'Plugin "author" tag is not set.'; - } - if(!isset($plugin_json['contact']) || empty(trim($plugin_json['contact']))) { - self::$warnings[] = 'Plugin "contact" tag is not set.'; - } if(isset($plugin_json['require'])) { $require = $plugin_json['require']; diff --git a/system/templates/buttons.base.html.twig b/system/templates/buttons.base.html.twig index d44bce10..075af1e1 100644 --- a/system/templates/buttons.base.html.twig +++ b/system/templates/buttons.base.html.twig @@ -1 +1 @@ - \ No newline at end of file + diff --git a/templates/tibiacom/account.login.html.twig b/templates/tibiacom/account.login.html.twig index 9e9b65c2..8aeba805 100644 --- a/templates/tibiacom/account.login.html.twig +++ b/templates/tibiacom/account.login.html.twig @@ -4,24 +4,25 @@ {% endif %}
+ New to {{ config.lua.serverName }}?
-
-
+
|