diff --git a/.gitattributes b/.gitattributes index aa70eefb..40090cd9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,8 +3,12 @@ .gitignore export-ignore .github export-ignore .editorconfig export-ignore -.travis.yml export-ignore _config.yml export-ignore release.sh export-ignore +# cypress +cypress export-ignore +cypress.config.js export-ignore +cypress.env.json + *.sh text eol=lf diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml new file mode 100644 index 00000000..600b0b7b --- /dev/null +++ b/.github/workflows/cypress.yml @@ -0,0 +1,120 @@ +name: Cypress +on: + pull_request: + branches: [develop] + push: + branches: [develop] + +jobs: + cypress: + runs-on: ubuntu-latest + services: + mysql: + image: mysql:8.0 + env: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: myaac + MYSQL_USER: myaac + MYSQL_PASSWORD: myaac + ports: + - 3306/tcp + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + strategy: + fail-fast: false + matrix: + php-versions: [ '7.4', '8.0', '8.1' ] + name: MyAAC on PHP ${{ matrix.php-versions }} + steps: + - name: ๐Ÿ“Œ MySQL Start & init & show db + run: | + sudo /etc/init.d/mysql start + mysql -e 'CREATE DATABASE myaac;' -uroot -proot + mysql -e "SHOW DATABASES" -uroot -proot + + - name: Checkout MyAAC + uses: actions/checkout@v3 + with: + ref: 0.9 + + - name: Checkout TFS + uses: actions/checkout@v3 + with: + repository: otland/forgottenserver + ref: 1.4 + path: tfs + + - name: Import TFS Schema + run: | + mysql -uroot -proot myaac < tfs/schema.sql + + - name: Rename config.lua + run: mv tfs/config.lua.dist tfs/config.lua + + - name: Replace mysqlUser + uses: jacobtomlinson/gha-find-replace@v2 + with: + find: 'mysqlUser = "forgottenserver"' + replace: 'mysqlUser = "root"' + regex: false + include: 'tfs/config.lua' + + - name: Replace mysqlPass + uses: jacobtomlinson/gha-find-replace@v2 + with: + find: 'mysqlPass = ""' + replace: 'mysqlPass = "root"' + regex: false + include: 'tfs/config.lua' + + - name: Replace mysqlDatabase + uses: jacobtomlinson/gha-find-replace@v2 + with: + find: 'mysqlDatabase = "forgottenserver"' + replace: 'mysqlDatabase = "myaac"' + regex: false + include: 'tfs/config.lua' + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, dom, fileinfo, mysql, json, xml, pdo, pdo_mysql + + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache composer dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + # Use composer.json for key, if composer.lock is not committed. + # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install Composer dependencies + run: composer install --no-progress --prefer-dist --optimize-autoloader + + - name: Run PHP server + run: nohup php -S localhost:8080 > php.log 2>&1 & + + - name: Cypress Run + uses: cypress-io/github-action@v5 + env: + CYPRESS_URL: http://localhost:8080 + CYPRESS_SERVER_PATH: /home/runner/work/myaac/myaac/tfs + + - name: Save screenshots + uses: actions/upload-artifact@v3 + if: always() + with: + name: cypress-screenshots + path: cypress/screenshots + + - name: Upload Cypress Videos + uses: actions/upload-artifact@v3 + if: always() + with: + name: cypress-videos + path: cypress/videos diff --git a/.gitignore b/.gitignore index 1302f62a..5206d08b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,10 @@ vendor # npm node_modules +# cypress +cypress.env.json +cypress/e2e/2-advanced-examples + # created by release.sh releases tmp diff --git a/.htaccess b/.htaccess.dist similarity index 60% rename from .htaccess rename to .htaccess.dist index 042cb23a..1c837a33 100644 --- a/.htaccess +++ b/.htaccess.dist @@ -6,10 +6,14 @@ Options -MultiViews + + Require all denied + + RewriteEngine On - #RewriteBase /myaac/ + #RewriteBase /myaac/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index eba123be..00000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ - -language: php -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4 - - 8.0 - -cache: - directories: - - $HOME/.composer/cache - -before_script: - - composer require php-parallel-lint/php-parallel-lint --no-suggest --no-progress --no-interaction --no-ansi --quiet --optimize-autoloader - -script: - - php vendor/bin/parallel-lint --no-progress --no-colors --exclude vendor --exclude "system/libs/pot/OTS_DB_PDOQuery.php" . diff --git a/CHANGELOG.md b/CHANGELOG.md index 21f6405c..399eba44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [0.9.0-alpha - x.x.2023] +## [0.9.0-alpha - 02.06.2023] Minimum PHP version for this release is 7.2.5. @@ -12,9 +12,10 @@ Minimum PHP version for this release is 7.2.5. * new Admin Bar showed on top when admin logged in * new page: Server Data, to reload server data * new pages: mass account & teleport tools - * editable changelogs + * changelogs editor * revised Accounts & Players editors * option to add/modify menus with plugins + * option to enable/disable plugins * better, updated TinyMCE editor (v6.x) * with option to upload images * list of open source libraries used in project @@ -29,11 +30,12 @@ Minimum PHP version for this release is 7.2.5. * support for Account Number * suggest account number option * many new functions, hooks and configurables +* better Exception Handler (Whoops - https://github.com/filp/whoops) +* add Cypress testing ### Changed * Composer is now used for external libraries like: Twig, PHPMailer, fast-route etc. * mail support is disabled on fresh install, can be manually enabled by user -* don't show PHP errors on prod * disable add php pages in admin panel for security. Option to disable plugins upload * visitors counter shows now user browser, and also if its bot * changes in required and optional PHP extensions @@ -43,6 +45,7 @@ Minimum PHP version for this release is 7.2.5. * Highscores * frags works for TFS 1.x * cached + * creatures * moved pages to Twig: * experience stages * update player_deaths entries on name change diff --git a/CREDITS b/CREDITS index 404de30c..878310df 100644 --- a/CREDITS +++ b/CREDITS @@ -1,3 +1,3 @@ * Gesior.pl (2007 - 2008) -* Slawkens (2009 - 2022) +* Slawkens (2009 - 2023) * Contributors listed in CONTRIBUTORS.txt diff --git a/admin/includes/functions.php b/admin/includes/functions.php index ab604f76..620272f5 100644 --- a/admin/includes/functions.php +++ b/admin/includes/functions.php @@ -1 +1,2 @@ - \ No newline at end of file + diff --git a/admin/pages/phpinfo.php b/admin/pages/phpinfo.php index bc747a2d..43942bfd 100644 --- a/admin/pages/phpinfo.php +++ b/admin/pages/phpinfo.php @@ -16,4 +16,4 @@ if (!function_exists('phpinfo')) { ?> - + diff --git a/admin/pages/players.php b/admin/pages/players.php index d9a5dece..b32d5445 100644 --- a/admin/pages/players.php +++ b/admin/pages/players.php @@ -10,7 +10,7 @@ defined('MYAAC') or die('Direct access not allowed!'); $title = 'Player editor'; -$player_base = BASE_URL . 'admin/?p=players'; +$player_base = ADMIN_URL . '?p=players'; $use_datatable = true; require_once LIBS . 'forum.php'; diff --git a/admin/pages/statistics.php b/admin/pages/statistics.php index 17d8118f..b740c217 100644 --- a/admin/pages/statistics.php +++ b/admin/pages/statistics.php @@ -36,4 +36,3 @@ $twig->display('admin.statistics.html.twig', array( 'account_type' => (USE_ACCOUNT_NAME ? 'name' : 'number'), 'points' => $points )); -?> \ No newline at end of file diff --git a/admin/pages/version.php b/admin/pages/version.php index e643e728..64f673c8 100644 --- a/admin/pages/version.php +++ b/admin/pages/version.php @@ -47,4 +47,3 @@ function version_revert($version) $release = $version; return $major . '.' . $minor . '.' . $release; }*/ -?> diff --git a/admin/tools/phpinfo.php b/admin/tools/phpinfo.php index 96a9aad9..cd043279 100644 --- a/admin/tools/phpinfo.php +++ b/admin/tools/phpinfo.php @@ -13,4 +13,3 @@ if(!function_exists('phpinfo')) die('phpinfo() disabled on this web server.'); phpinfo(); -?> diff --git a/common.php b/common.php index 4f104e91..267ca591 100644 --- a/common.php +++ b/common.php @@ -26,7 +26,7 @@ if (version_compare(phpversion(), '7.2.5', '<')) die('PHP version 7.2.5 or higher is required.'); const MYAAC = true; -const MYAAC_VERSION = '0.9.0-dev'; +const MYAAC_VERSION = '0.10.0-dev'; const DATABASE_VERSION = 36; const TABLE_PREFIX = 'myaac_'; define('START_TIME', microtime(true)); @@ -138,11 +138,9 @@ if(!IS_CLI) { define('SERVER_URL', 'http' . (isset($_SERVER['HTTPS'][0]) && strtolower($_SERVER['HTTPS']) === 'on' ? 's' : '') . '://' . $baseHost); define('BASE_URL', SERVER_URL . BASE_DIR . '/'); - define('ADMIN_URL', SERVER_URL . BASE_DIR . '/admin/'); + define('ADMIN_URL', SERVER_URL . BASE_DIR . '/' . ADMIN_PANEL_FOLDER . '/'); //define('CURRENT_URL', BASE_URL . $_SERVER['REQUEST_URI']); - - require SYSTEM . 'exception.php'; } $autoloadFile = VENDOR . 'autoload.php'; diff --git a/composer.json b/composer.json index cd16bf18..b1300e34 100644 --- a/composer.json +++ b/composer.json @@ -12,5 +12,8 @@ "erusev/parsedown": "^1.7", "nikic/fast-route": "^1.3", "matomo/device-detector": "^6.0" + }, + "require-dev": { + "filp/whoops": "^2.15" } } diff --git a/cypress.config.js b/cypress.config.js new file mode 100644 index 00000000..97f47c41 --- /dev/null +++ b/cypress.config.js @@ -0,0 +1,9 @@ +const { defineConfig } = require("cypress"); + +module.exports = defineConfig({ + e2e: { + setupNodeEvents(on, config) { + // implement node event listeners here + }, + }, +}); diff --git a/cypress/e2e/1-install.cy.js b/cypress/e2e/1-install.cy.js new file mode 100644 index 00000000..84a8f51b --- /dev/null +++ b/cypress/e2e/1-install.cy.js @@ -0,0 +1,75 @@ +describe('Install MyAAC', () => { + beforeEach(() => { + // Cypress starts out with a blank slate for each test + // so we must tell it to visit our website with the `cy.visit()` command. + // Since we want to visit the same URL at the start of all our tests, + // we include it in our beforeEach function so that it runs before each test + cy.visit(Cypress.env('URL')) + }) + + it('Go through installer', () => { + cy.visit(Cypress.env('URL') + '/install/?step=welcome') + cy.wait(1000) + + cy.screenshot('install-welcome') + + // step 1 - Welcome + cy.get('select[name="lang"]').select('en') + + //cy.get('input[type=button]').contains('Next ยป').click() + + cy.get('form').submit() + + // step 2 - License + // just skip + cy.contains('GNU/GPL License'); + cy.get('form').submit() + + // step 3 - Requirements + cy.contains('Requirements check'); + + cy.get('#step').then(elem => { + elem.val('config'); + }); + + cy.get('form').submit() + + // step 4 - Configuration + cy.contains('Basic configuration'); + + cy.get('#vars_server_path').click().clear().type(Cypress.env('SERVER_PATH')) + cy.get('#vars_mail_admin').click().clear().type('noone@example.net') + + cy.get('[type="checkbox"]').uncheck() // usage statistics uncheck + + cy.wait(1000) + + cy.get('form').submit() + + // check if there is any error + + + // step 5 - Import Schema + cy.contains('Import MySQL schema'); + + // AAC is not installed yet, this message should not come + cy.contains('Seems AAC is already installed. Skipping importing MySQL schema..').should('not.exist') + + cy.contains('[class="alert alert-success"]', 'Local configuration has been saved into file: config.local.php').should('be.visible') + + cy.get('form').submit() + + // step 6 - Admin Account + cy.get('#vars_email').click().clear().type('admin@my-aac.org') + cy.get('#vars_account').click().clear().type('admin') + cy.get('#vars_password').click().clear().type('test1234') + cy.get('#vars_password_confirm').click().clear().type('test1234') + cy.get('#vars_player_name').click().clear().type('Admin') + + cy.get('form').submit() + + cy.contains('[class="alert alert-success"]', 'Congratulations', { timeout: 30000 }).should('be.visible') + + cy.screenshot('install-finish') + }) +}) diff --git a/cypress/e2e/2-create-account.cy.js b/cypress/e2e/2-create-account.cy.js new file mode 100644 index 00000000..9fc95cb0 --- /dev/null +++ b/cypress/e2e/2-create-account.cy.js @@ -0,0 +1,33 @@ +describe('Create Account Page', () => { + beforeEach(() => { + // Cypress starts out with a blank slate for each test + // so we must tell it to visit our website with the `cy.visit()` command. + // Since we want to visit the same URL at the start of all our tests, + // we include it in our beforeEach function so that it runs before each test + cy.visit(Cypress.env('URL') + '/index.php/account/create') + }) + + it('Create Test Account', () => { + cy.screenshot('create-account-page') + + cy.get('#account_input').type('tester') + cy.get('#email').type('tester@example.com') + + cy.get('#password').type('test1234') + cy.get('#password2').type('test1234') + + cy.get('#character_name').type('Slaw') + + cy.get('#sex1').check() + cy.get('#vocation1').check() + cy.get('#accept_rules').check() + + cy.get('#createaccount').submit() + + // no errors please + cy.contains('The Following Errors Have Occurred:').should('not.exist') + + // ss of post page + cy.screenshot('create-account-page-post') + }) +}) diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json new file mode 100644 index 00000000..02e42543 --- /dev/null +++ b/cypress/fixtures/example.json @@ -0,0 +1,5 @@ +{ + "name": "Using fixtures to represent data", + "email": "hello@cypress.io", + "body": "Fixtures are a great way to mock data for responses to routes" +} diff --git a/cypress/support/commands.js b/cypress/support/commands.js new file mode 100644 index 00000000..66ea16ef --- /dev/null +++ b/cypress/support/commands.js @@ -0,0 +1,25 @@ +// *********************************************** +// This example commands.js shows you how to +// create various custom commands and overwrite +// existing commands. +// +// For more comprehensive examples of custom +// commands please read more here: +// https://on.cypress.io/custom-commands +// *********************************************** +// +// +// -- This is a parent command -- +// Cypress.Commands.add('login', (email, password) => { ... }) +// +// +// -- This is a child command -- +// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) +// +// +// -- This is a dual command -- +// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) +// +// +// -- This will overwrite an existing command -- +// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) \ No newline at end of file diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js new file mode 100644 index 00000000..0e7290a1 --- /dev/null +++ b/cypress/support/e2e.js @@ -0,0 +1,20 @@ +// *********************************************************** +// This example support/e2e.js is processed and +// loaded automatically before your test files. +// +// This is a great place to put global configuration and +// behavior that modifies Cypress. +// +// You can change the location of this file or turn off +// automatically serving support files with the +// 'supportFile' configuration option. +// +// You can read more here: +// https://on.cypress.io/configuration +// *********************************************************** + +// Import commands.js using ES2015 syntax: +import './commands' + +// Alternatively you can use CommonJS syntax: +// require('./commands') \ No newline at end of file diff --git a/index.php b/index.php index 5f887570..34f42069 100644 --- a/index.php +++ b/index.php @@ -163,6 +163,7 @@ if(setting('core.backward_support')) { $config['site'] = &$config; $config['server'] = &$config['lua']; $config['site']['shop_system'] = $config['gifts_system']; + $config['site']['gallery_page'] = true; if(!isset($config['vdarkborder'])) $config['vdarkborder'] = '#505050'; diff --git a/install/includes/config.php b/install/includes/config.php index 380fff7d..5d9ae07a 100644 --- a/install/includes/config.php +++ b/install/includes/config.php @@ -38,4 +38,3 @@ if(!isset($error) || !$error) { $error = true; } } -?> \ No newline at end of file diff --git a/install/index.php b/install/index.php index 7de02a06..0cbcd658 100644 --- a/install/index.php +++ b/install/index.php @@ -26,13 +26,13 @@ $twig = new Twig_Environment($twig_loader, array( )); // load installation status -$step = isset($_POST['step']) ? $_POST['step'] : 'welcome'; +$step = $_REQUEST['step'] ?? 'welcome'; $install_status = array(); if(file_exists(CACHE . 'install.txt')) { $install_status = unserialize(file_get_contents(CACHE . 'install.txt')); - if(!isset($_POST['step'])) { + if(!isset($_REQUEST['step'])) { $step = isset($install_status['step']) ? $install_status['step'] : ''; } } diff --git a/install/steps/2-license.php b/install/steps/2-license.php index e84ce0e6..4976dd70 100644 --- a/install/steps/2-license.php +++ b/install/steps/2-license.php @@ -5,4 +5,3 @@ $twig->display('install.license.html.twig', array( 'license' => file_get_contents(BASE . 'LICENSE'), 'buttons' => next_buttons() )); -?> diff --git a/install/steps/4-config.php b/install/steps/4-config.php index b1555201..325b97f1 100644 --- a/install/steps/4-config.php +++ b/install/steps/4-config.php @@ -18,4 +18,3 @@ $twig->display('install.config.html.twig', array( 'errors' => isset($errors) ? $errors : null, 'buttons' => next_buttons() )); -?> \ No newline at end of file diff --git a/install/steps/5-database.php b/install/steps/5-database.php index 7fb1969b..b97dca4f 100644 --- a/install/steps/5-database.php +++ b/install/steps/5-database.php @@ -111,7 +111,7 @@ if(!$error) {
-
diff --git a/install/steps/7-finish.php b/install/steps/7-finish.php index 656c60fe..f6e1f6c2 100644 --- a/install/steps/7-finish.php +++ b/install/steps/7-finish.php @@ -122,18 +122,21 @@ else { )); if(!isset($_SESSION['installed'])) { - $report_url = 'https://my-aac.org/report_install.php?v=' . MYAAC_VERSION . '&b=' . urlencode(BASE_URL); - if (function_exists('curl_version')) - { - $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, $report_url); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - curl_exec($curl); - curl_close($curl); - } - else if (ini_get('allow_url_fopen') ) { - file_get_contents($report_url); + if (!array_key_exists('CI', getenv())) { + $report_url = 'https://my-aac.org/report_install.php?v=' . MYAAC_VERSION . '&b=' . urlencode(BASE_URL); + if (function_exists('curl_version')) + { + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, $report_url); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_exec($curl); + curl_close($curl); + } + else if (ini_get('allow_url_fopen') ) { + file_get_contents($report_url); + } } + $_SESSION['installed'] = true; } diff --git a/install/template/template.php b/install/template/template.php index 862a97af..8f015f79 100644 --- a/install/template/template.php +++ b/install/template/template.php @@ -4,14 +4,14 @@ MyAAC - <?php echo $locale['installation']; ?> - +
- + @@ -28,10 +28,10 @@ if ($step == $value) { $progress = ($i == 6) ? 100 : $i * 16; } - - echo '' . ++$i . '. ' . $locale['step_' . $value] . ''; + + echo '
  • ' . ++$i . '. ' . $locale['step_' . $value] . '
  • '; } - + ?>
    @@ -71,4 +71,4 @@

    - \ No newline at end of file + diff --git a/nginx-sample.conf b/nginx-sample.conf index 2ae14251..a54f87e5 100644 --- a/nginx-sample.conf +++ b/nginx-sample.conf @@ -32,6 +32,6 @@ server { include snippets/fastcgi-php.conf; fastcgi_read_timeout 240; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; - # for ubuntu 22.04+ it will be php8.1-fpm.-sock + # for ubuntu 22.04+ it will be php8.1-fpm.sock } } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..369afdf5 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1927 @@ +{ + "name": "myaac", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "cypress": "^12.12.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cypress/request": { + "version": "2.88.11", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-2.88.11.tgz", + "integrity": "sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w==", + "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "~6.10.3", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@cypress/xvfb": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", + "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", + "dev": true, + "dependencies": { + "debug": "^3.1.0", + "lodash.once": "^4.1.1" + } + }, + "node_modules/@cypress/xvfb/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/@types/node": { + "version": "14.18.47", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.47.tgz", + "integrity": "sha512-OuJi8bIng4wYHHA3YpKauL58dZrPxro3d0tabPHyiNF8rKfGKuVfr83oFlPLmKri1cX+Z3cJP39GXmnqkP11Gw==", + "dev": true + }, + "node_modules/@types/sinonjs__fake-timers": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", + "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", + "dev": true + }, + "node_modules/@types/sizzle": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", + "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", + "dev": true + }, + "node_modules/@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/arch": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", + "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dev": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", + "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", + "dev": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dev": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/blob-util": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", + "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", + "dev": true + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/cachedir": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", + "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", + "dev": true + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-more-types": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", + "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-table3": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.3.tgz", + "integrity": "sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cypress": { + "version": "12.12.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-12.12.0.tgz", + "integrity": "sha512-UU5wFQ7SMVCR/hyKok/KmzG6fpZgBHHfrXcHzDmPHWrT+UUetxFzQgt7cxCszlwfozckzwkd22dxMwl/vNkWRw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@cypress/request": "^2.88.10", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^14.14.31", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.6.0", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^6.2.1", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.4", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-ci": "^3.0.0", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "minimist": "^1.2.8", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.3.2", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "bin": { + "cypress": "bin/cypress" + }, + "engines": { + "node": "^14.0.0 || ^16.0.0 || >=18.0.0" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dayjs": { + "version": "1.11.7", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.7.tgz", + "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dev": true, + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eventemitter2": { + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", + "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", + "dev": true + }, + "node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/executable": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", + "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", + "dev": true, + "dependencies": { + "pify": "^2.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/getos": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", + "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", + "dev": true, + "dependencies": { + "async": "^3.2.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/global-dirs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dev": true, + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/http-signature": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true, + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "dependencies": { + "ci-info": "^3.2.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "dependencies": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", + "dev": true + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", + "dev": true + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "node_modules/lazy-ass": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", + "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", + "dev": true, + "engines": { + "node": "> 0.8" + } + }, + "node_modules/listr2": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", + "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", + "dev": true, + "dependencies": { + "cli-truncate": "^2.1.0", + "colorette": "^2.0.16", + "log-update": "^4.0.0", + "p-map": "^4.0.0", + "rfdc": "^1.3.0", + "rxjs": "^7.5.1", + "through": "^2.3.8", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "enquirer": ">= 2.3.0 < 3" + }, + "peerDependenciesMeta": { + "enquirer": { + "optional": true + } + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ospath": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", + "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", + "dev": true + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/proxy-from-env": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", + "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", + "dev": true + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.10.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/request-progress": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", + "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", + "dev": true, + "dependencies": { + "throttleit": "^1.0.0" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/semver": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", + "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dev": true, + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/throttleit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", + "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tslib": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.1.tgz", + "integrity": "sha512-KaI6gPil5m9vF7DKaoXxx1ia9fxS4qG5YveErRRVknPDXXriu5M8h48YRjB6h5ZUOKuAKlSJYb0GaDe8I39fRw==", + "dev": true + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", + "dev": true + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..0e20e9b5 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "cypress": "^12.12.0" + } +} diff --git a/release.sh b/release.sh index e720a3a9..d2dbfe49 100644 --- a/release.sh +++ b/release.sh @@ -22,7 +22,7 @@ if [ $1 = "prepare" ]; then mkdir -p tmp # get myaac from git archive - git archive --format zip --output tmp/myaac.zip master + git archive --format zip --output tmp/myaac.zip develop cd tmp/ || exit @@ -35,6 +35,11 @@ if [ $1 = "prepare" ]; then unzip -q myaac.zip -d $dir rm myaac.zip + cd $dir || exit + + # dependencies + composer install --no-dev + echo "Now you can make changes to $dir. When you are ready, type 'release.sh pack'" exit fi @@ -62,4 +67,4 @@ if [ $1 = "pack" ]; then echo "Done. Released files can be found in 'releases' directory." exit -fi \ No newline at end of file +fi diff --git a/system/compat/pages.php b/system/compat/pages.php index 3f5d0a0a..5857322d 100644 --- a/system/compat/pages.php +++ b/system/compat/pages.php @@ -10,6 +10,10 @@ defined('MYAAC') or die('Direct access not allowed!'); switch($page) { + case 'adminpanel': + header('Location: ' . ADMIN_URL); + die; + case 'createaccount': $page = 'account/create'; break; @@ -30,6 +34,7 @@ switch($page) $page = 'news'; break; + case 'archive': case 'newsarchive': $page = 'news/archive'; break; diff --git a/system/counter.php b/system/counter.php index ada05903..63905ba2 100644 --- a/system/counter.php +++ b/system/counter.php @@ -51,4 +51,3 @@ else updateDatabaseConfig('views_counter', $views_counter); // update counter } } -?> diff --git a/system/exception.php b/system/exception.php index e46f0d54..077d0f3f 100644 --- a/system/exception.php +++ b/system/exception.php @@ -7,6 +7,20 @@ * @copyright 2023 MyAAC * @link https://my-aac.org */ + +if (class_exists(\Whoops\Run::class)) { + $whoops = new \Whoops\Run; + if(IS_CLI) { + $whoops->pushHandler(new \Whoops\Handler\PlainTextHandler); + } + else { + $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler); + } + + $whoops->register(); + return; +} + require LIBS . 'SensitiveException.php'; /** @@ -30,6 +44,8 @@ function exception_handler($exception) { $backtrace_formatted = nl2br($exception->getTraceAsString()); + $message = $message . "

    File: {$exception->getFile()}
    Line: {$exception->getLine()}"; + // display basic error message without template // template is missing, why? probably someone deleted templates dir, or it wasn't downloaded right $template_file = SYSTEM . 'templates/exception.html.twig'; diff --git a/system/functions.php b/system/functions.php index 1ad9be6e..46384d8d 100644 --- a/system/functions.php +++ b/system/functions.php @@ -747,10 +747,10 @@ function get_browser_languages() { $ret = array(); - $acceptLang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; - if(!isset($acceptLang[0])) + if(empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) return $ret; + $acceptLang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; $languages = strtolower($acceptLang); // $languages = 'pl,en-us;q=0.7,en;q=0.3 '; // need to remove spaces from strings to avoid error @@ -1217,7 +1217,7 @@ function getCustomPageInfo($page) return null; } -function getCustomPage($page, &$success) +function getCustomPage($page, &$success): string { global $db, $twig, $title, $ignore, $logged_access; @@ -1605,6 +1605,14 @@ function getGuildLogoById($id) return BASE_URL . GUILD_IMAGES_DIR . $logo; } +function displayErrorBoxWithBackButton($errors, $action = null) { + global $twig; + $twig->display('error_box.html.twig', ['errors' => $errors]); + $twig->display('account.back_button.html.twig', [ + 'action' => $action ?: getLink('') + ]); +} + // validator functions require_once LIBS . 'validator.php'; require_once SYSTEM . 'compat/base.php'; diff --git a/system/hooks.php b/system/hooks.php index 1aa33283..f089b102 100644 --- a/system/hooks.php +++ b/system/hooks.php @@ -40,6 +40,7 @@ define('HOOK_ACCOUNT_CREATE_BEFORE_ACCOUNT', ++$i); define('HOOK_ACCOUNT_CREATE_AFTER_ACCOUNT', ++$i); define('HOOK_ACCOUNT_CREATE_AFTER_EMAIL', ++$i); define('HOOK_ACCOUNT_CREATE_AFTER_COUNTRY', ++$i); +define('HOOK_ACCOUNT_CREATE_AFTER_PASSWORD', ++$i); define('HOOK_ACCOUNT_CREATE_AFTER_PASSWORDS', ++$i); define('HOOK_ACCOUNT_CREATE_BEFORE_CHARACTER_NAME', ++$i); define('HOOK_ACCOUNT_CREATE_AFTER_CHARACTER_NAME', ++$i); diff --git a/system/init.php b/system/init.php index 8e963db1..4aa08453 100644 --- a/system/init.php +++ b/system/init.php @@ -18,6 +18,11 @@ if(!isset($config['installed']) || !$config['installed']) { throw new RuntimeException('MyAAC has not been installed yet or there was error during installation. Please install again.'); } +if(config('env') === 'dev') { + require SYSTEM . 'exception.php'; +} + +date_default_timezone_set($config['date_timezone']); // take care of trailing slash at the end if($config['server_path'][strlen($config['server_path']) - 1] !== '/') $config['server_path'] .= '/'; @@ -114,7 +119,7 @@ if(!isset($foundValue)) { $config['data_path'] = $foundValue; unset($foundValue); -// new config values for compability +// new config values for compatibility if(!isset($config['highscores_ids_hidden']) || count($config['highscores_ids_hidden']) == 0) { $config['highscores_ids_hidden'] = array(0); } diff --git a/system/item.php b/system/item.php index 4d213360..66d4bfc5 100644 --- a/system/item.php +++ b/system/item.php @@ -58,4 +58,3 @@ function outputItem($id = 100, $count = 1) $file_name = Items_Images::$outputDir . $file_name . '.gif'; readfile($file_name); } -?> diff --git a/system/libs/CreateCharacter.php b/system/libs/CreateCharacter.php index c81893e1..60909c0f 100644 --- a/system/libs/CreateCharacter.php +++ b/system/libs/CreateCharacter.php @@ -138,7 +138,7 @@ class CreateCharacter if(empty($errors)) { - $number_of_players_on_account = $account->getPlayersList(false)->count(); + $number_of_players_on_account = $account->getPlayersList(true)->count(); if($number_of_players_on_account >= config('characters_per_account')) $errors[] = 'You have too many characters on your account ('.$number_of_players_on_account.'/'.config('characters_per_account').')!'; } diff --git a/system/libs/data.php b/system/libs/data.php index 64d93f78..af667448 100644 --- a/system/libs/data.php +++ b/system/libs/data.php @@ -41,4 +41,3 @@ class Data return $db->update($this->table, $data, $where); } } -?> diff --git a/system/libs/pot/E_OTS_ErrorCode.php b/system/libs/pot/E_OTS_ErrorCode.php index f5bbd2fc..451e5a07 100644 --- a/system/libs/pot/E_OTS_ErrorCode.php +++ b/system/libs/pot/E_OTS_ErrorCode.php @@ -32,5 +32,3 @@ class E_OTS_ErrorCode extends Exception } /**#@-*/ - -?> diff --git a/system/libs/pot/E_OTS_Generic.php b/system/libs/pot/E_OTS_Generic.php index 3ca0a914..7a95d675 100644 --- a/system/libs/pot/E_OTS_Generic.php +++ b/system/libs/pot/E_OTS_Generic.php @@ -36,5 +36,3 @@ class E_OTS_Generic extends E_OTS_ErrorCode } /**#@-*/ - -?> diff --git a/system/libs/pot/E_OTS_NotAContainer.php b/system/libs/pot/E_OTS_NotAContainer.php index 3a8d224b..8285691f 100644 --- a/system/libs/pot/E_OTS_NotAContainer.php +++ b/system/libs/pot/E_OTS_NotAContainer.php @@ -22,5 +22,3 @@ class E_OTS_NotAContainer extends Exception } /**#@-*/ - -?> diff --git a/system/libs/pot/E_OTS_OTBMError.php b/system/libs/pot/E_OTS_OTBMError.php index d84d740c..9ab1228d 100644 --- a/system/libs/pot/E_OTS_OTBMError.php +++ b/system/libs/pot/E_OTS_OTBMError.php @@ -32,5 +32,3 @@ class E_OTS_OTBMError extends E_OTS_ErrorCode } /**#@-*/ - -?> diff --git a/system/libs/pot/E_OTS_ReadOnly.php b/system/libs/pot/E_OTS_ReadOnly.php index 003d12af..5fb3b39b 100644 --- a/system/libs/pot/E_OTS_ReadOnly.php +++ b/system/libs/pot/E_OTS_ReadOnly.php @@ -22,5 +22,3 @@ class E_OTS_ReadOnly extends Exception } /**#@-*/ - -?> diff --git a/system/libs/pot/IOTS_Cipher.php b/system/libs/pot/IOTS_Cipher.php index 82044cc8..542b4abb 100644 --- a/system/libs/pot/IOTS_Cipher.php +++ b/system/libs/pot/IOTS_Cipher.php @@ -37,5 +37,3 @@ interface IOTS_Cipher } /**#@-*/ - -?> diff --git a/system/libs/pot/IOTS_DataDisplay.php b/system/libs/pot/IOTS_DataDisplay.php index 7c5abc2c..359dc1a6 100644 --- a/system/libs/pot/IOTS_DataDisplay.php +++ b/system/libs/pot/IOTS_DataDisplay.php @@ -89,5 +89,3 @@ interface IOTS_DataDisplay } /**#@-*/ - -?> diff --git a/system/libs/pot/IOTS_Display.php b/system/libs/pot/IOTS_Display.php index cb2d8e90..3b75d537 100644 --- a/system/libs/pot/IOTS_Display.php +++ b/system/libs/pot/IOTS_Display.php @@ -96,5 +96,3 @@ interface IOTS_Display } /**#@-*/ - -?> diff --git a/system/libs/pot/IOTS_GuildAction.php b/system/libs/pot/IOTS_GuildAction.php index 7ed97f94..680025cd 100644 --- a/system/libs/pot/IOTS_GuildAction.php +++ b/system/libs/pot/IOTS_GuildAction.php @@ -67,5 +67,3 @@ interface IOTS_GuildAction } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_Account.php b/system/libs/pot/OTS_Account.php index d5b42961..366dccdf 100644 --- a/system/libs/pot/OTS_Account.php +++ b/system/libs/pot/OTS_Account.php @@ -994,7 +994,7 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable $access = 0; // finds ranks of all characters - foreach($this->getPlayersList() as $player) + foreach($this->getPlayersList(false) as $player) { $rank = $player->getRank(); @@ -1198,5 +1198,3 @@ class OTS_Account extends OTS_Row_DAO implements IteratorAggregate, Countable } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_AccountBans_List.php b/system/libs/pot/OTS_AccountBans_List.php index f3687409..fdd2f923 100644 --- a/system/libs/pot/OTS_AccountBans_List.php +++ b/system/libs/pot/OTS_AccountBans_List.php @@ -34,5 +34,3 @@ class OTS_AccountBans_List extends OTS_Bans_List $this->setFilter($filter); } } - -?> diff --git a/system/libs/pot/OTS_Admin.php b/system/libs/pot/OTS_Admin.php index 3507e10d..7530d6ef 100644 --- a/system/libs/pot/OTS_Admin.php +++ b/system/libs/pot/OTS_Admin.php @@ -735,5 +735,3 @@ class OTS_Admin } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_Bans_List.php b/system/libs/pot/OTS_Bans_List.php index 5f58788e..8eb59df6 100644 --- a/system/libs/pot/OTS_Bans_List.php +++ b/system/libs/pot/OTS_Bans_List.php @@ -100,5 +100,3 @@ class OTS_Bans_List extends OTS_Base_List } } } - -?> diff --git a/system/libs/pot/OTS_Base_DB.php b/system/libs/pot/OTS_Base_DB.php index f97745b4..21d6f756 100644 --- a/system/libs/pot/OTS_Base_DB.php +++ b/system/libs/pot/OTS_Base_DB.php @@ -265,5 +265,3 @@ abstract class OTS_Base_DB extends PDO implements IOTS_DB } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_BinaryTools.php b/system/libs/pot/OTS_BinaryTools.php index 7e6a86e5..84fbf54c 100644 --- a/system/libs/pot/OTS_BinaryTools.php +++ b/system/libs/pot/OTS_BinaryTools.php @@ -146,5 +146,3 @@ class OTS_BinaryTools } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_Container.php b/system/libs/pot/OTS_Container.php index 7b93570f..ff910401 100644 --- a/system/libs/pot/OTS_Container.php +++ b/system/libs/pot/OTS_Container.php @@ -149,5 +149,3 @@ class OTS_Container extends OTS_Item implements IteratorAggregate } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_FileLoader.php b/system/libs/pot/OTS_FileLoader.php index 8f86712e..77f184f3 100644 --- a/system/libs/pot/OTS_FileLoader.php +++ b/system/libs/pot/OTS_FileLoader.php @@ -357,5 +357,3 @@ class OTS_FileLoader } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_Group.php b/system/libs/pot/OTS_Group.php index 19f770f1..d094d365 100644 --- a/system/libs/pot/OTS_Group.php +++ b/system/libs/pot/OTS_Group.php @@ -671,5 +671,3 @@ class OTS_Group extends OTS_Row_DAO implements IteratorAggregate, Countable } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_Guild.php b/system/libs/pot/OTS_Guild.php index 98dd47cf..bab363a8 100644 --- a/system/libs/pot/OTS_Guild.php +++ b/system/libs/pot/OTS_Guild.php @@ -837,5 +837,3 @@ class OTS_Guild extends OTS_Row_DAO implements IteratorAggregate, Countable } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_GuildRanks_List.php b/system/libs/pot/OTS_GuildRanks_List.php index f2f9e57e..aec6114a 100644 --- a/system/libs/pot/OTS_GuildRanks_List.php +++ b/system/libs/pot/OTS_GuildRanks_List.php @@ -72,5 +72,3 @@ class OTS_GuildRanks_List extends OTS_Base_List } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_House.php b/system/libs/pot/OTS_House.php index e6aca322..12a8f1cb 100644 --- a/system/libs/pot/OTS_House.php +++ b/system/libs/pot/OTS_House.php @@ -529,5 +529,3 @@ class OTS_House extends OTS_Row_DAO } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_IPBans_List.php b/system/libs/pot/OTS_IPBans_List.php index dd614e9a..1fdfc0ce 100644 --- a/system/libs/pot/OTS_IPBans_List.php +++ b/system/libs/pot/OTS_IPBans_List.php @@ -34,5 +34,3 @@ class OTS_IPBans_List extends OTS_Bans_List $this->setFilter($filter); } } - -?> diff --git a/system/libs/pot/OTS_InfoRespond.php b/system/libs/pot/OTS_InfoRespond.php index f64fca05..6e452371 100644 --- a/system/libs/pot/OTS_InfoRespond.php +++ b/system/libs/pot/OTS_InfoRespond.php @@ -387,5 +387,3 @@ class OTS_InfoRespond extends DOMDocument } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_ItemsList.php b/system/libs/pot/OTS_ItemsList.php index 1865117a..30465a9d 100644 --- a/system/libs/pot/OTS_ItemsList.php +++ b/system/libs/pot/OTS_ItemsList.php @@ -676,5 +676,3 @@ class OTS_ItemsList extends OTS_FileLoader implements IteratorAggregate, Countab } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_MapCoords.php b/system/libs/pot/OTS_MapCoords.php index dfe1a1cd..738b0bea 100644 --- a/system/libs/pot/OTS_MapCoords.php +++ b/system/libs/pot/OTS_MapCoords.php @@ -130,5 +130,3 @@ class OTS_MapCoords } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_MonstersList.php b/system/libs/pot/OTS_MonstersList.php index fb51a085..f7d1b2da 100644 --- a/system/libs/pot/OTS_MonstersList.php +++ b/system/libs/pot/OTS_MonstersList.php @@ -299,5 +299,3 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_Player.php b/system/libs/pot/OTS_Player.php index 2143c12e..7fd96fec 100644 --- a/system/libs/pot/OTS_Player.php +++ b/system/libs/pot/OTS_Player.php @@ -3627,5 +3627,3 @@ class OTS_Player extends OTS_Row_DAO } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_PlayerBans_List.php b/system/libs/pot/OTS_PlayerBans_List.php index 7e06c7ca..f9826f78 100644 --- a/system/libs/pot/OTS_PlayerBans_List.php +++ b/system/libs/pot/OTS_PlayerBans_List.php @@ -34,5 +34,3 @@ class OTS_PlayerBans_List extends OTS_Bans_List $this->setFilter($filter); } } - -?> diff --git a/system/libs/pot/OTS_Row_DAO.php b/system/libs/pot/OTS_Row_DAO.php index c1a09858..2a0a100c 100644 --- a/system/libs/pot/OTS_Row_DAO.php +++ b/system/libs/pot/OTS_Row_DAO.php @@ -75,5 +75,3 @@ abstract class OTS_Row_DAO extends OTS_Base_DAO } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_SQLField.php b/system/libs/pot/OTS_SQLField.php index 2f7ac74e..ba2bb55c 100644 --- a/system/libs/pot/OTS_SQLField.php +++ b/system/libs/pot/OTS_SQLField.php @@ -121,5 +121,3 @@ class OTS_SQLField } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_ServerInfo.php b/system/libs/pot/OTS_ServerInfo.php index eb153c93..fd06749e 100644 --- a/system/libs/pot/OTS_ServerInfo.php +++ b/system/libs/pot/OTS_ServerInfo.php @@ -227,5 +227,3 @@ class OTS_ServerInfo } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_Spell.php b/system/libs/pot/OTS_Spell.php index 0ec51bdf..419ee292 100644 --- a/system/libs/pot/OTS_Spell.php +++ b/system/libs/pot/OTS_Spell.php @@ -482,5 +482,3 @@ class OTS_Spell } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_Toolbox.php b/system/libs/pot/OTS_Toolbox.php index 4d22d0dd..980e5cb5 100644 --- a/system/libs/pot/OTS_Toolbox.php +++ b/system/libs/pot/OTS_Toolbox.php @@ -113,5 +113,3 @@ class OTS_Toolbox } /**#@-*/ - -?> diff --git a/system/libs/pot/OTS_XTEA.php b/system/libs/pot/OTS_XTEA.php index 96ee7553..ff5a1095 100644 --- a/system/libs/pot/OTS_XTEA.php +++ b/system/libs/pot/OTS_XTEA.php @@ -151,5 +151,3 @@ class OTS_XTEA implements IOTS_Cipher } /**#@-*/ - -?> diff --git a/system/libs/rfc6238.php b/system/libs/rfc6238.php index 579f08f2..5effedd3 100644 --- a/system/libs/rfc6238.php +++ b/system/libs/rfc6238.php @@ -282,4 +282,3 @@ class TokenAuth6238 { return $result; } } -?> diff --git a/system/libs/validator.php b/system/libs/validator.php index 38db7068..91f71c24 100644 --- a/system/libs/validator.php +++ b/system/libs/validator.php @@ -451,4 +451,3 @@ class Validator return self::$lastError; } } -?> diff --git a/system/locale/de/admin.php b/system/locale/de/admin.php index 8a128216..dae5fdee 100644 --- a/system/locale/de/admin.php +++ b/system/locale/de/admin.php @@ -6,4 +6,3 @@ * @author Slawkens */ $locale['title'] = 'MyAAC Admin'; -?> diff --git a/system/locale/de/install.php b/system/locale/de/install.php index 5cb7342e..85be3b16 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. 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.'; // welcome $locale['step_welcome'] = 'Willkommen'; diff --git a/system/locale/de/main.php b/system/locale/de/main.php index 3f9b2479..e4482572 100644 --- a/system/locale/de/main.php +++ b/system/locale/de/main.php @@ -11,5 +11,4 @@ $locale['encoding'] = 'utf-8'; $locale['direction']= 'ltr'; $locale['error404'] = 'Diese Seite konnte nicht gefunden werden.'; -$locale['news'] = 'Neuesten Nachrichten'; -?> \ No newline at end of file +$locale['news'] = 'Neuesten Nachrichten'; \ No newline at end of file diff --git a/system/locale/en/install.php b/system/locale/en/install.php index f856dcbf..3de85896 100644 --- a/system/locale/en/install.php +++ b/system/locale/en/install.php @@ -131,4 +131,3 @@ $locale['step_finish_title'] = 'Installation finished!'; $locale['step_finish_desc'] = 'Congratulations! MyAAC is ready to use!
    You can now login to $ADMIN_PANEL$, or visit $HOMEPAGE$.

    Please delete install/ directory.

    Post bugs and suggestions at $LINK$, thanks!'; -?> diff --git a/system/locale/pl/admin.php b/system/locale/pl/admin.php index 91adfc60..8431b438 100644 --- a/system/locale/pl/admin.php +++ b/system/locale/pl/admin.php @@ -6,4 +6,3 @@ * @author Slawkens */ $locale['title'] = 'MyAAC Admin'; -?> diff --git a/system/locale/pl/main.php b/system/locale/pl/main.php index 200bba22..b86b331f 100644 --- a/system/locale/pl/main.php +++ b/system/locale/pl/main.php @@ -12,4 +12,4 @@ $locale['direction']= 'ltr'; $locale['error404'] = 'Strona nie zostaล‚a odnaleziona.'; $locale['news'] = 'Ostatnie newsy'; -$locale['loaded_in_ms'] = 'w $TIME$ ms'; \ No newline at end of file +$locale['loaded_in_ms'] = 'w $TIME$ ms'; diff --git a/system/locale/pt_br/install.php b/system/locale/pt_br/install.php index e47faede..3a9ca9cc 100644 --- a/system/locale/pt_br/install.php +++ b/system/locale/pt_br/install.php @@ -118,4 +118,3 @@ $locale['step_finish'] = 'Finalizar'; $locale['step_finish_title'] = 'Instalaรงรฃo terminada!'; $locale['step_finish_desc'] = 'Parabรฉns! MyAAC estรก pronto para uso!
    Agora vocรช pode fazer login em $ADMIN_PANEL$ ou visitar $HOMEPAGE$.

    Por favor remova a pasta install/.

    Postar bugs e sugestรตes em $LINK$, obrigado!'; -?> diff --git a/system/locale/sv/admin.php b/system/locale/sv/admin.php index 69f4f20a..8fa07f74 100644 --- a/system/locale/sv/admin.php +++ b/system/locale/sv/admin.php @@ -6,4 +6,3 @@ * @author Sizaro */ $locale['title'] = 'MyAAC Admin'; -?> diff --git a/system/locale/sv/main.php b/system/locale/sv/main.php index fc714190..83f6bb84 100644 --- a/system/locale/sv/main.php +++ b/system/locale/sv/main.php @@ -12,4 +12,3 @@ $locale['direction']= 'ltr'; $locale['error404'] = 'Sidan kunde inte hittas.'; $locale['news'] = 'Senaste nyheterna'; -?> \ No newline at end of file diff --git a/system/login.php b/system/login.php index 5d55cd18..e018c043 100644 --- a/system/login.php +++ b/system/login.php @@ -10,12 +10,12 @@ defined('MYAAC') or die('Direct access not allowed!'); $logged = false; $logged_flags = 0; +$account_logged = new OTS_Account(); // stay-logged with sessions $current_session = getSession('account'); if($current_session !== false) { - $account_logged = new OTS_Account(); $account_logged->load($current_session); if($account_logged->isLoaded() && $account_logged->getPassword() == getSession('password') //&& (!isset($_SESSION['admin']) || admin()) diff --git a/system/migrations/11.php b/system/migrations/11.php index dc335577..845f9e67 100644 --- a/system/migrations/11.php +++ b/system/migrations/11.php @@ -17,4 +17,3 @@ 'thumb' => str_replace('/screenshots/', '/gallery/', $item['thumb']), ), array('id' => $item['id'])); } -?> diff --git a/system/migrations/13.php b/system/migrations/13.php index 71d3735c..4eee77f3 100644 --- a/system/migrations/13.php +++ b/system/migrations/13.php @@ -1,4 +1,3 @@ hasColumn(TABLE_PREFIX . 'spells', 'spell')) - $db->query("ALTER TABLE `" . TABLE_PREFIX . "spells` DROP COLUMN `spell`;"); -?> \ No newline at end of file + $db->query("ALTER TABLE `" . TABLE_PREFIX . "spells` DROP COLUMN `spell`;"); \ No newline at end of file diff --git a/system/migrations/15.php b/system/migrations/15.php index 28996d8a..971587ec 100644 --- a/system/migrations/15.php +++ b/system/migrations/15.php @@ -8,4 +8,3 @@ if(!$db->hasColumn(TABLE_PREFIX . 'forum_boards', 'guild')) { if(!$db->hasColumn(TABLE_PREFIX . 'forum_boards', 'access')) { $db->query("ALTER TABLE `" . TABLE_PREFIX . "forum_boards` ADD `access` TINYINT(1) NOT NULL DEFAULT 0 AFTER `guild`;"); } -?> \ No newline at end of file diff --git a/system/migrations/17.php b/system/migrations/17.php index e4b1667c..220bc90b 100644 --- a/system/migrations/17.php +++ b/system/migrations/17.php @@ -86,4 +86,3 @@ INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VA INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Shop History', 'gifts/history', 6, 2); "); } -?> \ No newline at end of file diff --git a/system/migrations/19.php b/system/migrations/19.php index 50baa271..81c818d2 100644 --- a/system/migrations/19.php +++ b/system/migrations/19.php @@ -1,3 +1,2 @@ \ No newline at end of file +// this migration has been removed, but file kept for compatibility diff --git a/system/migrations/2.php b/system/migrations/2.php index db5fd70f..90d9a610 100644 --- a/system/migrations/2.php +++ b/system/migrations/2.php @@ -3,4 +3,3 @@ $db->query("ALTER TABLE `" . TABLE_PREFIX . "movies` MODIFY `title` VARCHAR(100) NOT NULL DEFAULT '';"); $db->query("ALTER TABLE `" . TABLE_PREFIX . "news` MODIFY `title` VARCHAR(100) NOT NULL DEFAULT '';"); $db->query("ALTER TABLE `" . TABLE_PREFIX . "news` MODIFY `body` TEXT NOT NULL DEFAULT '';"); -?> diff --git a/system/migrations/20.php b/system/migrations/20.php index 0533b540..d0012fde 100644 --- a/system/migrations/20.php +++ b/system/migrations/20.php @@ -45,4 +45,3 @@ function databaseMigration20(&$content = '') { file_put_contents($config_file, $content, FILE_APPEND); return true; } -?> \ No newline at end of file diff --git a/system/migrations/4.php b/system/migrations/4.php index 80bbc4a0..db17feb1 100644 --- a/system/migrations/4.php +++ b/system/migrations/4.php @@ -1,4 +1,3 @@ hasColumn(TABLE_PREFIX . 'monsters', 'id')) - $db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `id` int(11) NOT NULL AUTO_INCREMENT primary key FIRST;"); -?> \ No newline at end of file + $db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `id` int(11) NOT NULL AUTO_INCREMENT primary key FIRST;"); \ No newline at end of file diff --git a/system/migrations/6.php b/system/migrations/6.php index ed5329d0..e287d55a 100644 --- a/system/migrations/6.php +++ b/system/migrations/6.php @@ -1,4 +1,3 @@ hasColumn(TABLE_PREFIX . 'hooks', 'enabled')) - $db->query("ALTER TABLE `" . TABLE_PREFIX . "hooks` ADD `enabled` INT(1) NOT NULL DEFAULT 1;"); -?> \ No newline at end of file + $db->query("ALTER TABLE `" . TABLE_PREFIX . "hooks` ADD `enabled` INT(1) NOT NULL DEFAULT 1;"); \ No newline at end of file diff --git a/system/migrations/8.php b/system/migrations/8.php index a04331a8..4785e23b 100644 --- a/system/migrations/8.php +++ b/system/migrations/8.php @@ -14,5 +14,4 @@ foreach($boards as $id => $board) $db->query('UPDATE `' . TABLE_PREFIX . 'forum_boards` SET `ordering` = ' . $id . ' WHERE `name` = ' . $db->quote($board)); - } -?> \ No newline at end of file + } \ No newline at end of file diff --git a/system/pages/account/change_comment.php b/system/pages/account/change_comment.php index 0f0bc2f1..21221426 100644 --- a/system/pages/account/change_comment.php +++ b/system/pages/account/change_comment.php @@ -28,15 +28,22 @@ if($player_name != null) { if ($player->isLoaded()) { $player_account = $player->getAccount(); if ($account_logged->getId() == $player_account->getId()) { + if ($player->isDeleted()) { + $errors[] = 'This character is deleted.'; + $player = null; + } + if (isset($_POST['changecommentsave']) && $_POST['changecommentsave'] == 1) { - $player->setCustomField("hidden", $new_hideacc); - $player->setCustomField("comment", $new_comment); - $account_logged->logAction('Changed comment for character ' . $player->getName() . '.'); - $twig->display('success.html.twig', array( - 'title' => 'Character Information Changed', - 'description' => 'The character information has been changed.' - )); - $show_form = false; + if(empty($errors)) { + $player->setCustomField("hidden", $new_hideacc); + $player->setCustomField("comment", $new_comment); + $account_logged->logAction('Changed comment for character ' . $player->getName() . '.'); + $twig->display('success.html.twig', array( + 'title' => 'Character Information Changed', + 'description' => 'The character information has been changed.' + )); + $show_form = false; + } } } else { $errors[] = 'Error. Character ' . $player_name . ' is not on your account.'; @@ -57,7 +64,7 @@ if($show_form) { $twig->display('error_box.html.twig', array('errors' => $errors)); } - if(isset($player)) { + if(isset($player) && $player->isLoaded()) { $twig->display('account.change_comment.html.twig', array( 'player' => $player )); diff --git a/system/pages/account/change_email.php b/system/pages/account/change_email.php index 2368a284..3bc8edd7 100644 --- a/system/pages/account/change_email.php +++ b/system/pages/account/change_email.php @@ -166,4 +166,3 @@ if(isset($_POST['emailchangecancel']) && $_POST['emailchangecancel'] == 1) { 'custom_buttons' => $custom_buttons )); } -?> diff --git a/system/pages/account/change_name.php b/system/pages/account/change_name.php index ab7bd326..48b6bb4d 100644 --- a/system/pages/account/change_name.php +++ b/system/pages/account/change_name.php @@ -50,6 +50,10 @@ else if($player->isLoaded()) { $player_account = $player->getAccount(); if($account_logged->getId() == $player_account->getId()) { + if ($player->isDeleted()) { + $errors[] = 'This character is deleted.'; + } + if($player->isOnline()) { $errors[] = 'This character is online.'; } @@ -91,7 +95,7 @@ else } } else { - $errors[] = 'Character ' . $player_name . ' is not on your account.'; + $errors[] = 'Character is not on your account.'; } } else { @@ -112,5 +116,3 @@ else )); } } - -?> diff --git a/system/pages/account/change_password.php b/system/pages/account/change_password.php index aa5f19e7..6c4afb29 100644 --- a/system/pages/account/change_password.php +++ b/system/pages/account/change_password.php @@ -89,6 +89,4 @@ else )); setSession('password', $new_password); } -} - -?> +} \ No newline at end of file diff --git a/system/pages/account/change_sex.php b/system/pages/account/change_sex.php index c67ac608..2f944564 100644 --- a/system/pages/account/change_sex.php +++ b/system/pages/account/change_sex.php @@ -41,6 +41,10 @@ else $player_account = $player->getAccount(); if($account_logged->getId() == $player_account->getId()) { + if ($player->isDeleted()) { + $errors[] = 'This character is deleted.'; + } + if($player->isOnline()) { $errors[] = 'This character is online.'; } @@ -71,7 +75,7 @@ else } } else { - $errors[] = 'Character '.$player_name.' is not on your account.'; + $errors[] = 'Character is not on your account.'; } } else { @@ -85,11 +89,9 @@ else $twig->display('error_box.html.twig', array('errors' => $errors)); } $twig->display('account.change_sex.html.twig', array( - 'players' => $account_logged->getPlayersList(), + 'players' => $account_logged->getPlayersList(false), 'player_sex' => isset($player) ? $player->getSex() : -1, 'points' => $points )); } } - -?> diff --git a/system/pages/account/delete_character.php b/system/pages/account/delete_character.php index f5894c77..4e74e711 100644 --- a/system/pages/account/delete_character.php +++ b/system/pages/account/delete_character.php @@ -61,6 +61,14 @@ if(isset($_POST['deletecharactersave']) && $_POST['deletecharactersave'] == 1) { } } + $ownerid = 'ownerid'; + if($db->hasColumn('guilds', 'owner_id')) + $ownerid = 'owner_id'; + $guild = $db->query('SELECT `name` FROM `guilds` WHERE `' . $ownerid . '` = '.$player->getId()); + if($guild->rowCount() > 0) { + $errors[] = 'You cannot delete a character when they own a guild.'; + } + if(empty($errors)) { //dont show table "delete character" again $show_form = false; diff --git a/system/pages/account/lost.php b/system/pages/account/lost.php index 7cef82cd..95811fb1 100644 --- a/system/pages/account/lost.php +++ b/system/pages/account/lost.php @@ -546,4 +546,3 @@ elseif($action == 'setnewpassword') ' . $twig->render('buttons.submit.html.twig') . ' '; } -?> diff --git a/system/pages/bugtracker.php b/system/pages/bugtracker.php index a7cffcf0..ac37becd 100644 --- a/system/pages/bugtracker.php +++ b/system/pages/bugtracker.php @@ -339,4 +339,3 @@ $showed = $post = $reply = false; { echo '

    [ADMIN PANEL]'; } -?> diff --git a/system/pages/characters.php b/system/pages/characters.php index 9eb4218b..2e7f84ec 100644 --- a/system/pages/characters.php +++ b/system/pages/characters.php @@ -397,7 +397,7 @@ WHERE killers.death_id = '".$death['id']."' ORDER BY killers.final_hit DESC, kil 'rank' => isset($guild_name) ? $rank_of_player->getName() : null, 'link' => isset($guild_name) ? getGuildLink($guild_name) : null ), - 'comment' => !empty($comment) ? wordwrap(nl2br($comment), 60, "
    ", true) : null, + 'comment' => !empty($comment) ? nl2br($comment) : null, 'skills' => isset($skills) ? $skills : null, 'quests_enabled' => $quests_enabled, 'quests' => isset($quests) ? $quests : null, diff --git a/system/pages/faq.php b/system/pages/faq.php index f30e7914..5d71aa3c 100644 --- a/system/pages/faq.php +++ b/system/pages/faq.php @@ -185,4 +185,3 @@ class FAQ return !count($errors); } } -?> diff --git a/system/pages/forum.php b/system/pages/forum.php index 85456f2e..5c9688a6 100644 --- a/system/pages/forum.php +++ b/system/pages/forum.php @@ -17,14 +17,16 @@ $errors = []; if(!empty($action)) { if(!ctype_alnum(str_replace(array('-', '_'), '', $action))) { - error('Error: Action contains illegal characters.'); + $errors[] = 'Error: Action contains illegal characters.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); } else if(file_exists(PAGES . 'forum/' . $action . '.php')) { require PAGES . 'forum/' . $action . '.php'; return; } else { - error('This page does not exists.'); + $errors[] = 'This page does not exists.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); } } diff --git a/system/pages/forum/admin.php b/system/pages/forum/admin.php index 136c627a..e9aa18b2 100644 --- a/system/pages/forum/admin.php +++ b/system/pages/forum/admin.php @@ -14,28 +14,32 @@ $canEdit = Forum::isModerator(); if($canEdit) { $groups = new OTS_Groups_List(); - if(!empty($action)) - { + if(!empty($action)) { if($action == 'delete_board' || $action == 'edit_board' || $action == 'hide_board' || $action == 'moveup_board' || $action == 'movedown_board') $id = $_REQUEST['id']; - if(isset($_REQUEST['access'])) + if(isset($_REQUEST['access'])) { $access = $_REQUEST['access']; + } - if(isset($_REQUEST['guild'])) + if(isset($_REQUEST['guild'])) { $guild = $_REQUEST['guild']; + } - if(isset($_REQUEST['name'])) + if(isset($_REQUEST['name'])) { $name = $_REQUEST['name']; + } - if(isset($_REQUEST['description'])) + if(isset($_REQUEST['description'])) { $description = stripslashes($_REQUEST['description']); + } - $errors = array(); + $errors = []; if($action == 'add_board') { - if(Forum::add_board($name, $description, $access, $guild, $errors)) + if(Forum::add_board($name, $description, $access, $guild, $errors)) { $action = $name = $description = ''; + } } else if($action == 'delete_board') { Forum::delete_board($id, $errors); diff --git a/system/pages/forum/base.php b/system/pages/forum/base.php index fa207ca0..57ae6d17 100644 --- a/system/pages/forum/base.php +++ b/system/pages/forum/base.php @@ -11,10 +11,8 @@ defined('MYAAC') or die('Direct access not allowed!'); $title = 'Forum'; -if(strtolower($config['forum']) != 'site') -{ - if($config['forum'] != '') - { +if(strtolower($config['forum']) != 'site') { + if($config['forum'] != '') { header('Location: ' . $config['forum']); exit; } @@ -23,14 +21,14 @@ if(strtolower($config['forum']) != 'site') return; } -if(!$logged) - echo 'You are not logged in. Log in to post on the forum.

    '; +if(!$logged) { + echo 'You are not logged in. Log in to post on the forum.

    '; +} require_once LIBS . 'forum.php'; $sections = array(); -foreach(getForumBoards() as $section) -{ +foreach(getForumBoards() as $section) { $sections[$section['id']] = array( 'id' => $section['id'], 'name' => $section['name'], diff --git a/system/pages/forum/edit_post.php b/system/pages/forum/edit_post.php index 45fd675b..2df443a0 100644 --- a/system/pages/forum/edit_post.php +++ b/system/pages/forum/edit_post.php @@ -16,57 +16,57 @@ if(Forum::canPost($account_logged)) { $post_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : false; if(!$post_id) { - echo 'Please enter post id.'; + $errors[] = 'Please enter post id.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); return; } $thread = $db->query("SELECT `author_guid`, `author_aid`, `first_post`, `post_topic`, `post_date`, `post_text`, `post_smile`, `post_html`, `id`, `section` FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `id` = ".$post_id." LIMIT 1")->fetch(); - if(isset($thread['id'])) - { + if(isset($thread['id'])) { $first_post = $db->query("SELECT `" . FORUM_TABLE_PREFIX . "forum`.`author_guid`, `" . FORUM_TABLE_PREFIX . "forum`.`author_aid`, `" . FORUM_TABLE_PREFIX . "forum`.`first_post`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_smile`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`section` FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`id` = ".(int) $thread['first_post']." LIMIT 1")->fetch(); echo 'Boards >> '.$sections[$thread['section']]['name'].' >> '.$first_post['post_topic'].' >> Edit post'; - if(Forum::hasAccess($thread['section'] && ($account_logged->getId() == $thread['author_aid'] || Forum::isModerator()))) - { + + if(Forum::hasAccess($thread['section'] && ($account_logged->getId() == $thread['author_aid'] || Forum::isModerator()))) { $char_id = $post_topic = $text = $smile = $html = null; $players_from_account = $db->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll(); $saved = false; - if(isset($_REQUEST['save'])) - { + if(isset($_REQUEST['save'])) { $text = stripslashes(trim($_REQUEST['text'])); $char_id = (int) $_REQUEST['char_id']; $post_topic = stripslashes(trim($_REQUEST['topic'])); $smile = isset($_REQUEST['smile']) ? (int)$_REQUEST['smile'] : 0; $html = isset($_REQUEST['html']) ? (int)$_REQUEST['html'] : 0; - $lenght = 0; - for($i = 0; $i < strlen($post_topic); $i++) - { - if(ord($post_topic[$i]) >= 33 && ord($post_topic[$i]) <= 126) - $lenght++; + + $length = strlen($post_topic); + if(($length < 1 || $length > 60) && $thread['id'] == $thread['first_post']) { + $errors[] = "Too short or too long topic (Length: $length letters). Minimum 1 letter, maximum 60 letters."; } - if(($lenght < 1 || strlen($post_topic) > 60) && $thread['id'] == $thread['first_post']) - $errors[] = 'Too short or too long topic (short: '.$lenght.' long: '.strlen($post_topic).' letters). Minimum 1 letter, maximum 60 letters.'; - $lenght = 0; - for($i = 0; $i < strlen($text); $i++) - { - if(ord($text[$i]) >= 33 && ord($text[$i]) <= 126) - $lenght++; + + $length = strlen($text); + if($length < 1 || $length > 15000) { + $errors[] = "Too short or too long post (Length: $length letters). Minimum 1 letter, maximum 15000 letters."; } - if($lenght < 1 || strlen($text) > 15000) - $errors[] = 'Too short or too long post (short: '.$lenght.' long: '.strlen($text).' letters). Minimum 1 letter, maximum 15000 letters.'; - if($char_id == 0) + + if($char_id == 0) { $errors[] = 'Please select a character.'; - if(empty($post_topic) && $thread['id'] == $thread['first_post']) + } + + if(empty($post_topic) && $thread['id'] == $thread['first_post']) { $errors[] = 'Thread topic can\'t be empty.'; + } $player_on_account = false; - if(count($errors) == 0) - { - foreach($players_from_account as $player) - if($char_id == $player['id']) + if(count($errors) == 0) { + foreach($players_from_account as $player) { + if ($char_id == $player['id']) { $player_on_account = true; - if(!$player_on_account) - $errors[] = 'Player with selected ID '.$char_id.' doesn\'t exist or isn\'t on your account'; + } + } + + if(!$player_on_account) { + $errors[] = 'Player with selected ID ' . $char_id . ' doesn\'t exist or isn\'t on your account'; + } } if(count($errors) == 0) { @@ -88,10 +88,10 @@ if(Forum::canPost($account_logged)) $html = (int) $thread['post_html']; } - if(!$saved) - { - if(!empty($errors)) + if(!$saved) { + if(!empty($errors)) { $twig->display('error_box.html.twig', array('errors' => $errors)); + } $twig->display('forum.edit_post.html.twig', array( 'post_id' => $post_id, @@ -106,13 +106,17 @@ if(Forum::canPost($account_logged)) )); } } - else - echo '
    You are not an author of this post.'; + else { + $errors[] = 'You are not an author of this post.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); + } + } + else { + $errors[] = "Post with ID $post_id doesn't exist."; + displayErrorBoxWithBackButton($errors, getLink('forum')); } - else - echo "
    Post with ID " . $post_id . " doesn't exist."; } -else - echo "
    Your account is banned, deleted or you don't have any player with level " . $config['forum_level_required'] . " on your account. You can't post."; - -?> +else { + $errors[] = "Your account is banned, deleted or you don't have any player with level " . $config['forum_level_required'] . " on your account. You can't post."; + displayErrorBoxWithBackButton($errors, getLink('forum')); +} diff --git a/system/pages/forum/move_thread.php b/system/pages/forum/move_thread.php index 8fcb98fb..3c01a13e 100644 --- a/system/pages/forum/move_thread.php +++ b/system/pages/forum/move_thread.php @@ -16,12 +16,13 @@ if(!Forum::isModerator()) { echo 'You are not logged in or you are not moderator.'; } -$save = isset($_REQUEST['save']) ? (int)$_REQUEST['save'] == 1 : false; +$save = isset($_REQUEST['save']) && (int)$_REQUEST['save'] == 1; if($save) { $post_id = (int)$_REQUEST['id']; $board = (int)$_REQUEST['section']; if(!Forum::hasAccess($board)) { - echo "You don't have access to this board."; + $errors[] = "You don't have access to this board."; + displayErrorBoxWithBackButton($errors, getLink('forum')); return; } @@ -33,8 +34,10 @@ if($save) { header('Location: ' . getForumBoardLink($nPost['section'])); } } - else - echo 'Post with ID ' . $post_id . ' does not exist.'; + else { + $errors[] = 'Post with ID ' . $post_id . ' does not exist.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); + } } else { $post_id = (int)$_REQUEST['id']; @@ -60,7 +63,8 @@ else { )); } } - else - echo 'Post with ID ' . $post_id . ' does not exist.'; + else { + $errors[] = 'Post with ID ' . $post_id . ' does not exist.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); + } } -?> diff --git a/system/pages/forum/new_post.php b/system/pages/forum/new_post.php index a3e68dff..d4b605c6 100644 --- a/system/pages/forum/new_post.php +++ b/system/pages/forum/new_post.php @@ -12,8 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!'); require __DIR__ . '/base.php'; -if(!$logged) -{ +if(!$logged) { $extra_url = ''; if(isset($_GET['thread_id'])) { $extra_url = '&action=new_post&thread_id=' . $_GET['thread_id']; @@ -23,56 +22,58 @@ if(!$logged) return; } -if(Forum::canPost($account_logged)) -{ +if(Forum::canPost($account_logged)) { $players_from_account = $db->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll(); $thread_id = isset($_REQUEST['thread_id']) ? (int) $_REQUEST['thread_id'] : 0; if($thread_id == 0) { - echo "Thread with this id doesn't exist."; + $errors[] = "Thread with this id doesn't exist."; + displayErrorBoxWithBackButton($errors, getLink('forum')); return; } - $thread = $db->query("SELECT `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`section` FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`id` = ".(int) $thread_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." LIMIT 1")->fetch(); - echo 'Boards >> '.$sections[$thread['section']]['name'].' >> '.$thread['post_topic'].' >> Post new reply

    '.$thread['post_topic'].'

    '; - if(isset($thread['id']) && Forum::hasAccess($thread['section'])) - { + $thread = $db->query("SELECT `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`section` FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`id` = ".(int) $thread_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".$thread_id." LIMIT 1")->fetch(); + + if(isset($thread['id']) && Forum::hasAccess($thread['section'])) { + echo 'Boards >> '.$sections[$thread['section']]['name'].' >> '.$thread['post_topic'].' >> Post new reply

    '.$thread['post_topic'].'

    '; + $quote = isset($_REQUEST['quote']) ? (int) $_REQUEST['quote'] : NULL; $text = isset($_REQUEST['text']) ? stripslashes(trim($_REQUEST['text'])) : NULL; - $char_id = (int) (isset($_REQUEST['char_id']) ? $_REQUEST['char_id'] : 0); + $char_id = (int) ($_REQUEST['char_id'] ?? 0); $post_topic = isset($_REQUEST['topic']) ? stripslashes(trim($_REQUEST['topic'])) : ''; - $smile = (isset($_REQUEST['smile']) ? (int)$_REQUEST['smile'] : 0); - $html = (isset($_REQUEST['html']) ? (int)$_REQUEST['html'] : 0); + $smile = (int)($_REQUEST['smile'] ?? 0); + $html = (int)($_REQUEST['html'] ?? 0); $saved = false; - if(isset($_REQUEST['quote'])) - { + + if(isset($_REQUEST['quote'])) { $quoted_post = $db->query("SELECT `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`id` = ".(int) $quote)->fetchAll(); - if(isset($quoted_post[0]['name'])) - $text = '[i]Originally posted by '.$quoted_post[0]['name'].' on '.date('d.m.y H:i:s', $quoted_post[0]['post_date']).':[/i][quote]'.$quoted_post[0]['post_text'].'[/quote]'; - } - elseif(isset($_REQUEST['save'])) - { - $lenght = 0; - for($i = 0; $i < strlen($text); $i++) - { - if(ord($text[$i]) >= 33 && ord($text[$i]) <= 126) - $lenght++; + if(isset($quoted_post[0]['name'])) { + $text = '[i]Originally posted by ' . $quoted_post[0]['name'] . ' on ' . date('d.m.y H:i:s', $quoted_post[0]['post_date']) . ':[/i][quote]' . $quoted_post[0]['post_text'] . '[/quote]'; } - if($lenght < 1 || strlen($text) > 15000) - $errors[] = 'Too short or too long post (short: '.$lenght.' long: '.strlen($text).' letters). Minimum 1 letter, maximum 15000 letters.'; - if($char_id == 0) + } + elseif(isset($_REQUEST['save'])) { + $length = strlen($text); + if($length < 1 || strlen($text) > 15000) { + $errors[] = 'Too short or too long post (Length: $length letters). Minimum 1 letter, maximum 15000 letters.'; + } + + if($char_id == 0) { $errors[] = 'Please select a character.'; + } $player_on_account = false; - if(count($errors) == 0) - { - foreach($players_from_account as $player) - if($char_id == $player['id']) + if(count($errors) == 0) { + foreach($players_from_account as $player) { + if ($char_id == $player['id']) { $player_on_account = true; - if(!$player_on_account) - $errors[] = 'Player with selected ID '.$char_id.' doesn\'t exist or isn\'t on your account'; + } + } + + if(!$player_on_account) { + $errors[] = 'Player with selected ID ' . $char_id . ' doesn\'t exist or isn\'t on your account'; + } } - if(count($errors) == 0) - { + + if(count($errors) == 0) { $last_post = 0; $query = $db->query('SELECT post_date FROM ' . FORUM_TABLE_PREFIX . 'forum ORDER BY post_date DESC LIMIT 1'); if($query->rowCount() > 0) @@ -83,11 +84,11 @@ if(Forum::canPost($account_logged)) if($last_post+$config['forum_post_interval']-time() > 0 && !Forum::isModerator()) $errors[] = 'You can post one time per '.$config['forum_post_interval'].' seconds. Next post after '.($last_post+$config['forum_post_interval']-time()).' second(s).'; } - if(count($errors) == 0) - { + + if(count($errors) == 0) { $saved = true; - Forum::add_post($thread['id'], $thread['section'], $account_logged->getId(), (int) $char_id, $text, $post_topic, $smile, $html, time(), $_SERVER['REMOTE_ADDR']); - $db->query("UPDATE `" . FORUM_TABLE_PREFIX . "forum` SET `replies`=`replies`+1, `last_post`=".time()." WHERE `id` = ".(int) $thread_id); + Forum::add_post($thread['id'], $thread['section'], $account_logged->getId(), $char_id, $text, $post_topic, $smile, $html); + $db->query("UPDATE `" . FORUM_TABLE_PREFIX . "forum` SET `replies`=`replies`+1, `last_post`=".time()." WHERE `id` = ".$thread_id); $post_page = $db->query("SELECT COUNT(`" . FORUM_TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`post_date` <= ".time()." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['id'])->fetch(); $_page = (int) ceil($post_page['posts_count'] / $config['forum_threads_per_page']) - 1; header('Location: ' . getForumThreadLink($thread_id, $_page)); @@ -95,12 +96,13 @@ if(Forum::canPost($account_logged)) } } - if(!$saved) - { - if(!empty($errors)) + if(!$saved) { + if(!empty($errors)) { $twig->display('error_box.html.twig', array('errors' => $errors)); + } $threads = $db->query("SELECT `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`post_smile`, `" . FORUM_TABLE_PREFIX . "forum`.`post_html`, `" . FORUM_TABLE_PREFIX . "forum`.`author_aid` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." ORDER BY `" . FORUM_TABLE_PREFIX . "forum`.`post_date` DESC LIMIT 5")->fetchAll(); + foreach($threads as &$thread) { $player_account = new OTS_Account(); $player_account->load($thread['author_aid']); @@ -123,10 +125,14 @@ if(Forum::canPost($account_logged)) )); } } - else - echo "Thread with ID " . $thread_id . " doesn't exist."; + else { + $errors[] = "Thread with ID " . $thread_id . " doesn't exist."; + displayErrorBoxWithBackButton($errors, getLink('forum')); + } +} +else { + $errors[] = "Your account is banned, deleted or you don't have any player with level " . config('forum_level_required') . " on your account. You can't post."; + displayErrorBoxWithBackButton($errors, getLink('forum')); } -else - echo "Your account is banned, deleted or you don't have any player with level " . $config['forum_level_required'] . " on your account. You can't post."; $twig->display('forum.fullscreen.html.twig'); diff --git a/system/pages/forum/new_thread.php b/system/pages/forum/new_thread.php index 4db06c63..faa64ce6 100644 --- a/system/pages/forum/new_thread.php +++ b/system/pages/forum/new_thread.php @@ -12,12 +12,13 @@ defined('MYAAC') or die('Direct access not allowed!'); require __DIR__ . '/base.php'; -if(Forum::canPost($account_logged)) -{ +if(Forum::canPost($account_logged)) { $players_from_account = $db->query('SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = '.(int) $account_logged->getId())->fetchAll(); - $section_id = isset($_REQUEST['section_id']) ? $_REQUEST['section_id'] : null; + $section_id = $_REQUEST['section_id'] ?? null; + if($section_id !== null) { echo 'Boards >> ' . $sections[$section_id]['name'] . ' >> Post new thread
    '; + if(isset($sections[$section_id]['name']) && Forum::hasAccess($section_id)) { if ($sections[$section_id]['closed'] && !Forum::isModerator()) $errors[] = 'You cannot create topic on this board.'; @@ -32,56 +33,65 @@ if(Forum::canPost($account_logged)) if (isset($_REQUEST['save'])) { $errors = array(); - $lenght = 0; - for ($i = 0; $i < strlen($post_topic); $i++) { - if (ord($post_topic[$i]) >= 33 && ord($post_topic[$i]) <= 126) - $lenght++; + $length = strlen($post_topic); + if ($length < 1 || $length > 60) { + $errors[] = "Too short or too long topic (Length: $length letters). Minimum 1 letter, maximum 60 letters."; } - if ($lenght < 1 || strlen($post_topic) > 60) - $errors[] = 'Too short or too long topic (short: ' . $lenght . ' long: ' . strlen($post_topic) . ' letters). Minimum 1 letter, maximum 60 letters.'; - $lenght = 0; - for ($i = 0; $i < strlen($text); $i++) { - if (ord($text[$i]) >= 33 && ord($text[$i]) <= 126) - $lenght++; - } - if ($lenght < 1 || strlen($text) > 15000) - $errors[] = 'Too short or too long post (short: ' . $lenght . ' long: ' . strlen($text) . ' letters). Minimum 1 letter, maximum 15000 letters.'; - if ($char_id == 0) + $length = strlen($text); + if ($length < 1 || $length > 15000) { + $errors[] = "Too short or too long post (Length: $length letters). Minimum 1 letter, maximum 15000 letters."; + } + + if ($char_id == 0) { $errors[] = 'Please select a character.'; + } + $player_on_account = false; if (count($errors) == 0) { - foreach ($players_from_account as $player) - if ($char_id == $player['id']) + foreach ($players_from_account as $player) { + if ($char_id == $player['id']) { $player_on_account = true; - if (!$player_on_account) - $errors[] = 'Player with selected ID ' . $char_id . ' doesn\'t exist or isn\'t on your account'; + } + } + + if (!$player_on_account) { + $errors[] = "Player with selected ID $char_id doesn't exist or isn't on your account"; + } } if (count($errors) == 0) { $last_post = 0; $query = $db->query('SELECT `post_date` FROM `' . FORUM_TABLE_PREFIX . 'forum` ORDER BY `post_date` DESC LIMIT 1'); + if ($query->rowCount() > 0) { $query = $query->fetch(); $last_post = $query['post_date']; } - if ($last_post + $config['forum_post_interval'] - time() > 0 && !Forum::isModerator()) - $errors[] = 'You can post one time per ' . $config['forum_post_interval'] . ' seconds. Next post after ' . ($last_post + $config['forum_post_interval'] - time()) . ' second(s).'; + + if ($last_post + config('forum_post_interval') - time() > 0 && !Forum::isModerator()) + $errors[] = 'You can post one time per ' . config('forum_post_interval') . ' seconds. Next post after ' . ($last_post + config('forum_post_interval') - time()) . ' second(s).'; } + if (count($errors) == 0) { $saved = true; - $db->query("INSERT INTO `" . FORUM_TABLE_PREFIX . "forum` (`first_post` ,`last_post` ,`section` ,`replies` ,`views` ,`author_aid` ,`author_guid` ,`post_text` ,`post_topic` ,`post_smile`, `post_html` ,`post_date` ,`last_edit_aid` ,`edit_date`, `post_ip`) VALUES ('0', '" . time() . "', '" . (int)$section_id . "', '0', '0', '" . $account_logged->getId() . "', '" . (int)$char_id . "', " . $db->quote($text) . ", " . $db->quote($post_topic) . ", '" . (int)$smile . "', '" . (int)$html . "', '" . time() . "', '0', '0', '" . $_SERVER['REMOTE_ADDR'] . "')"); + + $db->query("INSERT INTO `" . FORUM_TABLE_PREFIX . "forum` (`first_post` ,`last_post` ,`section` ,`replies` ,`views` ,`author_aid` ,`author_guid` ,`post_text` ,`post_topic` ,`post_smile`, `post_html` ,`post_date` ,`last_edit_aid` ,`edit_date`, `post_ip`) VALUES ('0', '" . time() . "', '" . (int)$section_id . "', '0', '0', '" . $account_logged->getId() . "', '" . $char_id . "', " . $db->quote($text) . ", " . $db->quote($post_topic) . ", '" . $smile . "', '" . $html . "', '" . time() . "', '0', '0', '" . $_SERVER['REMOTE_ADDR'] . "')"); + $thread_id = $db->lastInsertId(); + $db->query("UPDATE `" . FORUM_TABLE_PREFIX . "forum` SET `first_post`=" . (int)$thread_id . " WHERE `id` = " . (int)$thread_id); header('Location: ' . getForumThreadLink($thread_id)); + echo '
    Thank you for posting.
    GO BACK TO LAST THREAD'; } } if (!$saved) { - if (!empty($errors)) + if (!empty($errors)) { $twig->display('error_box.html.twig', array('errors' => $errors)); + } $twig->display('forum.new_thread.html.twig', array( 'section_id' => $section_id, @@ -95,13 +105,17 @@ if(Forum::canPost($account_logged)) )); } } - else - echo 'Board with ID ' . $board_id . ' doesn\'t exist.'; + else { + $errors[] = "Board with ID $section_id doesn't exist."; + displayErrorBoxWithBackButton($errors, getLink('forum')); + } + } + else { + $errors[] = 'Please enter section_id.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); } - else - echo 'Please enter section_id.'; } -else - echo 'Your account is banned, deleted or you don\'t have any player with level '.$config['forum_level_required'].' on your account. You can\'t post.'; - -?> +else { + $errors[] = 'Your account is banned, deleted or you don\'t have any player with level '.$config['forum_level_required'].' on your account. You can\'t post.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); +} diff --git a/system/pages/forum/remove_post.php b/system/pages/forum/remove_post.php index bd1e75a4..a1e13338 100644 --- a/system/pages/forum/remove_post.php +++ b/system/pages/forum/remove_post.php @@ -12,27 +12,28 @@ defined('MYAAC') or die('Direct access not allowed!'); require __DIR__ . '/base.php'; -if(Forum::isModerator()) -{ +if(Forum::isModerator()) { $id = (int) $_REQUEST['id']; $post = $db->query("SELECT `id`, `first_post`, `section` FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `id` = ".$id." LIMIT 1")->fetch(); - if($post['id'] == $id && Forum::hasAccess($post['section'])) - { - if($post['id'] == $post['first_post']) - { + + if($post['id'] == $id && Forum::hasAccess($post['section'])) { + if($post['id'] == $post['first_post']) { $db->query("DELETE FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `first_post` = ".$post['id']); header('Location: ' . getForumBoardLink($post['section'])); } - else - { + else { $post_page = $db->query("SELECT COUNT(`" . FORUM_TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`id` < ".$id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $post['first_post'])->fetch(); $_page = (int) ceil($post_page['posts_count'] / $config['forum_threads_per_page']) - 1; $db->query("DELETE FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `id` = ".$post['id']); header('Location: ' . getForumThreadLink($post['first_post'], (int) $_page)); } } - else - echo 'Post with ID ' . $id . ' does not exist.'; + else { + $errors[] = 'Post with ID ' . $id . ' does not exist.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); + } +} +else { + $errors[] = 'You are not logged in or you are not moderator.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); } -else - echo 'You are not logged in or you are not moderator.'; diff --git a/system/pages/forum/show_board.php b/system/pages/forum/show_board.php index 36251d8e..d3dcd0d5 100644 --- a/system/pages/forum/show_board.php +++ b/system/pages/forum/show_board.php @@ -16,35 +16,37 @@ $links_to_pages = ''; $section_id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : null; if($section_id == null || !isset($sections[$section_id])) { - echo "Board with this id does't exist."; + $errors[] = "Board with this id doesn't exist."; + displayErrorBoxWithBackButton($errors, getLink('forum')); return; } if(!Forum::hasAccess($section_id)) { - echo "You don't have access to this board."; + $errors[] = "You don't have access to this board."; + displayErrorBoxWithBackButton($errors, getLink('forum')); return; } $_page = (int) (isset($_REQUEST['page']) ? $_REQUEST['page'] : 0); $threads_count = $db->query("SELECT COUNT(`" . FORUM_TABLE_PREFIX . "forum`.`id`) AS threads_count FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`section` = ".(int) $section_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = `" . FORUM_TABLE_PREFIX . "forum`.`id`")->fetch(); -for($i = 0; $i < $threads_count['threads_count'] / $config['forum_threads_per_page']; $i++) -{ +for($i = 0; $i < $threads_count['threads_count'] / $config['forum_threads_per_page']; $i++) { if($i != $_page) $links_to_pages .= ''.($i + 1).' '; else $links_to_pages .= ''.($i + 1).' '; } + echo 'Boards >> '.$sections[$section_id]['name'].''; -if(!$sections[$section_id]['closed'] || Forum::isModerator()) -{ + +if(!$sections[$section_id]['closed'] || Forum::isModerator()) { echo '

    '; } echo '

    Page: '.$links_to_pages.'
    '; -$last_threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`last_post`, `" . FORUM_TABLE_PREFIX . "forum`.`replies`, `" . FORUM_TABLE_PREFIX . "forum`.`views`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`section` = ".(int) $section_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = `" . FORUM_TABLE_PREFIX . "forum`.`id` ORDER BY `" . FORUM_TABLE_PREFIX . "forum`.`last_post` DESC LIMIT ".$config['forum_threads_per_page']." OFFSET ".($_page * $config['forum_threads_per_page']))->fetchAll(); -if(isset($last_threads[0])) -{ +$last_threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`last_post`, `" . FORUM_TABLE_PREFIX . "forum`.`replies`, `" . FORUM_TABLE_PREFIX . "forum`.`views`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`section` = ".$section_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = `" . FORUM_TABLE_PREFIX . "forum`.`id` ORDER BY `" . FORUM_TABLE_PREFIX . "forum`.`last_post` DESC LIMIT ".$config['forum_threads_per_page']." OFFSET ".($_page * $config['forum_threads_per_page']))->fetchAll(); + +if(isset($last_threads[0])) { echo ''; $player = new OTS_Player(); - foreach($last_threads as $thread) - { + foreach($last_threads as $thread) { echo ''; } - echo '
    @@ -56,8 +58,7 @@ if(isset($last_threads[0]))
    '; if(Forum::isModerator()) { echo '[MOVE]'; @@ -73,23 +74,24 @@ if(isset($last_threads[0])) $canEditForum = $player_account->hasFlag(FLAG_CONTENT_FORUM) || $player_account->isAdmin(); echo ''.($canEditForum ? $thread['post_topic'] : htmlspecialchars($thread['post_topic'])) . '
    '.($canEditForum ? substr(strip_tags($thread['post_text']), 0, 50) : htmlspecialchars(substr($thread['post_text'], 0, 50))).'...
    ' . getPlayerLink($thread['name']) . ''.(int) $thread['replies'].''.(int) $thread['views'].''; - if($thread['last_post'] > 0) - { + if($thread['last_post'] > 0) { $last_post = $db->query("SELECT `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread['id']." AND `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` ORDER BY `post_date` DESC LIMIT 1")->fetch(); if(isset($last_post['name'])) echo date('d.m.y H:i:s', $last_post['post_date']).'
    by ' . getPlayerLink($last_post['name']); else echo 'No posts.'; } - else - echo date('d.m.y H:i:s', $thread['post_date']).'
    by ' . getPlayerLink($thread['name']); + else { + echo date('d.m.y H:i:s', $thread['post_date']) . '
    by ' . getPlayerLink($thread['name']); + } echo '
    '; - if(!$sections[$section_id]['closed'] || Forum::isModerator()) - echo '
    '; -} -else - echo '

    No threads in this board.

    '; -?> + echo ''; + if(!$sections[$section_id]['closed'] || Forum::isModerator()) { + echo '
    '; + } +} +else { + echo '

    No threads in this board.

    '; +} diff --git a/system/pages/forum/show_thread.php b/system/pages/forum/show_thread.php index e6c8f926..dc252560 100644 --- a/system/pages/forum/show_thread.php +++ b/system/pages/forum/show_thread.php @@ -18,32 +18,34 @@ $_page = (int) ($_REQUEST['page'] ?? 0); $thread_starter = $db->query("SELECT `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`section` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`first_post` AND `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` LIMIT 1")->fetch(); if(empty($thread_starter['name'])) { - echo 'Thread with this ID does not exits.'; + $errors[] = 'Thread with this ID does not exists.'; + displayErrorBoxWithBackButton($errors, getLink('forum')); return; } if(!Forum::hasAccess($thread_starter['section'])) { - echo "You don't have access to view this thread."; + $errors[] = "You don't have access to view this thread."; + displayErrorBoxWithBackButton($errors, getLink('forum')); return; } $posts_count = $db->query("SELECT COUNT(`" . FORUM_TABLE_PREFIX . "forum`.`id`) AS posts_count FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id)->fetch(); -for($i = 0; $i < $posts_count['posts_count'] / $config['forum_threads_per_page']; $i++) -{ +for($i = 0; $i < $posts_count['posts_count'] / $config['forum_threads_per_page']; $i++) { if($i != $_page) $links_to_pages .= ''.($i + 1).' '; else $links_to_pages .= ''.($i + 1).' '; } -$posts = $db->query("SELECT `players`.`id` as `player_id`, `" . FORUM_TABLE_PREFIX . "forum`.`id`,`" . FORUM_TABLE_PREFIX . "forum`.`first_post`, `" . FORUM_TABLE_PREFIX . "forum`.`section`,`" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` AS `date`, `" . FORUM_TABLE_PREFIX . "forum`.`post_smile`, `" . FORUM_TABLE_PREFIX . "forum`.`post_html`, `" . FORUM_TABLE_PREFIX . "forum`.`author_aid`, `" . FORUM_TABLE_PREFIX . "forum`.`author_guid`, `" . FORUM_TABLE_PREFIX . "forum`.`last_edit_aid`, `" . FORUM_TABLE_PREFIX . "forum`.`edit_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".(int) $thread_id." ORDER BY `" . FORUM_TABLE_PREFIX . "forum`.`post_date` LIMIT ".$config['forum_posts_per_page']." OFFSET ".($_page * $config['forum_posts_per_page']))->fetchAll(); + +$posts = $db->query("SELECT `players`.`id` as `player_id`, `" . FORUM_TABLE_PREFIX . "forum`.`id`,`" . FORUM_TABLE_PREFIX . "forum`.`first_post`, `" . FORUM_TABLE_PREFIX . "forum`.`section`,`" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` AS `date`, `" . FORUM_TABLE_PREFIX . "forum`.`post_smile`, `" . FORUM_TABLE_PREFIX . "forum`.`post_html`, `" . FORUM_TABLE_PREFIX . "forum`.`author_aid`, `" . FORUM_TABLE_PREFIX . "forum`.`author_guid`, `" . FORUM_TABLE_PREFIX . "forum`.`last_edit_aid`, `" . FORUM_TABLE_PREFIX . "forum`.`edit_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = ".$thread_id." ORDER BY `" . FORUM_TABLE_PREFIX . "forum`.`post_date` LIMIT ".$config['forum_posts_per_page']." OFFSET ".($_page * $config['forum_posts_per_page']))->fetchAll(); + if(isset($posts[0]['player_id'])) { $db->query("UPDATE `" . FORUM_TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id); } $lookaddons = $db->hasColumn('players', 'lookaddons'); $groups = new OTS_Groups_List(); -foreach($posts as &$post) -{ +foreach($posts as &$post) { $post['player'] = new OTS_Player(); $player = $post['player']; $player->load($post['player_id']); diff --git a/system/pages/gallery.php b/system/pages/gallery.php index c893ce90..b6e2b07f 100644 --- a/system/pages/gallery.php +++ b/system/pages/gallery.php @@ -312,4 +312,3 @@ class Gallery return !count($errors); } } -?> diff --git a/system/pages/guilds/accept_invite.php b/system/pages/guilds/accept_invite.php index 7b013a2c..bc782480 100644 --- a/system/pages/guilds/accept_invite.php +++ b/system/pages/guilds/accept_invite.php @@ -45,6 +45,8 @@ if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') { $errors[] = 'Character with name ' . $name. ' is not in your account.'; }else if ($player->getRank()->isLoaded()){ $errors[] = 'Character with name '.$name.' is already in guild. You must leave guild before you join other guild.'; + } else if ($player->isDeleted()) { + $errors[] = "Character with name $name has been deleted."; } } } @@ -72,7 +74,7 @@ else { if(empty($errors)) { $acc_invited = false; - $account_players = $account_logged->getPlayers(); + $account_players = $account_logged->getPlayersList(false); include(SYSTEM . 'libs/pot/InvitesDriver.php'); new InvitesDriver($guild); $invited_list = $guild->listInvites(); diff --git a/system/pages/guilds/change_description.php b/system/pages/guilds/change_description.php index b4e787ee..9f6fc0dc 100644 --- a/system/pages/guilds/change_description.php +++ b/system/pages/guilds/change_description.php @@ -72,5 +72,3 @@ if(!empty($errors)) { 'action' => '?subtopic=guilds' )); } - -?> diff --git a/system/pages/guilds/change_motd.php b/system/pages/guilds/change_motd.php index c777548d..84581485 100644 --- a/system/pages/guilds/change_motd.php +++ b/system/pages/guilds/change_motd.php @@ -75,5 +75,3 @@ if(!empty($errors)) { 'action' => '?subtopic=guilds' )); } - -?> diff --git a/system/pages/guilds/cleanup_players.php b/system/pages/guilds/cleanup_players.php index 30b1e8af..61b1ce49 100644 --- a/system/pages/guilds/cleanup_players.php +++ b/system/pages/guilds/cleanup_players.php @@ -68,4 +68,3 @@ else echo "0 players found."; $twig->display('guilds.back_button.html.twig'); -?> diff --git a/system/pages/guilds/create.php b/system/pages/guilds/create.php index 9814ade0..d7319fce 100644 --- a/system/pages/guilds/create.php +++ b/system/pages/guilds/create.php @@ -22,7 +22,7 @@ if(!$logged) { $array_of_player_nig = array(); if(empty($guild_errors)) { - $account_players = $account_logged->getPlayers(); + $account_players = $account_logged->getPlayersList(false); foreach($account_players as $player) { $player_rank = $player->getRank(); @@ -73,6 +73,10 @@ if($todo == 'save') } } + if(empty($guild_errors) && $player->isDeleted()) { + $guild_errors[] = "Character $name has been deleted."; + } + if(empty($guild_errors)) { $bad_char = true; @@ -132,5 +136,3 @@ else { 'players' => $array_of_player_nig )); } - -?> diff --git a/system/pages/guilds/delete_by_admin.php b/system/pages/guilds/delete_by_admin.php index 3e083c8a..7da54aea 100644 --- a/system/pages/guilds/delete_by_admin.php +++ b/system/pages/guilds/delete_by_admin.php @@ -66,5 +66,3 @@ if(!empty($errors)) { 'action' => '?subtopic=guilds' )); } - -?> diff --git a/system/pages/guilds/delete_rank.php b/system/pages/guilds/delete_rank.php index 6a8f642c..48eeba4d 100644 --- a/system/pages/guilds/delete_rank.php +++ b/system/pages/guilds/delete_rank.php @@ -125,5 +125,3 @@ if(!empty($guild_errors)) { 'action' => '?subtopic=guilds' )); } - -?> diff --git a/system/pages/guilds/invite.php b/system/pages/guilds/invite.php index 09957d2d..8fae8e27 100644 --- a/system/pages/guilds/invite.php +++ b/system/pages/guilds/invite.php @@ -72,6 +72,8 @@ if(isset($_REQUEST['todo']) && $_REQUEST['todo'] == 'save') { $player->find($name); if(!$player->isLoaded()) { $errors[] = 'Player with name ' . $name . ' doesn\'t exist.'; + } else if ($player->isDeleted()) { + $errors[] = "Character with name $name has been deleted."; } else { diff --git a/system/pages/guilds/leave.php b/system/pages/guilds/leave.php index 892deb89..9a11595d 100644 --- a/system/pages/guilds/leave.php +++ b/system/pages/guilds/leave.php @@ -114,5 +114,3 @@ else )); } } - -?> \ No newline at end of file diff --git a/system/pages/guilds/list.php b/system/pages/guilds/list.php index 2b65e15d..e91b644d 100644 --- a/system/pages/guilds/list.php +++ b/system/pages/guilds/list.php @@ -27,7 +27,7 @@ if(count($guilds_list) > 0) $description = $guild->getCustomField('description'); $description_with_lines = str_replace(array("\r\n", "\n", "\r"), '
    ', $description, $count); if ($count < $config['guild_description_lines_limit']) - $description = wordwrap(nl2br($description), 60, "
    ", true); + $description = nl2br($description); $guildName = $guild->getName(); $guilds[] = array('name' => $guildName, 'logo' => $guild_logo, 'link' => getGuildLink($guildName, false), 'description' => $description); diff --git a/system/pages/guilds/pass_leadership.php b/system/pages/guilds/pass_leadership.php index 462ac9ec..065e4c3b 100644 --- a/system/pages/guilds/pass_leadership.php +++ b/system/pages/guilds/pass_leadership.php @@ -36,6 +36,8 @@ if(empty($guild_errors)) { $to_player->find($pass_to); if(!$to_player->isLoaded()) { $guild_errors2[] = 'Player with name '.$pass_to.' doesn\'t exist.'; + } else if ($to_player->isDeleted()) { + $guild_errors2[] = "Character with name $pass_to has been deleted."; } if(empty($guild_errors2)) { @@ -117,5 +119,3 @@ if(!empty($guild_errors)) { echo '
    ' . $twig->render('buttons.back.html.twig') . '
    '; } - -?> diff --git a/system/pages/guilds/show.php b/system/pages/guilds/show.php index 47ce89d8..8a519c61 100644 --- a/system/pages/guilds/show.php +++ b/system/pages/guilds/show.php @@ -86,7 +86,7 @@ if(empty($guild_logo) || !file_exists(GUILD_IMAGES_DIR . $guild_logo)) $description = $guild->getCustomField('description'); $description_with_lines = str_replace(array("\r\n", "\n", "\r"), '
    ', $description, $count); if($count < $config['guild_description_lines_limit']) - $description = wordwrap(nl2br($description), 60, "
    ", true); + $description = nl2br($description); //$description = $description_with_lines; $guild_owner = $guild->getOwner(); diff --git a/system/pages/news.php b/system/pages/news.php index 92d2e7ab..db04092d 100644 --- a/system/pages/news.php +++ b/system/pages/news.php @@ -182,13 +182,13 @@ if(!$news_cached) $admin_options = ''; if($canEdit) { - $admin_options = '

    + $admin_options = '

    Edit - + Delete - + ' . ($news['hidden'] != 1 ? 'Hide' : 'Show') . ' '; diff --git a/system/pages/online.php b/system/pages/online.php index ca629a3b..2d96a405 100644 --- a/system/pages/online.php +++ b/system/pages/online.php @@ -54,9 +54,9 @@ if($config['online_vocations']) { } if($db->hasTable('players_online')) // tfs 1.0 - $playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `level`, `vocation`' . $outfit . ', `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players`, `players_online` WHERE `players`.`id` = `players_online`.`player_id` AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order); + $playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `players`.`level`, `players`.`vocation`' . $outfit . ', `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players`, `players_online` WHERE `players`.`id` = `players_online`.`player_id` AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order); else - $playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `level`, `vocation`' . $outfit . ', ' . $promotion . ' `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players` WHERE `players`.`online` > 0 AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order); + $playersOnline = $db->query('SELECT `accounts`.`country`, `players`.`name`, `players`.`level`, `players`.`vocation`' . $outfit . ', ' . $promotion . ' `' . $skull_time . '` as `skulltime`, `' . $skull_type . '` as `skull` FROM `accounts`, `players` WHERE `players`.`online` > 0 AND `accounts`.`id` = `players`.`account_id` ORDER BY ' . $order); $players_data = array(); $players = 0; diff --git a/system/pages/polls.php b/system/pages/polls.php index c31b61cb..dcc781c2 100644 --- a/system/pages/polls.php +++ b/system/pages/polls.php @@ -369,4 +369,3 @@ function getColorByPercent($percent) echo 'This poll doesn\'t exist.
    '; echo '
    Go to list of polls'; } -?> diff --git a/system/pages/server_info.php b/system/pages/server_info.php index 7c2a519e..b750c3ee 100644 --- a/system/pages/server_info.php +++ b/system/pages/server_info.php @@ -108,6 +108,3 @@ $twig->display('serverinfo.html.twig', array( 'finalBanishmentLength' => isset($config['lua']['final_banishment_length']) ? eval('return (' . $config['lua']['final_banishment_length'] . ') / (24 * 60 * 60);') : null, 'ipBanishmentLength' => isset($config['lua']['ip_banishment_length']) ? eval('return (' . $config['lua']['ip_banishment_length'] . ') / (24 * 60 * 60);') : null, )); -?> - - diff --git a/system/pages/team.php b/system/pages/team.php index 2e410e12..fbc0df99 100644 --- a/system/pages/team.php +++ b/system/pages/team.php @@ -74,4 +74,3 @@ foreach($groupList as $id => $group) $twig->display('team.html.twig', array( 'groupmember' => $groupMember )); -?> \ No newline at end of file diff --git a/system/router.php b/system/router.php index 879ad727..1a2cab23 100644 --- a/system/router.php +++ b/system/router.php @@ -285,9 +285,10 @@ if(config('backward_support')) { unset($page); -function getDatabasePages() { - global $db; - $pages = $db->query('SELECT `name` FROM ' . TABLE_PREFIX . 'pages'); +function getDatabasePages($withHidden = false): array +{ + global $db, $logged_access; + $pages = $db->query('SELECT `name` FROM ' . TABLE_PREFIX . 'pages WHERE ' . ($withHidden ? '' : '`hidden` != 1 AND ') . '`access` <= ' . $db->quote($logged_access)); $ret = []; if ($pages->rowCount() < 1) { diff --git a/system/templates/account.change_name.html.twig b/system/templates/account.change_name.html.twig index 255689e3..bd1fa8f0 100644 --- a/system/templates/account.change_name.html.twig +++ b/system/templates/account.change_name.html.twig @@ -25,7 +25,7 @@ To change a name of character select player and choose a new name.
    Character: @@ -74,4 +74,4 @@ To change a name of character select player and choose a new name.
    - \ No newline at end of file + diff --git a/system/templates/account.create.html.twig b/system/templates/account.create.html.twig index f73cec0d..1d46db70 100644 --- a/system/templates/account.create.html.twig +++ b/system/templates/account.create.html.twig @@ -96,6 +96,9 @@ {% if errors.password is defined %}{{ errors.password }}{% endif %} + + {{ hook('HOOK_ACCOUNT_CREATE_AFTER_PASSWORD') }} + Repeat password: diff --git a/system/templates/account.create_character.html.twig b/system/templates/account.create_character.html.twig index 8d823b2f..045c749c 100644 --- a/system/templates/account.create_character.html.twig +++ b/system/templates/account.create_character.html.twig @@ -2,7 +2,7 @@ Please choose a name{% if config.character_samples|length > 1 %}, vocation{% end {% if config.character_towns|length > 1 %}, town{% endif %} and sex for your character.
    In any case the name must not violate the naming conventions stated in the {{ config.lua.serverName }} Rules, or your character might get deleted or name locked. -{% if account_logged.getPlayersList(false)|length >= config.characters_per_account %} +{% if account_logged.getPlayersList(true)|length >= config.characters_per_account %} You have maximum number of characters per account on your account. Delete one before you make new. {% endif %}

    diff --git a/system/templates/account.management.html.twig b/system/templates/account.management.html.twig index 80d60006..510c90a1 100644 --- a/system/templates/account.management.html.twig +++ b/system/templates/account.management.html.twig @@ -170,7 +170,16 @@ {% for player in players %} {% set i = i + 1 %} - {{ player.getName() }}{{ player.getLevel() }}{{ player.getVocationName() }}{{ config.towns[player.getTownId()] }}{% if player.getLastLogin() > 0 %}{{ player.getLastLogin|date('d F Y (H:i)') }}{% else %}Never.{% endif %}{% if player.isOnline() %}ONLINE{% else %}Offline{% endif %}{% if player.isHidden() %}Hidden{% else %}Visible{% endif %}[Edit] + + {{ player.getName() }} + + {{ player.getLevel() }} + {{ player.getVocationName() }} + {{ config.towns[player.getTownId()] }} + {% if player.getLastLogin() > 0 %}{{ player.getLastLogin|date('d F Y (H:i)') }}{% else %}Never.{% endif %} + {% if player.isOnline() %}ONLINE{% else %}Offline{% endif %} + {% if player.isHidden() %}Hidden{% else %}Visible{% endif %} + {% if not player.isDeleted() %}[Edit]{% endif %} {% endfor %} diff --git a/system/templates/admin.pages.links.html.twig b/system/templates/admin.pages.links.html.twig index 135055c0..459d0623 100644 --- a/system/templates/admin.pages.links.html.twig +++ b/system/templates/admin.pages.links.html.twig @@ -1,14 +1,14 @@ \ No newline at end of file + diff --git a/system/templates/characters.html.twig b/system/templates/characters.html.twig index aad31aa8..4234f2ab 100644 --- a/system/templates/characters.html.twig +++ b/system/templates/characters.html.twig @@ -11,7 +11,7 @@ {{ hook(constant('HOOK_CHARACTERS_BEFORE_INFORMATIONS')) }} {% if canEdit %} - + Edit {% endif %} @@ -142,7 +142,7 @@ {% set rows = rows + 1 %} Comment: - {{ comment|raw }} + {{ comment|raw }} {% endif %} @@ -237,11 +237,13 @@ {% endif %} + {{ hook(constant('HOOK_CHARACTERS_AFTER_EQUIPMENT')) }} {{ hook(constant('HOOK_CHARACTERS_BEFORE_DEATHS')) }} + {% if deaths|length > 0 %}
    @@ -404,7 +406,8 @@ - + {% set button_name = "View" %} + {{ include('buttons.base.html.twig') }} @@ -418,7 +421,7 @@ {% endif %} {{ hook(constant('HOOK_CHARACTERS_AFTER_CHARACTERS')) }} {% if canEdit %} - + Edit {% endif %} diff --git a/system/templates/exception.html.twig b/system/templates/exception.html.twig index 7a31b4bb..71d7bdac 100644 --- a/system/templates/exception.html.twig +++ b/system/templates/exception.html.twig @@ -8,9 +8,9 @@ + -