From 92569b796526fb28d9750f21db5a4943df9a83dc Mon Sep 17 00:00:00 2001 From: slawkens Date: Wed, 1 Mar 2023 10:36:38 +0100 Subject: [PATCH] patch some changes add contributors --- CONTRIBUTORS.txt | 14 ++++++++++++++ CREDITS | 3 ++- README.md | 7 +++++-- admin/index.php | 5 +++-- admin/tools/phpinfo.php | 2 ++ admin/tools/status.php | 2 ++ install/includes/twig_error.html | 4 ++-- install/steps/5-database.php | 1 + install/tools/5-database.php | 2 ++ install/tools/7-finish.php | 2 ++ system/libs/pot/OTS_MonstersList.php | 4 ++-- system/libs/pot/OTS_SpellsList.php | 4 ++-- system/locale/en/install.php | 3 ++- system/locale/pl/install.php | 1 + system/locale/sv/install.php | 3 +-- system/pages/characters.php | 3 ++- system/templates/install.installer.html.twig | 2 +- system/templates/news.archive.html.twig | 2 +- 18 files changed, 47 insertions(+), 17 deletions(-) create mode 100644 CONTRIBUTORS.txt diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt new file mode 100644 index 00000000..dd7aafdd --- /dev/null +++ b/CONTRIBUTORS.txt @@ -0,0 +1,14 @@ +# automatically exported using this script: +# git log --all --format='%cN <%cE>' | sort -u > contributors +# in no particular order +# cleaned for readability + +Evil Puncker +Fernando Matos +Lee <42119604+Leesneaks@users.noreply.github.com> +caio +slawkens +tobi132 <52947952+tobi132@users.noreply.github.com> +vankk +whiteblXK +xitobuh diff --git a/CREDITS b/CREDITS index 50461327..878310df 100644 --- a/CREDITS +++ b/CREDITS @@ -1,2 +1,3 @@ * Gesior.pl (2007 - 2008) -* Slawkens (2009 - 2020) +* Slawkens (2009 - 2023) +* Contributors listed in CONTRIBUTORS.txt diff --git a/README.md b/README.md index 825036c2..53a99bb1 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ MyAAC is a free and open-source Automatic Account Creator (AAC) written in PHP. It is a fork of the [Gesior](https://github.com/gesior/Gesior2012) project. It supports only MySQL databases. +Official website: https://my-aac.org + ### Requirements - PHP 5.6 or later @@ -57,12 +59,13 @@ That means, we use: - Some compatibility issues with some exotical distibutions. - ### Contributing Contributions are more than welcome. -Pull requests should be made to the Dev branch as that is the working branch, master is for release code. +Pull requests should be made to the *develop* branch as that is the working branch, master is for release code. + +Bug fixes to current release should be done to master branch. Look: [Contributing](https://github.com/otsoft/myaac/wiki/Contributing) in our wiki. diff --git a/admin/index.php b/admin/index.php index d71402a9..e0799f1d 100644 --- a/admin/index.php +++ b/admin/index.php @@ -2,6 +2,9 @@ // few things we'll need require '../common.php'; +define('ADMIN_PANEL', true); +define('MYAAC_ADMIN', true); + if(file_exists(BASE . 'config.local.php')) { require_once BASE . 'config.local.php'; } @@ -12,8 +15,6 @@ if(file_exists(BASE . 'install') && (!isset($config['installed']) || !$config['i throw new RuntimeException('Setup detected that install/ directory exists. Please visit this url to start MyAAC Installation.
Delete install/ directory if you already installed MyAAC.
Remember to REFRESH this page when you\'re done!'); } -define('ADMIN_PANEL', true); - $content = ''; // validate page diff --git a/admin/tools/phpinfo.php b/admin/tools/phpinfo.php index 5b791d07..96a9aad9 100644 --- a/admin/tools/phpinfo.php +++ b/admin/tools/phpinfo.php @@ -1,4 +1,6 @@ .console { - font-family:Courier; + font-family: Courier,serif; color: #CCCCCC; background: #000000; border: 3px double #CCCCCC; - padding: 0px; + padding: 0; } \ No newline at end of file diff --git a/install/steps/5-database.php b/install/steps/5-database.php index 081a9aad..a86bcb4b 100644 --- a/install/steps/5-database.php +++ b/install/steps/5-database.php @@ -82,6 +82,7 @@ if(!$error) { } if($saved) { + success($locale['step_database_config_saved']); if(!$error) { $_SESSION['saved'] = true; } diff --git a/install/tools/5-database.php b/install/tools/5-database.php index 8c57f01f..4570cf62 100644 --- a/install/tools/5-database.php +++ b/install/tools/5-database.php @@ -1,4 +1,6 @@ monstersPath . 'monsters.xml')) { - log_append('error.log', '[OTS_MonstersList.php] Fatal error: Cannot load monsters.xml. File does not exist. (' . $this->monstersPath . 'monsters.xml' . '). Error: ' . print_r(error_get_last(), true)); - throw new Exception('Error: Cannot load monsters.xml. File not found. More info in system/logs/error.log file.'); + log_append('error.log', '[OTS_MonstersList.php] Fatal error: Cannot load monsters.xml. File does not exist. (' . $this->monstersPath . 'monsters.xml' . ').'); + throw new Exception('Error: Cannot load monsters.xml. File not found.'); } // loads monsters mapping file diff --git a/system/libs/pot/OTS_SpellsList.php b/system/libs/pot/OTS_SpellsList.php index f04a585f..167a834d 100644 --- a/system/libs/pot/OTS_SpellsList.php +++ b/system/libs/pot/OTS_SpellsList.php @@ -95,8 +95,8 @@ class OTS_SpellsList implements IteratorAggregate, Countable { // check if spells.xml exist if(!@file_exists($file)) { - log_append('error.log', '[OTS_SpellsList.php] Fatal error: Cannot load spells.xml. File does not exist. (' . $file . '). Error: ' . print_r(error_get_last(), true)); - throw new Exception('Error: Cannot load spells.xml. File not found. More info in system/logs/error.log file.'); + log_append('error.log', '[OTS_SpellsList.php] Fatal error: Cannot load spells.xml. File does not exist. (' . $file . ').'); + throw new Exception('Error: Cannot load spells.xml. File not found.'); } // loads monsters mapping file diff --git a/system/locale/en/install.php b/system/locale/en/install.php index f3d55e88..1fc46e44 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. Please delete install/ directory. 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'; @@ -63,6 +63,7 @@ $locale['step_config_usage_desc'] = 'Allow MyAAC to report anonymous usage stati $locale['step_database'] = 'Import schema'; $locale['step_database_title'] = 'Import MySQL schema'; $locale['step_database_importing'] = 'Your database is MySQL. Database name is: "$DATABASE_NAME$". Importing schema now...'; +$locale['step_database_config_saved'] = 'Local configuration has been saved into file: config.local.php'; $locale['step_database_error_path'] = 'Please specify server path.'; $locale['step_database_error_config'] = 'Cannot find config.lua file. Is your server path correct? Go back and check again.'; $locale['step_database_error_database_empty'] = 'Cannot determine database type from config.lua. Your OTS is unsupported by this AAC.'; diff --git a/system/locale/pl/install.php b/system/locale/pl/install.php index 10a27734..f12af021 100644 --- a/system/locale/pl/install.php +++ b/system/locale/pl/install.php @@ -59,6 +59,7 @@ $locale['step_config_usage_desc'] = 'Zezwalaj MyAAC na raportowanie anonimowych $locale['step_database'] = 'Baza Danych'; $locale['step_database_title'] = 'Baza MySQL'; $locale['step_database_importing'] = 'Twoja baza to MySQL. Nazwa bazy danych to: "$DATABASE_NAME$". Importowanie schematu...'; +$locale['step_database_config_saved'] = 'Lokalna konfiguracja została zapisana do pliku: config.local.php'; $locale['step_database_error_path'] = 'Proszę podać ścieżkę do serwera.'; $locale['step_database_error_config'] = 'Nie można znaleźć pliku config.lua. Czy ścieżka do katalogu serwera jest poprawna? Wróć się i sprawdź ponownie.'; $locale['step_database_error_database_empty'] = 'Nie można wykryć typu bazy danych z pliku config.lua. Prawdopodobnie Twój OTS nie jest wspierany przez ten AAC.'; diff --git a/system/locale/sv/install.php b/system/locale/sv/install.php index 81c4f608..4aa8a4b6 100644 --- a/system/locale/sv/install.php +++ b/system/locale/sv/install.php @@ -42,13 +42,12 @@ $locale['step_config'] = 'Konfiguration'; $locale['step_config_title'] = 'Grundläggande konfiguration'; $locale['step_config_server_path'] = 'Server mapp'; $locale['step_config_server_path_desc'] = 'Mappen som innhåller exe filen till The Forgotten Server, där du har din config.lua.'; + $locale['step_config_mail_admin'] = 'Admin E-Post'; $locale['step_config_mail_admin_desc'] = 'Adress där E-Post från kontaktförmolär kommer att leveraras, till exempel admin@gmail.com'; - $locale['step_config_mail_admin_error'] = 'Admin E-Post är inte korrekt.'; $locale['step_config_mail_address'] = 'Server E-Post'; $locale['step_config_mail_address_desc'] = 'Adress som kommer att användas för utgående email (från:), till exempel no-reply@your-server.org'; - $locale['step_config_mail_address_error'] = 'Server E-Post är inte korrekt.'; $locale['step_config_client'] = 'Klientversion'; $locale['step_config_client_desc'] = 'Används för nerladdningssidan och teman.'; diff --git a/system/pages/characters.php b/system/pages/characters.php index 7bc5d7e5..2da87845 100644 --- a/system/pages/characters.php +++ b/system/pages/characters.php @@ -147,9 +147,10 @@ if($player->isLoaded() && !$player->isDeleted()) if($config['characters']['skills']) { if($db->hasColumn('players', 'skill_fist')) {// tfs 1.0+ - $skills_db = $db->query('SELECT `skill_fist`, `skill_club`, `skill_sword`, `skill_axe`, `skill_dist`, `skill_shielding`, `skill_fishing` FROM `players` WHERE `id` = ' . $player->getId())->fetch(); + $skills_db = $db->query('SELECT `maglevel`, `skill_fist`, `skill_club`, `skill_sword`, `skill_axe`, `skill_dist`, `skill_shielding`, `skill_fishing` FROM `players` WHERE `id` = ' . $player->getId())->fetch(); $skill_ids = array( + POT::SKILL_MAGIC => 'maglevel', POT::SKILL_FIST => 'skill_fist', POT::SKILL_CLUB => 'skill_club', POT::SKILL_SWORD => 'skill_sword', diff --git a/system/templates/install.installer.html.twig b/system/templates/install.installer.html.twig index d0694034..812ee92c 100644 --- a/system/templates/install.installer.html.twig +++ b/system/templates/install.installer.html.twig @@ -3,7 +3,7 @@ {{ message }} - +