Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Figueroa <amenadiel@gmail.com>2020-12-30 04:37:30 +0300
committerFelipe Figueroa <amenadiel@gmail.com>2020-12-30 04:37:30 +0300
commit80fa75a201f9a55089a8fe8886bf7f11075da338 (patch)
tree5312d1d1212070ce8943da2cbda230db752b3869
parent0392a0c5bf4384fe41cc0a9621265bac1efe18af (diff)
parent3a62e657a4ba5df4a96aba8771c61a2379801f88 (diff)
merge with dev@2020-10-19
-rw-r--r--.configs/debug.kint.php52
-rw-r--r--.configs/debug.var_dumper.php43
-rw-r--r--.github/workflows/codeception_tests.yml9
-rw-r--r--.github/workflows/coding_standards.yml35
-rw-r--r--.github/workflows/rector_checkstyle.yml80
-rw-r--r--.github/workflows/static_analysis.yml37
-rw-r--r--.gitignore11
-rw-r--r--.phive/phars.xml5
-rw-r--r--.php_cs.php7
-rw-r--r--.phpcs.xml19
-rw-r--r--.prettierrc42
-rw-r--r--.reviewdog.yml20
-rw-r--r--.scrutinizer.yml2
-rw-r--r--Makefile10
-rw-r--r--assets/js/ac_insert_row.js103
-rw-r--r--assets/js/display.js70
-rw-r--r--assets/js/footer_scripts.js16
-rw-r--r--assets/js/footer_sqledit.js2
-rw-r--r--assets/js/functions.js4
-rw-r--r--assets/js/insert_or_edit_row.js8
-rw-r--r--assets/js/multiactionform.js2
-rw-r--r--assets/sw.dev.js145
-rw-r--r--assets/sw.js1340
-rw-r--r--assets/templates/components/common_head.twig12
-rw-r--r--assets/templates/footer_iframe.twig21
-rw-r--r--assets/themes/global.css53
-rw-r--r--assets/vendor/less.min.js8843
-rw-r--r--composer-require-checker.json16
-rw-r--r--composer.json14
-rw-r--r--composer.lock2077
-rw-r--r--config.inc.php-dist119
-rw-r--r--mk_linters.mk189
-rw-r--r--package.json5
-rw-r--r--phpstan-baseline.neon499
-rw-r--r--phpstan.neon10
-rw-r--r--psalm-baseline.xml390
-rw-r--r--psalm.xml7
-rw-r--r--rector.php48
-rw-r--r--src/classes/ADONewConnection.php5
-rw-r--r--src/classes/ADORecordSet.php5
-rw-r--r--src/classes/ADOdbException.php73
-rw-r--r--src/classes/Connection.php55
-rw-r--r--src/classes/ContainerHandlers.php146
-rw-r--r--src/classes/ContainerUtils.php358
-rw-r--r--src/classes/Misc.php116
-rw-r--r--src/classes/ViewManager.php180
-rw-r--r--src/controllers/AggregatesController.php10
-rw-r--r--src/controllers/AlldbController.php27
-rw-r--r--src/controllers/BaseController.php66
-rw-r--r--src/controllers/ColpropertiesController.php8
-rw-r--r--src/controllers/ConstraintsController.php4
-rw-r--r--src/controllers/DatabaseController.php38
-rw-r--r--src/controllers/DataexportController.php4
-rw-r--r--src/controllers/DataimportController.php1
-rw-r--r--src/controllers/DbexportController.php2
-rw-r--r--src/controllers/DisplayController.php28
-rw-r--r--src/controllers/DomainsController.php10
-rw-r--r--src/controllers/FulltextController.php26
-rw-r--r--src/controllers/FunctionsController.php43
-rw-r--r--src/controllers/GroupsController.php6
-rw-r--r--src/controllers/HistoryController.php7
-rw-r--r--src/controllers/IndexesController.php10
-rw-r--r--src/controllers/IntroController.php12
-rw-r--r--src/controllers/LoginController.php2
-rw-r--r--src/controllers/MaterializedviewpropertiesController.php10
-rw-r--r--src/controllers/MaterializedviewsController.php25
-rw-r--r--src/controllers/OperatorsController.php2
-rw-r--r--src/controllers/PrivilegesController.php4
-rw-r--r--src/controllers/RolesController.php10
-rw-r--r--src/controllers/RulesController.php4
-rw-r--r--src/controllers/SchemasController.php29
-rw-r--r--src/controllers/SequencesController.php29
-rw-r--r--src/controllers/ServersController.php8
-rw-r--r--src/controllers/SqlController.php5
-rw-r--r--src/controllers/SqleditController.php2
-rw-r--r--src/controllers/TablesController.php122
-rw-r--r--src/controllers/TablespacesController.php6
-rw-r--r--src/controllers/TblpropertiesController.php19
-rw-r--r--src/controllers/TreeController.php10
-rw-r--r--src/controllers/TriggersController.php10
-rw-r--r--src/controllers/TypesController.php16
-rw-r--r--src/controllers/UsersController.php8
-rw-r--r--src/controllers/ViewpropertiesController.php10
-rw-r--r--src/controllers/ViewsController.php25
-rw-r--r--src/database/ADOdbBase.php48
-rw-r--r--src/database/Postgres.php52
-rw-r--r--src/database/databasetraits/RoleTrait.php6
-rw-r--r--src/database/databasetraits/SequenceTrait.php34
-rw-r--r--src/database/databasetraits/TableTrait.php3
-rw-r--r--src/decorators/ActionUrlDecorator.php2
-rw-r--r--src/decorators/BranchUrlDecorator.php4
-rw-r--r--src/decorators/Decorator.php15
-rw-r--r--src/decorators/RedirectUrlDecorator.php4
-rw-r--r--src/decorators/UrlDecorator.php4
-rw-r--r--src/help/PostgresDoc.php4
-rw-r--r--src/help/PostgresDoc10.php2
-rw-r--r--src/help/PostgresDoc11.php2
-rw-r--r--src/help/PostgresDoc12.php2
-rw-r--r--src/help/PostgresDoc90.php2
-rw-r--r--src/help/PostgresDoc91.php2
-rw-r--r--src/help/PostgresDoc92.php2
-rw-r--r--src/help/PostgresDoc93.php2
-rw-r--r--src/help/PostgresDoc94.php2
-rw-r--r--src/help/PostgresDoc95.php2
-rw-r--r--src/help/PostgresDoc96.php2
-rw-r--r--src/lib.inc.php145
-rw-r--r--src/middleware/PopulateRequestResponse.php33
-rw-r--r--src/router.php55
-rw-r--r--src/traits/AdminTrait.php139
-rw-r--r--src/traits/ExportTrait.php2
-rw-r--r--src/traits/HelperTrait.php35
-rw-r--r--src/traits/InsertEditRowTrait.php4
-rw-r--r--src/traits/MiscTrait.php56
-rw-r--r--src/traits/ViewsMatviewsTrait.php16
-rw-r--r--src/translations/Afrikaans.php2
-rw-r--r--src/translations/Arabic.php2
-rw-r--r--src/translations/Catalan.php2
-rw-r--r--src/translations/ChineseSim.php2
-rw-r--r--src/translations/ChineseTr.php2
-rw-r--r--src/translations/ChineseUtf8ZhCn.php2
-rw-r--r--src/translations/ChineseUtf8ZhTw.php2
-rw-r--r--src/translations/Czech.php2
-rw-r--r--src/translations/Danish.php2
-rw-r--r--src/translations/Dutch.php2
-rw-r--r--src/translations/English.php2
-rw-r--r--src/translations/French.php2
-rw-r--r--src/translations/Galician.php2
-rw-r--r--src/translations/German.php2
-rw-r--r--src/translations/Greek.php2
-rw-r--r--src/translations/Hebrew.php2
-rw-r--r--src/translations/Hungarian.php2
-rw-r--r--src/translations/Italian.php2
-rw-r--r--src/translations/Japanese.php2
-rw-r--r--src/translations/Lithuanian.php2
-rw-r--r--src/translations/Mongol.php2
-rw-r--r--src/translations/Polish.php2
-rw-r--r--src/translations/PortugueseBr.php2
-rw-r--r--src/translations/PortuguesePt.php2
-rw-r--r--src/translations/Romanian.php2
-rw-r--r--src/translations/Russian.php2
-rw-r--r--src/translations/RussianUtf8.php2
-rw-r--r--src/translations/Slovak.php2
-rw-r--r--src/translations/Spanish.php2
-rw-r--r--src/translations/Swedish.php2
-rw-r--r--src/translations/Turkish.php2
-rw-r--r--src/translations/Ukrainian.php2
-rw-r--r--src/xhtml/HTMLController.php28
-rw-r--r--src/xhtml/HTMLFooterController.php2
-rw-r--r--src/xhtml/HTMLHeaderController.php12
-rw-r--r--src/xhtml/HTMLNavbarController.php42
-rw-r--r--src/xhtml/HTMLTableController.php3
-rw-r--r--src/xhtml/XHtmlSimpleElement.php14
-rw-r--r--tests/_support/Helper/Unit.php28
-rw-r--r--tests/unit/ContainerTest.php6
-rw-r--r--tests/unit/DataEntitiesTest.php2
-rw-r--r--tests/unit/PublicSectionsTest.php2
-rw-r--r--tests/unit/TablesAndViewsTest.php2
-rw-r--r--tests/unit/UserEntitiesTest.php2
-rw-r--r--tests/unit/ViewTest.php2
l---------tools/composer-require-checker1
l---------tools/phpcpd1
l---------tools/phpcs1
l---------tools/phpmd1
-rwxr-xr-xtools/reviewdogbin0 -> 16261120 bytes
-rw-r--r--yarn.lock180
165 files changed, 5689 insertions, 11346 deletions
diff --git a/.configs/debug.kint.php b/.configs/debug.kint.php
new file mode 100644
index 00000000..97394bd6
--- /dev/null
+++ b/.configs/debug.kint.php
@@ -0,0 +1,52 @@
+<?php
+
+#declare(strict_types=1);
+
+/**
+ * PHPPgAdmin vv6.0.0-RC8-16-g13de173f
+ */
+
+use Kint\Kint;
+use Kint\Renderer\CliRenderer;
+use Kint\Renderer\RichRenderer;
+
+define('KINT_SKIP_FACADE', true);
+
+
+ Kint::$enabled_mode = true;
+ RichRenderer::$folder = false;
+
+ if (!\function_exists('dump')) {
+ function dump(...$vars)
+ {
+ $fp = fopen(sprintf('%s/temp/debug.output.log', dirname(__DIR__)), 'ab');
+
+ CliRenderer::$cli_colors = true;
+ $return = Kint::$return;
+ $enabled_mode = Kint::$enabled_mode;
+ Kint::$return = true;
+ Kint::$enabled_mode = Kint::MODE_CLI;
+
+ $kintdump = Kint::dump(...$vars);
+ //dump($kintdump);
+ fwrite($fp, $kintdump);
+
+ Kint::$enabled_mode = $enabled_mode;
+ Kint::$return = $return;
+
+ fclose($fp);
+ }
+ }
+
+ function ddd(...$v): void
+ {
+ Kint::dump(...$v);
+
+ exit;
+ }
+
+ Kint::$aliases[] = ['PHPPgAdmin\\Traits\\HelperTrait', 'staticTrace'];
+ Kint::$aliases[] = ['PHPPgAdmin\\ContainerUtils', 'staticTrace'];
+ Kint::$aliases[] = ['PHPPgAdmin\\Traits\\HelperTrait', 'prTrace'];
+ Kint::$aliases[] = 'ddd';
+ Kint::$aliases[] = 'dump';
diff --git a/.configs/debug.var_dumper.php b/.configs/debug.var_dumper.php
new file mode 100644
index 00000000..fd034594
--- /dev/null
+++ b/.configs/debug.var_dumper.php
@@ -0,0 +1,43 @@
+<?php
+
+// declare(strict_types = 1);
+
+/**
+ * PHPPgAdmin vv6.0.0-RC8-16-g13de173f
+ */
+
+// to enable debugging middleware and endpoints
+// debuggers
+use Symfony\Component\VarDumper\Cloner\VarCloner;
+use Symfony\Component\VarDumper\Dumper\CliDumper;
+use Symfony\Component\VarDumper\Dumper\ContextProvider\CliContextProvider;
+use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider;
+use Symfony\Component\VarDumper\Dumper\HtmlDumper;
+use Symfony\Component\VarDumper\Dumper\ServerDumper;
+use Symfony\Component\VarDumper\VarDumper;
+
+if (\class_exists('Symfony\Component\VarDumper\VarDumper')) {
+ $cloner = new VarCloner();
+ $fallbackDumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper();
+ $dumper = new ServerDumper('tcp://127.0.0.1:9912', $fallbackDumper, [
+ 'cli' => new CliContextProvider(),
+ 'source' => new SourceContextProvider(),
+ ]);
+
+ VarDumper::setHandler(function ($var) use ($cloner, $dumper): void {
+ $dumper->dump($cloner->cloneVar($var));
+ });
+}
+if (false && \PHP_SAPI !== 'cli') {
+ \define('SESSION_SAVE_PATH', \implode(\DIRECTORY_SEPARATOR, [BASE_PATH, 'temp/sessions']));
+ \defined('IN_TEST') || \define('IN_TEST', false);
+
+ if (!IN_TEST && \defined('SESSION_SAVE_PATH')
+ && (
+ \is_dir(SESSION_SAVE_PATH)
+ || \mkdir(SESSION_SAVE_PATH, 0777, true)
+ )
+ ) {
+ \session_save_path(SESSION_SAVE_PATH);
+ }
+}
diff --git a/.github/workflows/codeception_tests.yml b/.github/workflows/codeception_tests.yml
index b9892cb2..42beb85a 100644
--- a/.github/workflows/codeception_tests.yml
+++ b/.github/workflows/codeception_tests.yml
@@ -18,8 +18,8 @@ env:
PHP_EXTENSIONS: "mbstring, pgsql"
key: cache-v1 # can be any string, change to clear the extension cache.
jobs:
- coding_standards:
- name: "Coding_Standards"
+ tests:
+ name: "Codeception_Tests"
runs-on: "ubuntu-latest"
@@ -51,7 +51,7 @@ jobs:
restore-keys: ${{ steps.extcache.outputs.key }}
- name: "Install PHP with extensions"
- uses: "shivammathur/setup-php@v2.5.0"
+ uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
@@ -68,5 +68,6 @@ jobs:
- name: "Install locked dependencies from composer.lock"
run: "composer install --no-interaction --no-progress --no-suggest"
- - name: "Run friendsofphp/php-cs-fixer"
+ - run: cp config.inc.php-dist config.inc.php
+ - name: "Run vendor/bin/codecept"
run: "vendor/bin/codecept run unit"
diff --git a/.github/workflows/coding_standards.yml b/.github/workflows/coding_standards.yml
index 08a4117a..c3c810c4 100644
--- a/.github/workflows/coding_standards.yml
+++ b/.github/workflows/coding_standards.yml
@@ -35,6 +35,10 @@ jobs:
- name: "Checkout"
uses: "actions/checkout@v2.3.3"
+ - uses: n1hility/cancel-previous-runs@v2
+ with:
+ token: ${{ secrets.GH_ACTIONS_TOKEN }}
+
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
@@ -51,12 +55,12 @@ jobs:
restore-keys: ${{ steps.extcache.outputs.key }}
- name: "Install PHP with extensions"
- uses: "shivammathur/setup-php@v2.5.0"
+ uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
php-version: "${{ matrix.php_version }}"
- tools: composer
+ tools: composer, phpcs, cs2pr
- name: Cache Composer
uses: "actions/cache@v2.1.1"
@@ -68,18 +72,29 @@ jobs:
- name: "Install locked dependencies from composer.lock"
run: "composer install --no-interaction --no-progress --no-suggest"
+ - name: "Create dummy config files"
+ run: "cp config.inc.php-dist config.inc.php"
+
- name: "Run ergebnis/composer-normalize"
run: "composer normalize --dry-run"
- - name: "Create cache directory for friendsofphp/php-cs-fixer"
- run: "mkdir -p .build/php-cs-fixer"
+ - name: "Create cache directories and files for friendsofphp/php-cs-fixer"
+ run: "mkdir -p .build/phpcs"
+ - run: touch .build/phpcs/php-cs.cache
+ - run: touch .build/phpcs/csfixer.cache
- - name: "Cache cache directory for friendsofphp/php-cs-fixer"
+
+
+ - name: "Cache cache directory for phpcs and friendsofphp/php-cs-fixer"
uses: "actions/cache@v2.1.1"
with:
- path: ".build/php-cs-fixer"
- key: "php-${{ matrix.php_version }}-php-cs-fixer-${{ hashFiles('composer.lock') }}"
- restore-keys: "php-${{ matrix.php_version }}-php-cs-fixer-"
-
+ path: ".build/phpcs"
+ key: "php-${{ matrix.php_version }}-phpcs-${{ github.sha }}"
+ restore-keys: "php-${{ matrix.php_version }}-phpcs-"
+
+# - name: "Run CodeShiffer"
+# run: phpcs --standard=.phpcs.xml --parallel=2 --cache=.build/phpcs/php-cs.cache --report=checkstyle src/* | cs2pr
+
+
- name: "Run friendsofphp/php-cs-fixer"
- run: "vendor/bin/php-cs-fixer fix --config=.php_cs.php --diff --diff-format=udiff --dry-run --verbose"
+ run: "vendor/bin/php-cs-fixer fix --config=.php_cs.php --diff --diff-format=udiff --cache-file=.build/phpcs/csfixer.cache --dry-run --format=checkstyle | cs2pr"
diff --git a/.github/workflows/rector_checkstyle.yml b/.github/workflows/rector_checkstyle.yml
new file mode 100644
index 00000000..795d3a3a
--- /dev/null
+++ b/.github/workflows/rector_checkstyle.yml
@@ -0,0 +1,80 @@
+name: Rector Checkstyle
+'on':
+ push:
+ branches:
+ - master
+ - develop
+
+
+env:
+ MIN_COVERED_MSI: 100
+ MIN_MSI: 100
+ PHP_EXTENSIONS: "mbstring, pgsql"
+ key: cache-v1 # can be any string, change to clear the extension cache.
+
+jobs:
+ rector_checkstyle:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php_version:
+ - "7.3"
+ dependencies:
+ - "locked"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2.3.3
+ - uses: n1hility/cancel-previous-runs@v2
+ with:
+ token: '${{ secrets.GH_ACTIONS_TOKEN }}'
+ - name: Setup cache environment
+ id: extcache
+ uses: shivammathur/cache-extensions@v1
+ with:
+ php-version: '${{ matrix.php_version }}'
+ extensions: '${{ env.PHP_EXTENSIONS }}'
+ key: '${{ env.key }}'
+ - name: Cache extensions
+ uses: actions/cache@v2.1.1
+ with:
+ path: '${{ steps.extcache.outputs.dir }}'
+ key: '${{ steps.extcache.outputs.key }}'
+ restore-keys: '${{ steps.extcache.outputs.key }}'
+
+
+ - name: Install locked dependencies from composer.lock
+ run: composer install --no-interaction --no-progress --no-suggest
+ - name: Create dummy config files
+ run: cp config.inc.php-dist config.inc.php
+
+ - name: Install PHP with extensions
+ uses: shivammathur/setup-php@v2
+ with:
+ coverage: none
+ extensions: '${{ env.PHP_EXTENSIONS }}'
+ php-version: '${{ matrix.php_version }}'
+ tools: 'composer, cs2pr'
+
+ - name: Cache Composer
+ uses: "actions/cache@v2.1.1"
+ with:
+ path: "~/.composer/cache"
+ key: "composer-${{ hashFiles('composer.lock') }}"
+ restore-keys: "composer-"
+
+ - name: "Install locked dependencies from composer.lock"
+ run: "composer install --no-interaction --no-progress --no-suggest"
+
+ - name: "Create cache folder for rector"
+ run: "mkdir -p .build/rector"
+
+ - name: "Cache cache directory for rector"
+ uses: "actions/cache@v2.1.1"
+ with:
+ path: ".build/rector"
+ key: "php-${{ matrix.php_version }}-rector-${{ github.sha }}"
+ restore-keys: "php-${{ matrix.php_version }}-rector-"
+
+ - run: >-
+ vendor/bin/rector process --ansi --dry-run --output-format=checkstyle
+ | cs2pr
diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml
index f9a137e3..aa4b9edd 100644
--- a/.github/workflows/static_analysis.yml
+++ b/.github/workflows/static_analysis.yml
@@ -13,7 +13,7 @@ env:
MIN_MSI: 100
PHP_EXTENSIONS: "mbstring, pgsql"
GH_ACTIONS_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
- PHP_TOOLS: composer, prestissimo, composer-require-checker, composer-normalize
+ PHP_TOOLS: composer, prestissimo, composer-require-checker, composer-normalize, composer-unused, phpcs, cs2pr
key: cache-v1 # can be any string, change to clear the extension cache.
jobs:
Static_Analysis:
@@ -33,6 +33,10 @@ jobs:
- name: "Checkout"
uses: "actions/checkout@v2.3.3"
+ - uses: n1hility/cancel-previous-runs@v2
+ with:
+ token: ${{ secrets.GH_ACTIONS_TOKEN }}
+
- name: Setup cache for extensions
id: extcache
uses: shivammathur/cache-extensions@v1
@@ -49,7 +53,7 @@ jobs:
restore-keys: ${{ steps.extcache.outputs.key }}
- name: "Install PHP with extensions"
- uses: "shivammathur/setup-php@v2.5.0"
+ uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
@@ -66,12 +70,18 @@ jobs:
- name: "Install locked dependencies from composer.lock"
run: "composer install --no-interaction --no-progress --no-suggest"
+ - name: "Create dummy config files"
+ run: "cp config.inc.php-dist config.inc.php"
+
- name: "Run php-parallel-lint"
run: "vendor/bin/parallel-lint --exclude vendor --exclude .build ."
- name: "Create cache directory for phpstan/phpstan"
run: "mkdir -p .build/phpstan"
+ - name: "Create cache directory for vimeo/psalm"
+ run: "mkdir -p .build/psalm"
+
- name: "Create cache entry for phpstan/phpstan"
uses: "actions/cache@v2.1.1"
with:
@@ -80,10 +90,8 @@ jobs:
restore-keys: "php-7.3-phpstan-"
- name: "Run phpstan/phpstan"
- run: "vendor/bin/phpstan analyse --configuration=phpstan.neon --error-format=github"
+ run: "vendor/bin/phpstan analyse --configuration=phpstan.neon --error-format=checkstyle | cs2pr"
- - name: "Create cache directory for vimeo/psalm"
- run: "mkdir -p .build/psalm"
- name: "Create cache entry for vimeo/psalm"
uses: "actions/cache@v2.1.1"
@@ -93,10 +101,15 @@ jobs:
restore-keys: "php-7.3-psalm-"
- name: "Run vimeo/psalm"
- run: "vendor/bin/psalm --config=psalm.xml --shepherd --show-info=false --stats --diff --diff-methods --threads=4"
-
- - name: Run reviewdog
- env:
- REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
- run: |
- reviewdog -conf=.reviewdog.yml -reporter=github-check \ No newline at end of file
+ run: "vendor/bin/psalm --config=psalm.xml --shepherd --show-info=false --output-format=checkstyle --diff --diff-methods --threads=4 | cs2pr"
+
+
+# - uses: reviewdog/action-setup@v1
+# with:
+# reviewdog_version: latest # Optional. [latest,nightly,v.X.Y.Z]
+#
+# - name: Run reviewdog
+# env:
+# REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
+# run: |
+# reviewdog -conf=.reviewdog.yml -reporter=github-check \ No newline at end of file
diff --git a/.gitignore b/.gitignore
index ef9f0bab..62fa25dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,7 +27,7 @@ playground
*.log
tests/_output
temp/*.output.txt
-*baseline.*
+
###> Vendor files
node_modules
@@ -51,3 +51,12 @@ config.*.php*
tools/reviewdog
tools/composer-require-checker
.vscode/*
+
+### Linter's reports
+temp/*.checkstyle.xml
+temp/*.junit.xml
+temp/*.report.json
+temp/*.report.xml
+tools/composer*
+tools/phpcbf
+tools/phpmd_checkstyle \ No newline at end of file
diff --git a/.phive/phars.xml b/.phive/phars.xml
index 1ec4f33f..76e86e56 100644
--- a/.phive/phars.xml
+++ b/.phive/phars.xml
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-require-checker" version="^2.1.0" installed="2.1.0" location="./tools/composer-require-checker" copy="false"/>
+ <phar name="phpmd" version="^2.7.0" installed="2.7.0" location="./tools/phpmd" copy="false"/>
+ <phar name="phpcpd" version="^4.1.0" installed="4.1.0" location="./tools/phpcpd" copy="false"/>
+ <phar name="phpcs" version="^3.5.3" installed="3.5.3" location="./tools/phpcs" copy="false"/>
+ <phar name="phpcbf" version="^3.5.5" installed="3.5.5" location="./tools/phpcbf" copy="false"/>
+ <phar name="composer-unused" version="^0.7.4" installed="0.7.4" location="./tools/composer-unused" copy="false"/>
</phive>
diff --git a/.php_cs.php b/.php_cs.php
index 43d3c524..1c5b6884 100644
--- a/.php_cs.php
+++ b/.php_cs.php
@@ -16,7 +16,6 @@ $header = "PHPPgAdmin {$version}";
$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php71($header), [
'declare_strict_types' => false,
- //'header_comment' => ['commentType' => 'PHPDoc', 'header' => $header],
'escape_implicit_backslashes' => false,
'final_class' => false,
'final_internal_class' => false,
@@ -35,6 +34,7 @@ $config = Config\Factory::fromRuleSet(new Config\RuleSet\Php71($header), [
$config->getFinder()
->ignoreDotFiles(false)
->in(__DIR__)
+ ->notName('rector.php')
->exclude([
'.build',
'.configs',
@@ -43,12 +43,13 @@ $config->getFinder()
'docs',
'node_modules',
'temp',
+ 'rector.php',
'src/router.php',
'vendor',
'.github',
])
- ->name('.php_cs');
+ ->name('.php_cs.php');
-$config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/php_cs.cache');
+$config->setCacheFile(__DIR__ . '/.build/phpcs/csfixer.cache');
return $config;
diff --git a/.phpcs.xml b/.phpcs.xml
new file mode 100644
index 00000000..ad9c46af
--- /dev/null
+++ b/.phpcs.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<ruleset name="Slim coding standard">
+ <description>Slim coding standard</description>
+ <file>lib</file>
+
+ <exclude-pattern>*/lib/_(boilerplate|bootstrap)\.php$</exclude-pattern>
+ <!-- display progress -->
+ <arg value="p"/>
+ <!-- use colors in output -->
+ <arg name="colors"/>
+
+ <!-- inherit rules from: -->
+ <rule ref="PSR2"/>
+ <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
+
+ <!-- Paths to check -->
+ <file>Slim</file>
+ <file>tests</file>
+</ruleset>
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 00000000..65017653
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,42 @@
+{
+ "singleQuote": true,
+ "semi": true,
+ "tabWidth": 2,
+ "useTabs": false,
+ "trailingComma": "es5",
+ "overrides": [
+ {
+ "files": "*.json",
+ "options": {
+ "useTabs": false,
+ "parser": "json"
+ }
+ },
+ {
+ "files": "*.scss",
+ "options": {
+ "useTabs": false,
+ "parser": "scss"
+ }
+ },
+ {
+ "files": "*.less",
+ "options": {
+ "useTabs": false,
+ "parser": "less"
+ }
+ }
+ ],
+ "twigPrintWidth": 120,
+ "twigMultiTags": [
+ "if,endif",
+ "nav,endnav",
+ "switch,case,default,endswitch",
+ "ifchildren,endifchildren",
+ "cache,endcache",
+ "js,endjs"
+ ],
+ "plugins": [
+ "./node_modules/prettier-plugin-twig-melody"
+ ]
+} \ No newline at end of file
diff --git a/.reviewdog.yml b/.reviewdog.yml
index c2d6746b..7a3f065a 100644
--- a/.reviewdog.yml
+++ b/.reviewdog.yml
@@ -1,13 +1,23 @@
runner:
phpstan:
- cmd: vendor/bin/phpstan analyse --memory-limit=2G --configuration phpstan.neon --error-format=raw
+ cmd: vendor/bin/phpstan analyse --memory-limit=2G --configuration phpstan.neon --error-format=checkstyle
level: info
- eslint:
- cmd: node_modules/.bin/eslint --ext js --ignore-path .eslintignore assets
+ psalm:
+ cmd: vendor/bin/psalm --config=psalm.xml --diff --diff-methods --output-format=checkstyle
level: info
+ name: checkstyle
- psalm:
- cmd: vendor/bin/psalm --config=psalm.xml --ignore-baseline --output-format=checkstyle
+ csfixer:
+ cmd: vendor/bin/php-cs-fixer fix --config=.php_cs.php --cache-file=.build/phpcs/csfixer.cache --format=checkstyle --dry-run --diff
+ level: info
+ name: checkstyle
+
+ phpcs:
+ cmd: phpcs --standard=.phpcs.xml --parallel=2 --cache=.build/phpcs/php-cs.cache --report=checkstyle src/*
level: info
name: checkstyle
+
+ eslint:
+ cmd: node_modules/.bin/eslint --ext js --ignore-path .eslintignore assets
+ level: info
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index 884d5307..8c1d2821 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -34,6 +34,7 @@ filter:
paths: [src/*]
excluded_paths:
- "tests/*"
+ - "router.php"
- "*.min.js"
- "assets/js/"
@@ -56,6 +57,5 @@ build:
- "php-scrutinizer-run"
- "phpcs-run ./src/"
- "make test"
- - "make psalm"
nodes:
tests: true
diff --git a/Makefile b/Makefile
index 0da19f61..b991a84c 100644
--- a/Makefile
+++ b/Makefile
@@ -38,8 +38,9 @@ install:
fix_permissions:
@sudo chmod 777 temp -R ;\
sudo chown -R $$USER:www-data temp/sessions ;\
+ sudo rm -R --force temp/twigcache ;\
+ git checkout HEAD temp/twigcache ;\
sudo chown -R $$USER:www-data temp/twigcache ;\
- sudo rm -R --force temp/twigcache/*
composer_update:
@echo -e "updating composer with params ${YELLOW}--lock --root-reqs --prefer-dist --prefer-stable --no-suggest -a${WHITE}" ;\
@@ -76,7 +77,12 @@ tag_and_push:
-tag: test update_version csfixer lint tag_and_push
+tag: test update_version csfixer fixers
+tag:
+ @yarn prettier --write ;\
+ yarn build ;\
+ ${MAKE} tag_and_push --no-print-directory
+
test:
ifeq ("$(wildcard config.inc.php)","")
diff --git a/assets/js/ac_insert_row.js b/assets/js/ac_insert_row.js
index d982cec9..c90d192e 100644
--- a/assets/js/ac_insert_row.js
+++ b/assets/js/ac_insert_row.js
@@ -1,16 +1,55 @@
/** globals jQuery */
var fkl_hasnext = false;
var fkl_hasprev = false;
+jQuery.ppa = jQuery.ppa || {
+ root: $('#root'),
+};
/* hide the value list */
function hideAc() {
jQuery.ppa.o = 0;
- with (jQuery.ppa) {
- fklist.hide();
- fkbg.hide();
- }
+ let { fklist, fkbg } = jQuery.ppa || {};
+ fklist.hide();
+ fkbg.hide();
}
+/* open/update the value list */
+function autocomplete(event) {
+ /* if pressing enter, fire a click on the selected line */
+ if (event.keyCode == 13) {
+ if (jQuery.ppa.i > 0) {
+ jQuery.ppa.fklist.find('tr').eq(jQuery.ppa.i).click();
+ }
+ return false;
+ } else if (event.keyCode == 38 || event.keyCode == 40) {
+ /* ignoring 38:up and 40:down */
+ return false;
+ } else if (
+ /* ignoring 9:tab, 37:left, 39:right, 16:shift, ctrl: 17, alt:18, 20:lockmaj */
+ event.keyCode == 9 ||
+ event.keyCode == 37 ||
+ event.keyCode == 39 ||
+ event.keyCode == 16 ||
+ event.keyCode == 17 ||
+ event.keyCode == 18 ||
+ event.keyCode == 20
+ ) {
+ return true;
+ } else if (event.keyCode == 27) {
+ /* esc */
+ hideAc();
+ } else {
+ /* request the list of possible values asynchronously */
+ /* if we refresh because of a value update,
+ * we reset back to offset 0 so we catch values
+ * if list is smaller than 11 values */
+ if (event.type == 'keyup') {
+ jQuery.ppa.o = 0;
+ }
+ openlist(this);
+ }
+ return true;
+}
/* enable/disable auto-complete feature */
function triggerAc(ac) {
if (ac) {
@@ -26,17 +65,20 @@ function triggerAc(ac) {
/* select the given index value and highlight it */
function selectVal(index) {
- if (index == jQuery.ppa.i) return;
+ if (index == jQuery.ppa.i) {
+ return;
+ }
// we catch the header as well so it takes th index 0
var trs = jQuery.ppa.fklist.find('tr');
// change colors for unselected
- if (jQuery.ppa.i > 0)
+ if (jQuery.ppa.i > 0) {
trs.eq(jQuery.ppa.i).find('*').css({
'background-color': '#fff',
color: '',
});
+ }
// change colors for newly selected
trs.eq(index).find('*').css({
@@ -56,7 +98,7 @@ function openlist(e) {
var constr = constrs['constr_' + conid];
// get the changed attribute position in the arrays
- for (i = 0; constr.pattnums[i] != attnum; i++);
+ for (i = 0; constr.pattnums[i] != attnum; i++) {}
var datas = {
fattpos: i,
@@ -80,13 +122,13 @@ function openlist(e) {
success: function (ret) {
jQuery.ppa.i = 0;
jQuery.ppa.fkbg.show();
- with (jQuery.ppa.fklist) {
- html(ret);
- appendTo('#row_att_' + attnum);
- css('width', elt.css('width'));
- show();
- jQuery.ppa.numrow = find('tr').length;
- }
+
+ jQuery.ppa.fklist
+ .html(ret)
+ .appendTo('#row_att_' + attnum)
+ .css('width', elt.css('width'))
+ .show();
+ jQuery.ppa.numrow = jQuery.ppa.fklist.find('tr').length;
},
});
}
@@ -120,20 +162,6 @@ function move(event) {
}
}
-/* open/update the value list */
-function autocomplete(event) {
- /* if pressing enter, fire a click on the selected line */
- if (event.keyCode == 13) {
- if (jQuery.ppa.i > 0) {
- jQuery.ppa.fklist.find('tr').eq(jQuery.ppa.i).click();
- }
- return false;
- } else if (event.keyCode == 38 || event.keyCode == 40) {
- /* ignoring 38:up and 40:down */
- return false;
- } else if (
- /* ignoring 9:tab, 37:left, 39:right, 16:shift, ctrl: 17, alt:18, 20:lockmaj */
- event.keyCode == 9 ||
event.keyCode == 37 ||
event.keyCode == 39 ||
event.keyCode == 16 ||
@@ -141,22 +169,6 @@ function autocomplete(event) {
event.keyCode == 18 ||
event.keyCode == 20
) {
- return true;
- } else if (event.keyCode == 27) {
- /* esc */
- hideAc();
- } else {
- /* request the list of possible values asynchronously */
- /* if we refresh because of a value update,
- * we reset back to offset 0 so we catch values
- * if list is smaller than 11 values */
- if (event.type == 'keyup') jQuery.ppa.o = 0;
- openlist(this);
- }
-
- return true;
-}
-
/* bind actions on values lines: hover for style change, click for select */
jQuery('tr.acline').on('mouseover', function () {
@@ -205,8 +217,9 @@ jQuery(document).ready(function () {
/* do not submit the form when selecting a value by pressing enter */
jQuery.ppa.attrs.keydown(function (e) {
- if (e.keyCode == 13 && jQuery.ppa.fklist[0].style.display == 'block')
+ if (e.keyCode == 13 && jQuery.ppa.fklist[0].style.display == 'block') {
return false;
+ }
});
/* enable/disable auto-complete according to the checkbox */
diff --git a/assets/js/display.js b/assets/js/display.js
index a820c72b..cf1a23dd 100644
--- a/assets/js/display.js
+++ b/assets/js/display.js
@@ -1,45 +1,47 @@
-$(document).ready(function () {
+$(function () {
/* init some needed tags and values */
$('table#data').wrap('<div id="fkcontainer" class="fk" />');
$('#fkcontainer').append('<div id="root" />');
- jQuery.ppa = {
+ jQuery.ppa = jQuery.ppa || {
root: $('#root'),
};
$('a.fk').on('click', function (event) {
/* make the cursor being a waiting cursor */
$('body').css('cursor', 'wait');
-
- query = $.ajax({
+ let $this = $(this);
+ $.ajax({
type: 'GET',
dataType: 'html',
data: {
action: 'dobrowsefk',
},
- url: $(this).attr('href'),
+ url: String($(this).attr('href')),
cache: false,
context: $(this),
contentType: 'application/x-www-form-urlencoded',
- success: function (answer) {
- pdiv = this.closest('div.fk');
- divclass = this.attr('class').split(' ')[1];
+ })
+ .done((answer) => {
+ let pdiv = $this.closest('div.fk'),
+ divclass = $this.attr('class').split(' ')[1];
/* if we are clicking on a FK from the original table
(level 0), we are using the #root div as parent-div */
if (pdiv[0].id == 'fkcontainer') {
/* computing top position, which is the topid as well */
- var top = this.position().top + 2 + this.height();
+ var top = $this.position().top + 2 + $this.height();
/* if the requested top position is different than
the previous topid position of #root, empty and position it */
- if (top != jQuery.ppa.root.topid)
- /* this "topid" allows to track if we are
+ if (top != jQuery.ppa.root.topid) {
+ /* this "topid" allows to track if we are
opening a FK from the same line in the original table */
jQuery.ppa.root.empty().css({
left: pdiv.position().left + 'px',
top: top + 'px',
}).topid = top;
+ }
pdiv = jQuery.ppa.root;
@@ -51,13 +53,14 @@ $(document).ready(function () {
}
/* creating the data div */
- newdiv = $('<div class="fk ' + divclass + '">').html(answer);
+ let newdiv = $('<div class="fk ' + divclass + '">').html(answer);
/* highlight referencing fields */
newdiv
- .data('ref', this)
- .data('refclass', $(this).attr('class').split(' ')[1])
- .mouseenter(function (event) {
+ .data('ref', $this)
+ .data('refclass', $(this).attr('class').split(' ')[1]);
+ newdiv
+ .on('mouseenter', function (event) {
$(this)
.data('ref')
.closest('tr')
@@ -65,7 +68,7 @@ $(document).ready(function () {
.closest('div')
.addClass('highlight');
})
- .mouseleave(function (event) {
+ .on('mouseleave', function (event) {
$(this)
.data('ref')
.closest('tr')
@@ -79,27 +82,24 @@ $(document).ready(function () {
newdiv.on('click', '.fk_delete', function (event) {
console.log('clicked .fk_delete', jQuery(this));
- with ($(this).closest('div')) {
- data('ref')
- .closest('tr')
- .find('a.' + data('refclass'))
- .closest('div')
- .removeClass('highlight');
- remove();
- }
+ let closestDiv = $(this).closest('div');
+ closestDiv
+ .data('ref')
+ .closest('tr')
+ .find('a.' + closestDiv.data('refclass'))
+ .closest('div')
+ .removeClass('highlight');
+ closestDiv.remove();
});
- },
-
- error: function () {
- this.closest('div.fk').append(
- '<p class="errmsg">' + Display.errmsg + '</p>'
- );
- },
-
- complete: function () {
+ })
+ .fail((err) => {
+ $this
+ .closest('div.fk')
+ .append('<p class="errmsg">' + Display.errmsg + '</p>');
+ })
+ .always(() => {
$('body').css('cursor', 'auto');
- },
- });
+ });
return false; // do not refresh the page
});
diff --git a/assets/js/footer_scripts.js b/assets/js/footer_scripts.js
index cf1e5a03..ee9aa69f 100644
--- a/assets/js/footer_scripts.js
+++ b/assets/js/footer_scripts.js
@@ -1,3 +1,6 @@
+function historyApiBack() {
+ window.history && window.history.back();
+}
function redirectToIframesView() {
if (
window.inPopUp ||
@@ -26,11 +29,13 @@ function addBehaviorToTopLinks(amIDetailFrame) {
amIDetailFrame && window.parent.document.querySelector('#detail'),
toplink_logout =
amIDetailFrame &&
- parentHandle.contentDocument.querySelector('#toplink_logout');
+ (parentHandle.contentDocument || document).querySelector(
+ '#toplink_logout'
+ );
parentHandle &&
[
- ...parentHandle.contentDocument.querySelectorAll(
+ ...(parentHandle.contentDocument || document).querySelectorAll(
'.toplink a.toplink_popup'
),
].forEach((element) => {
@@ -67,6 +72,13 @@ if (
) {
redirectToIframesView();
}
+let {
+ frames: { browser },
+} = window.parent;
+if (browser && browser.jsTree && stateObj.reload) {
+ browser.jsTree.jstree('refresh');
+}
+
$.ready
.then(() => {
let amIDetailFrame = document.body.classList.contains('detailbody');
diff --git a/assets/js/footer_sqledit.js b/assets/js/footer_sqledit.js
index 93a48ac1..15a7f33d 100644
--- a/assets/js/footer_sqledit.js
+++ b/assets/js/footer_sqledit.js
@@ -1,4 +1,4 @@
-$(document).ready(function () {
+$(function () {
if (window.inPopUp) {
jQuery('table.tabs').prependTo('body');
jQuery('table.printconnection').prependTo('.sqlform');
diff --git a/assets/js/functions.js b/assets/js/functions.js
index 9635d1cb..3ee87ba1 100644
--- a/assets/js/functions.js
+++ b/assets/js/functions.js
@@ -1,5 +1,5 @@
-var g_args = 0;
-var g_no_args = new Boolean(false);
+let g_args = 0,
+ g_no_args = false;
/*
function for adding arguments
*/
diff --git a/assets/js/insert_or_edit_row.js b/assets/js/insert_or_edit_row.js
index 009df1d3..507a0525 100644
--- a/assets/js/insert_or_edit_row.js
+++ b/assets/js/insert_or_edit_row.js
@@ -1,4 +1,4 @@
-$(document).ready(function () {
+$(function () {
jQuery('.insert_row_input').on('change blur', function () {
var tr = $(this).closest('tr'),
checkbox = tr.find('.nullcheckbox');
@@ -7,10 +7,12 @@ $(document).ready(function () {
checkbox.prop('checked', false);
}
});
-
+ jQuery('.btn_back').on('click', () => {
+ window.history && window.history.back();
+ });
jQuery('input[type=submit]').on('mouseover', function () {
jQuery('.insert_row_input').each(function () {
- var tr = $(this).closest('tr'),
+ const tr = $(this).closest('tr'),
checkbox = tr.find('.nullcheckbox');
if ($(this).val() !== '') {
diff --git a/assets/js/multiactionform.js b/assets/js/multiactionform.js
index bda559ac..1cbe8c82 100644
--- a/assets/js/multiactionform.js
+++ b/assets/js/multiactionform.js
@@ -4,7 +4,7 @@ function checkAll(bool) {
.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
- if (inputs[i].type == 'checkbox') {
+ if (inputs[i].type === 'checkbox') {
inputs[i].checked = bool;
}
}
diff --git a/assets/sw.dev.js b/assets/sw.dev.js
index 611216ed..afd1b2f3 100644
--- a/assets/sw.dev.js
+++ b/assets/sw.dev.js
@@ -1,73 +1,78 @@
self.addEventListener('install', function (/*event*/) {
- // The promise that skipWaiting() returns can be safely ignored.
- self.skipWaiting();
-
- // Perform any other actions required for your
- // service worker to install, potentially inside
- // of event.waitUntil();
- });
- self.addEventListener('activate', (event) => {
- event.waitUntil(clients.claim());
- });
- if (typeof workbox === 'undefined') {
- importScripts(
- 'https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js'
- );
- workbox.loadModule('workbox-strategies');
- workbox.loadModule('workbox-cacheable-response');
- workbox.loadModule('workbox-expiration');
- }
- self.__precacheManifest = [].concat(self.__precacheManifest || []);
- if (typeof workbox !== 'undefined' && workbox) {
-
+ // The promise that skipWaiting() returns can be safely ignored.
+ self.skipWaiting();
+
+ // Perform any other actions required for your
+ // service worker to install, potentially inside
+ // of event.waitUntil();
+});
+self.addEventListener('activate', (event) => {
+ event.waitUntil(clients.claim());
+});
+if (typeof workbox === 'undefined') {
+ importScripts(
+ 'https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js'
+ );
+ workbox.loadModule('workbox-strategies');
+ workbox.loadModule('workbox-cacheable-response');
+ workbox.loadModule('workbox-expiration');
+}
+self.__precacheManifest = [].concat(self.__precacheManifest || []);
+if (typeof workbox !== 'undefined' && workbox) {
workbox.core.skipWaiting();
-
+
workbox.core.clientsClaim();
-
- workbox.precaching.precacheAndRoute(self.__WB_MANIFEST);
-
- console.log(`Yay! Workbox is loaded 🎉`);
-
- workbox.routing.registerRoute(
- /\/assets\/css/,
- new workbox.strategies.CacheFirst({
- cacheName: "vendor-local-css",
- plugins: [ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] })],
- })
- );
- workbox.routing.registerRoute(
- /\/assets\/js/,
- new workbox.strategies.CacheFirst({
- cacheName: "vendor-local-js",
- plugins: [ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] })],
- })
- );
- workbox.routing.registerRoute(
- /\/img/,
- new workbox.strategies.CacheFirst({
- cacheName: "image-files",
- plugins: [ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] })],
-
- })
- );
-
- // Cache the Google Fonts stylesheets with a stale-while-revalidate strategy.
- workbox.routing.registerRoute(
- /^https:\/\/fonts\.googleapis\.com/,
- new workbox.strategies.StaleWhileRevalidate({
- cacheName: "google-fonts-stylesheets"
- })
- );
-
- // Cache the underlying font files with a cache-first strategy for 1 year.
- workbox.routing.registerRoute(
- /^https:\/\/fonts\.gstatic\.com/,
- new workbox.strategies.CacheFirst({
- cacheName: "google-fonts-webfonts",
- plugins: [ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] })],
- })
- );
- } else {
- console.log(`Boo! Workbox didn't load 😬`);
- }
- \ No newline at end of file
+
+ workbox.precaching.precacheAndRoute([]);
+
+ console.log(`Yay! Workbox is loaded 🎉`);
+
+ workbox.routing.registerRoute(
+ /\/assets\/css/,
+ new workbox.strategies.CacheFirst({
+ cacheName: 'vendor-local-css',
+ plugins: [
+ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] }),
+ ],
+ })
+ );
+ workbox.routing.registerRoute(
+ /\/assets\/js/,
+ new workbox.strategies.CacheFirst({
+ cacheName: 'vendor-local-js',
+ plugins: [
+ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] }),
+ ],
+ })
+ );
+ workbox.routing.registerRoute(
+ /\/img/,
+ new workbox.strategies.CacheFirst({
+ cacheName: 'image-files',
+ plugins: [
+ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] }),
+ ],
+ })
+ );
+
+ // Cache the Google Fonts stylesheets with a stale-while-revalidate strategy.
+ workbox.routing.registerRoute(
+ /^https:\/\/fonts\.googleapis\.com/,
+ new workbox.strategies.StaleWhileRevalidate({
+ cacheName: 'google-fonts-stylesheets',
+ })
+ );
+
+ // Cache the underlying font files with a cache-first strategy for 1 year.
+ workbox.routing.registerRoute(
+ /^https:\/\/fonts\.gstatic\.com/,
+ new workbox.strategies.CacheFirst({
+ cacheName: 'google-fonts-webfonts',
+ plugins: [
+ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] }),
+ ],
+ })
+ );
+} else {
+ console.log(`Boo! Workbox didn't load 😬`);
+}
diff --git a/assets/sw.js b/assets/sw.js
new file mode 100644
index 00000000..cdd4e9b5
--- /dev/null
+++ b/assets/sw.js
@@ -0,0 +1,1340 @@
+self.addEventListener('install', function (/*event*/) {
+ // The promise that skipWaiting() returns can be safely ignored.
+ self.skipWaiting();
+
+ // Perform any other actions required for your
+ // service worker to install, potentially inside
+ // of event.waitUntil();
+});
+self.addEventListener('activate', (event) => {
+ event.waitUntil(clients.claim());
+});
+if (typeof workbox === 'undefined') {
+ importScripts(
+ 'https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js'
+ );
+ workbox.loadModule('workbox-strategies');
+ workbox.loadModule('workbox-cacheable-response');
+ workbox.loadModule('workbox-expiration');
+}
+self.__precacheManifest = [].concat(self.__precacheManifest || []);
+if (typeof workbox !== 'undefined' && workbox) {
+
+ workbox.core.skipWaiting();
+
+ workbox.core.clientsClaim();
+
+ workbox.precaching.precacheAndRoute([
+ {
+ "url": "images/themes/bootstrap/Favicon.ico",
+ "revision": "7f7f3b73b863ab0db2800b0cc9d87f22"
+ },
+ {
+ "url": "images/themes/bootstrap/Introduction.png",
+ "revision": "8dbc90cfbfd4d9a2f5a3e7c5924771ee"
+ },
+ {
+ "url": "images/themes/bootstrap/logo.png",
+ "revision": "6987da08785938281c0cef64a08e3263"
+ },
+ {
+ "url": "images/themes/bootstrap/title.png",
+ "revision": "6987da08785938281c0cef64a08e3263"
+ },
+ {
+ "url": "images/themes/cappuccino/inputbckg.png",
+ "revision": "0836efcda7efd8f7143e6bc944fb2ae1"
+ },
+ {
+ "url": "images/themes/cappuccino/Lminus.png",
+ "revision": "4c6ad5374b9518299739fb8f6c0f0dcf"
+ },
+ {
+ "url": "images/themes/cappuccino/Lplus.png",
+ "revision": "0e918eec776f591e565f252bbb3935d1"
+ },
+ {
+ "url": "images/themes/cappuccino/openListe.png",
+ "revision": "35fec4ef79e5c77f884c28db9d646ff8"
+ },
+ {
+ "url": "images/themes/cappuccino/title.png",
+ "revision": "256583a0062c189786a788f550e4833e"
+ },
+ {
+ "url": "images/themes/cappuccino/Tminus.png",
+ "revision": "fd64d87ca98273a08a689508c15e21d0"
+ },
+ {
+ "url": "images/themes/cappuccino/Tplus.png",
+ "revision": "6be509ad6d0bdf6f5f4bb0112a28a9c4"
+ },
+ {
+ "url": "images/themes/default/AddArguments.png",
+ "revision": "5783c8524fa7f4daff4f1ef7bcb4bfb9"
+ },
+ {
+ "url": "images/themes/default/Admin.png",
+ "revision": "a82687f9d571988c5a50cd1c4c85e245"
+ },
+ {
+ "url": "images/themes/default/Aggregate.png",
+ "revision": "ff0166451279bef06132ca55d2b13bb3"
+ },
+ {
+ "url": "images/themes/default/Aggregates.png",
+ "revision": "480dca5e5fa1bef15990e13f7299ac9a"
+ },
+ {
+ "url": "images/themes/default/AllUsers.png",
+ "revision": "c8e3e86ffd0a4d7370e08388352fcc53"
+ },
+ {
+ "url": "images/themes/default/AvailableReplicationSet.png",
+ "revision": "ce257e663eb495ba4d90fc55feb361ff"
+ },
+ {
+ "url": "images/themes/default/AvailableSubscription.png",
+ "revision": "5ec68e4a7bd37d101bdd202890bfb606"
+ },
+ {
+ "url": "images/themes/default/Backup.png",
+ "revision": "362dd1ab7684968a9051fb2ffd145a06"
+ },
+ {
+ "url": "images/themes/default/blank.png",
+ "revision": "ff372eacef6cd22aa9a962b1fab6b927"
+ },
+ {
+ "url": "images/themes/default/Cast.png",
+ "revision": "2b52864370d5111e7a68d3347f0047f4"
+ },
+ {
+ "url": "images/themes/default/Casts.png",
+ "revision": "5597d48b8d4b6d0e30762500ced49539"
+ },
+ {
+ "url": "images/themes/default/CheckConstraint.png",
+ "revision": "12878c160ad2030c33fbe74b9ef4980c"
+ },
+ {
+ "url": "images/themes/default/Cluster.png",
+ "revision": "8ffa29a8aadf2e8a78a58f246ecb8f3a"
+ },
+ {
+ "url": "images/themes/default/Column.png",
+ "revision": "e9a7cd147304fa43da5121aca3aa96bd"
+ },
+ {
+ "url": "images/themes/default/Columns.png",
+ "revision": "135c695556735ca7bfbec339300d475a"
+ },
+ {
+ "url": "images/themes/default/Constraints.png",
+ "revision": "a08d098a40f117173b627f279d3e5c84"
+ },
+ {
+ "url": "images/themes/default/Conversion.png",
+ "revision": "0f5b34e3477bc7dec9d214c75624618e"
+ },
+ {
+ "url": "images/themes/default/Conversions.png",
+ "revision": "34b35cebcc208e56a590de389650c31c"
+ },
+ {
+ "url": "images/themes/default/Copy.png",
+ "revision": "c8f58a82f94ad33c92c4434195211986"
+ },
+ {
+ "url": "images/themes/default/CorruptedDatabase.png",
+ "revision": "37d5edb86c49b49e04dc1f31ea61d944"
+ },
+ {
+ "url": "images/themes/default/Cut.png",
+ "revision": "13cb3db5b00eb488ea488c11f7ef6c7b"
+ },
+ {
+ "url": "images/themes/default/Database.png",
+ "revision": "f5db4650c1155434dd3395449145e185"
+ },
+ {
+ "url": "images/themes/default/Databases.png",
+ "revision": "f78fd91345a5f9e6135740c39f94c281"
+ },
+ {
+ "url": "images/themes/default/Definition.png",
+ "revision": "01e09c5e6a4dff39c69c69c30e3c2df0"
+ },
+ {
+ "url": "images/themes/default/Delete.png",
+ "revision": "909467ce82f287d29b32a3bde5001a98"
+ },
+ {
+ "url": "images/themes/default/DisabledJob.png",
+ "revision": "0c7afdc74e664afc728350efdc4f8e54"
+ },
+ {
+ "url": "images/themes/default/DisconnectedDatabase.png",
+ "revision": "871a020d4cce6841704c1e6465b5ac11"
+ },
+ {
+ "url": "images/themes/default/DisconnectedServer.png",
+ "revision": "0b2aecfe0a2fefbaa9d153e06a12ce4a"
+ },
+ {
+ "url": "images/themes/default/Domain.png",
+ "revision": "0573dfc5e4d10eb7d2708dc9be361e1d"
+ },
+ {
+ "url": "images/themes/default/Domains.png",
+ "revision": "5bc7b098fd0c94841c7bb39a8d32c3dd"
+ },
+ {
+ "url": "images/themes/default/EnableArgument.png",
+ "revision": "075f3f50ae58bea29ea9853ec69f8822"
+ },
+ {
+ "url": "images/themes/default/Erase.png",
+ "revision": "cd1bcdc76c1ac1c8d228b3748ed4b469"
+ },
+ {
+ "url": "images/themes/default/Execute.png",
+ "revision": "21388b26da2079d313b9df99324550ac"
+ },
+ {
+ "url": "images/themes/default/ExecuteSave.png",
+ "revision": "0e75ce0c09fce81f44bb6f71faf15fd8"
+ },
+ {
+ "url": "images/themes/default/Explain.png",
+ "revision": "e0e9aa509cbdd8ef731b35fa9a39aa84"
+ },
+ {
+ "url": "images/themes/default/Export.png",
+ "revision": "20d4e370edd5f9da50f168bedc708fe2"
+ },
+ {
+ "url": "images/themes/default/Favicon.ico",
+ "revision": "7f7f3b73b863ab0db2800b0cc9d87f22"
+ },
+ {
+ "url": "images/themes/default/Filter.png",
+ "revision": "6fa649f2cffe185328b703b4a5f69475"
+ },
+ {
+ "url": "images/themes/default/ForeignKey.png",
+ "revision": "928e06e119cc3a048912672d40d06abc"
+ },
+ {
+ "url": "images/themes/default/Fts.png",
+ "revision": "c13ce81b5e4a3187ce37a55a387cbd8e"
+ },
+ {
+ "url": "images/themes/default/FtsCfg.png",
+ "revision": "78a5c183c4ec2f68fa2c124f11df71ad"
+ },
+ {
+ "url": "images/themes/default/FtsDict.png",
+ "revision": "72795d6e7ba1eaa63f4353d075eb551c"
+ },
+ {
+ "url": "images/themes/default/FtsParser.png",
+ "revision": "512bc774fedde4b56563c935ea5b6a2d"
+ },
+ {
+ "url": "images/themes/default/Function.png",
+ "revision": "d1db8bbd46db17458812fd60ae458b4e"
+ },
+ {
+ "url": "images/themes/default/Functions.png",
+ "revision": "6c19e68bf4aff2345c62355ae814cd07"
+ },
+ {
+ "url": "images/themes/default/GurusHint.png",
+ "revision": "aee27759d60d8b19aea299c1af78c902"
+ },
+ {
+ "url": "images/themes/default/Help.png",
+ "revision": "e599e96f305c61cb374326d49834c990"
+ },
+ {
+ "url": "images/themes/default/Histories.png",
+ "revision": "dc9c5432bcca789f6e8adcac5fbecb4a"
+ },
+ {
+ "url": "images/themes/default/History.png",
+ "revision": "bb6651298f7feca614348a277417b679"
+ },
+ {
+ "url": "images/themes/default/I.png",
+ "revision": "7fef7f3891268fbd886d3776d4bb18d2"
+ },
+ {
+ "url": "images/themes/default/Import.png",
+ "revision": "591ac6f7a26a67ae9485c9ea5f53bfbe"
+ },
+ {
+ "url": "images/themes/default/Index.png",
+ "revision": "50d5f45d81511368d878756d6c26f47d"
+ },
+ {
+ "url": "images/themes/default/Indexes.png",
+ "revision": "68100f02b944c3e5814ad9ad679c0169"
+ },
+ {
+ "url": "images/themes/default/Introduction.png",
+ "revision": "8dbc90cfbfd4d9a2f5a3e7c5924771ee"
+ },
+ {
+ "url": "images/themes/default/Job.png",
+ "revision": "0b6670ea8590f013806ad04e139a4d9e"
+ },
+ {
+ "url": "images/themes/default/Jobs.png",
+ "revision": "7c5f31d0ac216e9f90c661e98dba2856"
+ },
+ {
+ "url": "images/themes/default/Key.png",
+ "revision": "932e67636e6acbb814a2dded608bb652"
+ },
+ {
+ "url": "images/themes/default/L.png",
+ "revision": "e151369d672d2e2cc6f647be2f736e8f"
+ },
+ {
+ "url": "images/themes/default/Language.png",
+ "revision": "20938113d067cff7a6ff773f75e07491"
+ },
+ {
+ "url": "images/themes/default/Languages.png",
+ "revision": "ac48fd0fdc93ad3f1928cccb9c9e028e"
+ },
+ {
+ "url": "images/themes/default/Listen.png",
+ "revision": "788ee2492ef829b80cfba68d56f14430"
+ },
+ {
+ "url": "images/themes/default/Listens.png",
+ "revision": "c529a6fda4b2e2a375f7e5f51e577120"
+ },
+ {
+ "url": "images/themes/default/Lminus.png",
+ "revision": "d25bce2a91933a53b40ec210c7323372"
+ },
+ {
+ "url": "images/themes/default/Loading.gif",
+ "revision": "af1d523a137ef9b2005411770f454b2e"
+ },
+ {
+ "url": "images/themes/default/LowerArgument.png",
+ "revision": "1f099fbed522a3980847f07bcc4573ae"
+ },
+ {
+ "url": "images/themes/default/Lplus.png",
+ "revision": "b42f13fbc6d7701cd1bb7d827c3113ca"
+ },
+ {
+ "url": "images/themes/default/MViews.png",
+ "revision": "a6cdad27aed2812de33ff2d45e00385b"
+ },
+ {
+ "url": "images/themes/default/Node.png",
+ "revision": "1c8e6ef452ff7a9770047b469c85a05c"
+ },
+ {
+ "url": "images/themes/default/Nodes.png",
+ "revision": "e3f4f6d43a689035a2208662e933f5ea"
+ },
+ {
+ "url": "images/themes/default/ObjectNotFound.png",
+ "revision": "8534caffcf3d558648a0662245e2fc3d"
+ },
+ {
+ "url": "images/themes/default/OfferedReplicationSet.png",
+ "revision": "adc078de3c9e353b75640c2e180d20e6"
+ },
+ {
+ "url": "images/themes/default/OfferedSubscription.png",
+ "revision": "768fc20465c6354398625c4ed5c85cb4"
+ },
+ {
+ "url": "images/themes/default/Open.png",
+ "revision": "92bb01a30f897095adb2f98c0036b9e9"
+ },
+ {
+ "url": "images/themes/default/Operator.png",
+ "revision": "fb73b5a1f6499159043e5b20dc3285db"
+ },
+ {
+ "url": "images/themes/default/OperatorClass.png",
+ "revision": "a9b82cc57bf520190315ddbc833e64c7"
+ },
+ {
+ "url": "images/themes/default/OperatorClasses.png",
+ "revision": "b94fc3a6153d8fb2e261ec454d69a252"
+ },
+ {
+ "url": "images/themes/default/Operators.png",
+ "revision": "c5cb1662b9cbf877de8cb08d0c8bc4cb"
+ },
+ {
+ "url": "images/themes/default/Paste.png",
+ "revision": "db9d9333b530c266bab387ae076a5ada"
+ },
+ {
+ "url": "images/themes/default/Path.png",
+ "revision": "f888ffe2c6ab9c59d45ee07ae6199f4a"
+ },
+ {
+ "url": "images/themes/default/Paths.png",
+ "revision": "737c12988806ad60b5a5aec244920709"
+ },
+ {
+ "url": "images/themes/default/PrimaryKey.png",
+ "revision": "d0744174f9db9929b5be155c9f603e01"
+ },
+ {
+ "url": "images/themes/default/Privileges.png",
+ "revision": "1f27241c0f520a279d3665028024b45e"
+ },
+ {
+ "url": "images/themes/default/Processes.png",
+ "revision": "bf5538bb0bd23ed8c209997766dac284"
+ },
+ {
+ "url": "images/themes/default/Property.png",
+ "revision": "9bfdb2725bc9facafe90474d2c364c8f"
+ },
+ {
+ "url": "images/themes/default/RaiseArgument.png",
+ "revision": "e7f18a3dea3acd7e3333cd8f95e3fcce"
+ },
+ {
+ "url": "images/themes/default/Record.png",
+ "revision": "acd2ad85dbbd2bf5b71c0062b167b139"
+ },
+ {
+ "url": "images/themes/default/Records.png",
+ "revision": "878ff904362c9b59e2d6f6ac93ecc4b8"
+ },
+ {
+ "url": "images/themes/default/Redo.png",
+ "revision": "a169b03df76e87e44c45757f6a168e61"
+ },
+ {
+ "url": "images/themes/default/Refresh.png",
+ "revision": "cf51d096cc572377189c2bc884936b78"
+ },
+ {
+ "url": "images/themes/default/RemoveArgument.png",
+ "revision": "8d804ee75dfd7b8f3ac98b218a847d54"
+ },
+ {
+ "url": "images/themes/default/Replication.png",
+ "revision": "cdd35ed8aa98e9b0d356effb0d74548b"
+ },
+ {
+ "url": "images/themes/default/ReplicationSets.png",
+ "revision": "7d5e0bff7082704171013afd322821d4"
+ },
+ {
+ "url": "images/themes/default/Restore.png",
+ "revision": "94b8007abc4354fd4cdbdbcd6087bea7"
+ },
+ {
+ "url": "images/themes/default/Roles.png",
+ "revision": "f1c25bb9e2a4eb52d9c6ea52545ede2d"
+ },
+ {
+ "url": "images/themes/default/Rule.png",
+ "revision": "565c4b37066f23c5a08d428f2592ee7b"
+ },
+ {
+ "url": "images/themes/default/Rules.png",
+ "revision": "18fed3c727afc31e40941828697047ad"
+ },
+ {
+ "url": "images/themes/default/Save.png",
+ "revision": "b5a94436bc66832e0498de05bd72b23e"
+ },
+ {
+ "url": "images/themes/default/Schedule.png",
+ "revision": "e2af41bef5d952cb6887723bc3e5921c"
+ },
+ {
+ "url": "images/themes/default/Schedules.png",
+ "revision": "2b7a924ed6a9074d4102a547772750bc"
+ },
+ {
+ "url": "images/themes/default/Schema.png",
+ "revision": "18b2e143c60c9ef3813032bb45310e67"
+ },
+ {
+ "url": "images/themes/default/Schemas.png",
+ "revision": "b9fe50541e03c0b6e503b4ac1e65ddf1"
+ },
+ {
+ "url": "images/themes/default/Search.png",
+ "revision": "9cf1fe46d6b8fd3ba257d46a3d05965d"
+ },
+ {
+ "url": "images/themes/default/Sequence.png",
+ "revision": "4bfa8c4668036788458732d85630f931"
+ },
+ {
+ "url": "images/themes/default/Sequences.png",
+ "revision": "c4bb32230118c69cf6bab8617ef62b16"
+ },
+ {
+ "url": "images/themes/default/Server.png",
+ "revision": "bf4a2c360541176e03505124830cddac"
+ },
+ {
+ "url": "images/themes/default/Servers.png",
+ "revision": "07681bcc17ebc43645d6c1796f5df219"
+ },
+ {
+ "url": "images/themes/default/SqlEditor.png",
+ "revision": "df73ed3b7b0a31d266d97f97d5ac5c5a"
+ },
+ {
+ "url": "images/themes/default/Statistics.png",
+ "revision": "b6d59a3d2b8ad767c54305bc91a8243a"
+ },
+ {
+ "url": "images/themes/default/Step.png",
+ "revision": "892be7a355b19ffdb0ce39483cd4b6c1"
+ },
+ {
+ "url": "images/themes/default/Steps.png",
+ "revision": "5f28c19fac73bc0e869caed580a28457"
+ },
+ {
+ "url": "images/themes/default/Stop.png",
+ "revision": "ef7050f86e5ace6f4c026057beca7b91"
+ },
+ {
+ "url": "images/themes/default/Subscriptions.png",
+ "revision": "065f6490b63a46edee2162a6a76a9131"
+ },
+ {
+ "url": "images/themes/default/T.png",
+ "revision": "fe196453a6e822e7ebbd23692b35fd5e"
+ },
+ {
+ "url": "images/themes/default/Table.png",
+ "revision": "edd7db39026ec7c3d78284a319198b8d"
+ },
+ {
+ "url": "images/themes/default/Tables.png",
+ "revision": "84533f1145926e2d71aafaa4ca1eb1ac"
+ },
+ {
+ "url": "images/themes/default/Tablespace.png",
+ "revision": "4014487f76df092d3f57b6a90a6c96a0"
+ },
+ {
+ "url": "images/themes/default/Tablespaces.png",
+ "revision": "7d2334e497eee6e5719b25dfa39cfe66"
+ },
+ {
+ "url": "images/themes/default/title_blue.png",
+ "revision": "6987da08785938281c0cef64a08e3263"
+ },
+ {
+ "url": "images/themes/default/title.png",
+ "revision": "27762f17ee6301aac5bb3521d34e142b"
+ },
+ {
+ "url": "images/themes/default/Tminus.png",
+ "revision": "eb42ed7ec1597a0a9976fb4198a7ee71"
+ },
+ {
+ "url": "images/themes/default/Tplus.png",
+ "revision": "fcfd867d96fa1908bd165c97f4099e74"
+ },
+ {
+ "url": "images/themes/default/Trigger.png",
+ "revision": "f827a98b8f30eefac6f9ab47d6ca1f16"
+ },
+ {
+ "url": "images/themes/default/TriggerFunction.png",
+ "revision": "9337acb5c8b57422cd0aab291aa706bb"
+ },
+ {
+ "url": "images/themes/default/TriggerFunctions.png",
+ "revision": "5dc7b60313a7a4f3598050afbddad7d2"
+ },
+ {
+ "url": "images/themes/default/Triggers.png",
+ "revision": "6644a0ddffc0487230295acd19de296c"
+ },
+ {
+ "url": "images/themes/default/Type.png",
+ "revision": "952a9dae51878f6869b24527bca77b49"
+ },
+ {
+ "url": "images/themes/default/Types.png",
+ "revision": "0f1e8651d2422952d224d1657442cc42"
+ },
+ {
+ "url": "images/themes/default/Undo.png",
+ "revision": "a60bb9589277159b06882458fc54e1a9"
+ },
+ {
+ "url": "images/themes/default/UniqueConstraint.png",
+ "revision": "96ce5e94257ba8115ffb5956e3ed3296"
+ },
+ {
+ "url": "images/themes/default/User.png",
+ "revision": "746e073e551917a29630184eace87c8e"
+ },
+ {
+ "url": "images/themes/default/UserGroup.png",
+ "revision": "735113096adc5e5a8299a6f6f09c721d"
+ },
+ {
+ "url": "images/themes/default/UserGroups.png",
+ "revision": "76c595fe16835a3bf582d0278828fc49"
+ },
+ {
+ "url": "images/themes/default/Users.png",
+ "revision": "6dda662436c3178b2a51c306edc1cc89"
+ },
+ {
+ "url": "images/themes/default/Variables.png",
+ "revision": "c5b6e5d13e4d159cf5893a0abb7cb9df"
+ },
+ {
+ "url": "images/themes/default/View.png",
+ "revision": "2479afdac6324e368251f9d436a86db0"
+ },
+ {
+ "url": "images/themes/default/Views.png",
+ "revision": "a8a50a05e97c59f0b6cbd8b123b0a4bd"
+ },
+ {
+ "url": "images/themes/instaGIS/logo.png",
+ "revision": "6987da08785938281c0cef64a08e3263"
+ },
+ {
+ "url": "sw.dev.js",
+ "revision": "5dea6508fde6f65581a3f467e457d123"
+ },
+ {
+ "url": "themes/bootstrap/global.css",
+ "revision": "97f9ebda1b8fb0e35ac35ffce8a5a960"
+ },
+ {
+ "url": "themes/bootstrap/title.png",
+ "revision": "6987da08785938281c0cef64a08e3263"
+ },
+ {
+ "url": "themes/cappuccino/global.css",
+ "revision": "faeff89daa358a9f481f42e32b77cfc3"
+ },
+ {
+ "url": "themes/default/global.css",
+ "revision": "c49fd9c93fd688a1445a17aa316b09bb"
+ },
+ {
+ "url": "themes/global.css",
+ "revision": "6cb6f33fdd8a22c780f6f968141c25a3"
+ },
+ {
+ "url": "themes/gotar/global.css",
+ "revision": "c5984fcad101f4b5507718d47780c026"
+ },
+ {
+ "url": "vendor/codemirror/addon/comment/comment.js",
+ "revision": "f2798285cd723a94866088997228accc"
+ },
+ {
+ "url": "vendor/codemirror/addon/comment/continuecomment.js",
+ "revision": "0374616c52803e22bace5dfabbc0e42f"
+ },
+ {
+ "url": "vendor/codemirror/addon/dialog/dialog.css",
+ "revision": "c89dce10b44d2882a024e7befc2b63f5"
+ },
+ {
+ "url": "vendor/codemirror/addon/dialog/dialog.js",
+ "revision": "904554fefae1a2beb0eaad467018af7a"
+ },
+ {
+ "url": "vendor/codemirror/addon/display/autorefresh.js",
+ "revision": "a8525e557b32a9ff330db311f444058b"
+ },
+ {
+ "url": "vendor/codemirror/addon/display/fullscreen.css",
+ "revision": "1a278e72b51528270f8ce9ec991929a1"
+ },
+ {
+ "url": "vendor/codemirror/addon/display/fullscreen.js",
+ "revision": "744a9a476b90075936f58ebb8b35ac85"
+ },
+ {
+ "url": "vendor/codemirror/addon/display/panel.js",
+ "revision": "45aa4eb1759d95e5169397df11a0cd79"
+ },
+ {
+ "url": "vendor/codemirror/addon/display/placeholder.js",
+ "revision": "0e8705231c3e7d910611e5cfcfc9145f"
+ },
+ {
+ "url": "vendor/codemirror/addon/display/rulers.js",
+ "revision": "38aaf61e611edfe39883f46f89b0b91b"
+ },
+ {
+ "url": "vendor/codemirror/addon/edit/closebrackets.js",
+ "revision": "7138da5915e3a819ea35126930b43402"
+ },
+ {
+ "url": "vendor/codemirror/addon/edit/closetag.js",
+ "revision": "eb8606363338598e8f3099392a7fa2ce"
+ },
+ {
+ "url": "vendor/codemirror/addon/edit/continuelist.js",
+ "revision": "cc1c2b9fd1184a4e8b845e4fb09707e1"
+ },
+ {
+ "url": "vendor/codemirror/addon/edit/matchbrackets.js",
+ "revision": "5a44e9d0ad6abe1afd67c48b70d1cbd2"
+ },
+ {
+ "url": "vendor/codemirror/addon/edit/matchtags.js",
+ "revision": "d0c67185e94d3a096299b680c0fca7d6"
+ },
+ {
+ "url": "vendor/codemirror/addon/edit/trailingspace.js",
+ "revision": "81d50700cee8c27e0e311de3650851bc"
+ },
+ {
+ "url": "vendor/codemirror/addon/fold/brace-fold.js",
+ "revision": "c4850e56d89da48a8625e13ed9a076db"
+ },
+ {
+ "url": "vendor/codemirror/addon/fold/comment-fold.js",
+ "revision": "9b289797886789d2ce7f40e3f7408c9e"
+ },
+ {
+ "url": "vendor/codemirror/addon/fold/foldcode.js",
+ "revision": "67922ad2e2c384c5455bfcacdec393d8"
+ },
+ {
+ "url": "vendor/codemirror/addon/fold/foldgutter.css",
+ "revision": "38bb68770b6f7ebaa7adea770a68e0b1"
+ },
+ {
+ "url": "vendor/codemirror/addon/fold/foldgutter.js",
+ "revision": "2e6a4ca9c0f057daaecbc330d8f96bc0"
+ },
+ {
+ "url": "vendor/codemirror/addon/fold/indent-fold.js",
+ "revision": "5017f49481f30946bd4229a6d05d5fcc"
+ },
+ {
+ "url": "vendor/codemirror/addon/fold/markdown-fold.js",
+ "revision": "6e3228db96bbadbb93c79922ecd88ce0"
+ },
+ {
+ "url": "vendor/codemirror/addon/fold/xml-fold.js",
+ "revision": "b88e73a8e7bdc8b032adfd5047dfe2c5"
+ },
+ {
+ "url": "vendor/codemirror/addon/hint/anyword-hint.js",
+ "revision": "736f4c0aa67db12cf39097f3d1790c8b"
+ },
+ {
+ "url": "vendor/codemirror/addon/hint/css-hint.js",
+ "revision": "4958c441a7cdf2d39fa6c8bd4b340168"
+ },
+ {
+ "url": "vendor/codemirror/addon/hint/html-hint.js",
+ "revision": "51364bfc06c261a20b9ced6606db9580"
+ },
+ {
+ "url": "vendor/codemirror/addon/hint/javascript-hint.js",
+ "revision": "fe11e9d0e373480aa61af6ae86c04dc1"
+ },
+ {
+ "url": "vendor/codemirror/addon/hint/show-hint.css",
+ "revision": "49647712414ff96d5846de9736b5dbd3"
+ },
+ {
+ "url": "vendor/codemirror/addon/hint/show-hint.js",
+ "revision": "2fa9552bd0d701cac634055d17bb130a"
+ },
+ {
+ "url": "vendor/codemirror/addon/hint/sql-hint.js",
+ "revision": "f66526ad34eaaeee2dca6282961808a8"
+ },
+ {
+ "url": "vendor/codemirror/addon/hint/xml-hint.js",
+ "revision": "65cf0f4e6ce510f4a189a0b87d943b8c"
+ },
+ {
+ "url": "vendor/codemirror/addon/lint/coffeescript-lint.js",
+ "revision": "140f1a44841627e860cafd955e89f4e7"
+ },
+ {
+ "url": "vendor/codemirror/addon/lint/css-lint.js",
+ "revision": "6a6166008cb94a6d62e05dc2cab7fc16"
+ },
+ {
+ "url": "vendor/codemirror/addon/lint/html-lint.js",
+ "revision": "4ce658b4b1c2cacb8a2685effa0ed4eb"
+ },
+ {
+ "url": "vendor/codemirror/addon/lint/javascript-lint.js",
+ "revision": "3db1c5d6629bde3e0a4a694c5cd94065"
+ },
+ {
+ "url": "vendor/codemirror/addon/lint/json-lint.js",
+ "revision": "dcfd194ca63e175996aaea2b3a58b598"
+ },
+ {
+ "url": "vendor/codemirror/addon/lint/lint.css",
+ "revision": "80cbf240f7114fb23e506da29cced118"
+ },
+ {
+ "url": "vendor/codemirror/addon/lint/lint.js",
+ "revision": "16098bd4d5e62f123cbc4482622e1360"
+ },
+ {
+ "url": "vendor/codemirror/addon/lint/yaml-lint.js",
+ "revision": "eabad9dfc99d98d6995c37fce194c28c"
+ },
+ {
+ "url": "vendor/codemirror/addon/merge/merge.css",
+ "revision": "d4009e57cbbb2c969147cf233671ba42"
+ },
+ {
+ "url": "vendor/codemirror/addon/merge/merge.js",
+ "revision": "001c710b643ececdbaf65328bb3419fc"
+ },
+ {
+ "url": "vendor/codemirror/addon/mode/loadmode.js",
+ "revision": "f8291cb1ca96e29af58def213012655a"
+ },
+ {
+ "url": "vendor/codemirror/addon/mode/multiplex_test.js",
+ "revision": "37963861dd6e41a530a6f84c2b17bdf7"
+ },
+ {
+ "url": "vendor/codemirror/addon/mode/multiplex.js",
+ "revision": "b132b004f352bf044cd80a9f55731147"
+ },
+ {
+ "url": "vendor/codemirror/addon/mode/overlay.js",
+ "revision": "4f8e4dcaeb7c237cbe4f1f69972cdc8a"
+ },
+ {
+ "url": "vendor/codemirror/addon/mode/simple.js",
+ "revision": "eed15e8b955aaee880af0c819b38fa25"
+ },
+ {
+ "url": "vendor/codemirror/addon/runmode/colorize.js",
+ "revision": "c8fb49ed714798e04bc3d0289b19efa4"
+ },
+ {
+ "url": "vendor/codemirror/addon/runmode/runmode-standalone.js",
+ "revision": "aa4a42bca69b6f096a18cd51203afe6e"
+ },
+ {
+ "url": "vendor/codemirror/addon/runmode/runmode.js",
+ "revision": "2c0ddde09a9f1f8f5dc9d4f67f03d2f2"
+ },
+ {
+ "url": "vendor/codemirror/addon/runmode/runmode.node.js",
+ "revision": "f3c8c9b85bbeecf3c873e52d3783f39b"
+ },
+ {
+ "url": "vendor/codemirror/addon/scroll/annotatescrollbar.js",
+ "revision": "87198e00de438bb7f9afe2e55b6cb4a3"
+ },
+ {
+ "url": "vendor/codemirror/addon/scroll/scrollpastend.js",
+ "revision": "92a24e9251be0dc620c11cb61919293f"
+ },
+ {
+ "url": "vendor/codemirror/addon/scroll/simplescrollbars.css",
+ "revision": "0352ba51fd6a422fe6cc44925e33ad88"
+ },
+ {
+ "url": "vendor/codemirror/addon/scroll/simplescrollbars.js",
+ "revision": "13948e6ef35e3c3d2c65de096af58721"
+ },
+ {
+ "url": "vendor/codemirror/addon/search/jump-to-line.js",
+ "revision": "cf5f2c65e9c8e26841923b5e1a6bf611"
+ },
+ {
+ "url": "vendor/codemirror/addon/search/match-highlighter.js",
+ "revision": "ace658d3aaf9d8ae9895ff97dd9eb5ca"
+ },
+ {
+ "url": "vendor/codemirror/addon/search/matchesonscrollbar.css",
+ "revision": "00ea2770c568a848190bcf52e4241276"
+ },
+ {
+ "url": "vendor/codemirror/addon/search/matchesonscrollbar.js",
+ "revision": "b7dfa5fd6a57e306bf7ce99542819883"
+ },
+ {
+ "url": "vendor/codemirror/addon/search/search.js",
+ "revision": "1e2c6bec0a25d4e7dea128f048b08931"
+ },
+ {
+ "url": "vendor/codemirror/addon/search/searchcursor.js",
+ "revision": "fa73eef9cf913ee2d766c8501a582a0c"
+ },
+ {
+ "url": "vendor/codemirror/addon/selection/active-line.js",
+ "revision": "30fc5d6c1847dc207bd0e38c0e97e789"
+ },
+ {
+ "url": "vendor/codemirror/addon/selection/mark-selection.js",
+ "revision": "c0240b66ae29bda93e80be5e60c9ed8d"
+ },
+ {
+ "url": "vendor/codemirror/addon/selection/selection-pointer.js",
+ "revision": "ae80c5e4d54f8ccb07c6373e66f523a4"
+ },
+ {
+ "url": "vendor/codemirror/addon/tern/tern.css",
+ "revision": "4d57ced774b5f3fa9f00dfa398e74819"
+ },
+ {
+ "url": "vendor/codemirror/addon/tern/tern.js",
+ "revision": "f6c76d9ec32faccbb8cf23b7a2f6f917"
+ },
+ {
+ "url": "vendor/codemirror/addon/tern/worker.js",
+ "revision": "6866b3b6f236f5ae8b89e15b5cf167e1"
+ },
+ {
+ "url": "vendor/codemirror/addon/wrap/hardwrap.js",
+ "revision": "359a2bb5a43f724a09f2adbbfe40dd86"
+ },
+ {
+ "url": "vendor/codemirror/lib/codemirror.css",
+ "revision": "fc217d502b05f65616356459c0ec1d62"
+ },
+ {
+ "url": "vendor/codemirror/lib/codemirror.js",
+ "revision": "82b9491f7e4ecd8ce57812ee3f99014f"
+ },
+ {
+ "url": "vendor/codemirror/mode/meta.js",
+ "revision": "3eb5b33a2d2022c4de839b1980511f54"
+ },
+ {
+ "url": "vendor/codemirror/mode/sql/index.html",
+ "revision": "91f74a33b9232251058426d1e16e9dce"
+ },
+ {
+ "url": "vendor/codemirror/mode/sql/sql.js",
+ "revision": "d21c7a0e713132429cf903be42310a89"
+ },
+ {
+ "url": "vendor/datatables/datatables.min.css",
+ "revision": "80026250946cff8a6fc0da995aa02566"
+ },
+ {
+ "url": "vendor/datatables/datatables.min.js",
+ "revision": "c1e3d63eab27d1aa7beb191d32340bba"
+ },
+ {
+ "url": "vendor/datatables/images/sort_asc_disabled.png",
+ "revision": "d7dc10c78f23615d328581aebcd805eb"
+ },
+ {
+ "url": "vendor/datatables/images/sort_asc.png",
+ "revision": "9326ad44ae4bebdedd141e7a53c2a730"
+ },
+ {
+ "url": "vendor/datatables/images/sort_both.png",
+ "revision": "9a6486086d09bb38cf66a57cc559ade3"
+ },
+ {
+ "url": "vendor/datatables/images/sort_desc_disabled.png",
+ "revision": "bda51e15154a18257b4f955a222fd66f"
+ },
+ {
+ "url": "vendor/datatables/images/sort_desc.png",
+ "revision": "1fc418e33fd5a687290258b23fac4e98"
+ },
+ {
+ "url": "vendor/images/datatables/sort_asc_disabled.png",
+ "revision": "d7dc10c78f23615d328581aebcd805eb"
+ },
+ {
+ "url": "vendor/images/datatables/sort_asc.png",
+ "revision": "9326ad44ae4bebdedd141e7a53c2a730"
+ },
+ {
+ "url": "vendor/images/datatables/sort_both.png",
+ "revision": "9a6486086d09bb38cf66a57cc559ade3"
+ },
+ {
+ "url": "vendor/images/datatables/sort_desc_disabled.png",
+ "revision": "bda51e15154a18257b4f955a222fd66f"
+ },
+ {
+ "url": "vendor/images/datatables/sort_desc.png",
+ "revision": "1fc418e33fd5a687290258b23fac4e98"
+ },
+ {
+ "url": "vendor/jquery/images/ui-icons_444444_256x240.png",
+ "revision": "f83a8b8886694eaef4505dd80af7a430"
+ },
+ {
+ "url": "vendor/jquery/jquery-3.4.1.min.js",
+ "revision": "220afd743d9e9643852e31a135a9f3ae"
+ },
+ {
+ "url": "vendor/jquery/jquery-ui.min.css",
+ "revision": "81188e0c65a0a25d5ebfa7356bf81884"
+ },
+ {
+ "url": "vendor/jquery/jquery-ui.min.js",
+ "revision": "8cbf62fc02083afe12a90787cb8f9e3c"
+ },
+ {
+ "url": "vendor/jstree/jstree.js",
+ "revision": "66cefd86e219c19be9a32b4a9f6f70b2"
+ },
+ {
+ "url": "vendor/jstree/jstree.min.js",
+ "revision": "dc4a6494cf51022fa4a8541d13837166"
+ },
+ {
+ "url": "vendor/jstree/themes/default-dark/32px.png",
+ "revision": "eebaf260766f5e0e773f53d3ea4f3e4d"
+ },
+ {
+ "url": "vendor/jstree/themes/default-dark/40px.png",
+ "revision": "51286e68b083696edaf4f9fc577e2a2d"
+ },
+ {
+ "url": "vendor/jstree/themes/default-dark/style.css",
+ "revision": "6791bf1b92e95d10c8445ac010c429df"
+ },
+ {
+ "url": "vendor/jstree/themes/default-dark/style.min.css",
+ "revision": "0236b108a8deddca3b0fae061147a0a6"
+ },
+ {
+ "url": "vendor/jstree/themes/default-dark/throbber.gif",
+ "revision": "62be6ed2b189444b472b8000dc187240"
+ },
+ {
+ "url": "vendor/jstree/themes/default/32px.png",
+ "revision": "db49c8de4f267eede40a9a8843efcdec"
+ },
+ {
+ "url": "vendor/jstree/themes/default/40px.png",
+ "revision": "1f075735090412ed7eb8077d819b19c6"
+ },
+ {
+ "url": "vendor/jstree/themes/default/style.css",
+ "revision": "0cf1fc2eadda48373db31569a791ae29"
+ },
+ {
+ "url": "vendor/jstree/themes/default/style.min.css",
+ "revision": "8f65ba57d02eadb0c75d0623190d1ee8"
+ },
+ {
+ "url": "vendor/jstree/themes/default/throbber.gif",
+ "revision": "9ed4669f524bec38319be63a2ee4ba26"
+ },
+ {
+ "url": "vendor/jstree/themes/phppgadmin/32px.png",
+ "revision": "230b82ca8561d9b4111ba8102cae2bb6"
+ },
+ {
+ "url": "vendor/jstree/themes/phppgadmin/40px.png",
+ "revision": "1f075735090412ed7eb8077d819b19c6"
+ },
+ {
+ "url": "vendor/jstree/themes/phppgadmin/style.css",
+ "revision": "f5a9ca92f2b904247c7b83ce4b054481"
+ },
+ {
+ "url": "vendor/jstree/themes/phppgadmin/style.min.css",
+ "revision": "8f65ba57d02eadb0c75d0623190d1ee8"
+ },
+ {
+ "url": "vendor/jstree/themes/phppgadmin/throbber.gif",
+ "revision": "9ed4669f524bec38319be63a2ee4ba26"
+ },
+ {
+ "url": "vendor/less.min.js",
+ "revision": "df377f04717c4d59bfdec987dff69a0e"
+ },
+ {
+ "url": "vendor/select2/css/select2.css",
+ "revision": "887b34f2cf309344f3e0b96aaab2b15d"
+ },
+ {
+ "url": "vendor/select2/css/select2.min.css",
+ "revision": "d44571114a90b9226cd654d3c7d9442c"
+ },
+ {
+ "url": "vendor/select2/js/i18n/ar.js",
+ "revision": "a8bb27ec698c86bde72c8a6f13a8e9b4"
+ },
+ {
+ "url": "vendor/select2/js/i18n/az.js",
+ "revision": "498dc667b34eb0fddc31c4e92330d1aa"
+ },
+ {
+ "url": "vendor/select2/js/i18n/bg.js",
+ "revision": "89cba4df3c8694fcb33098dd1646cac1"
+ },
+ {
+ "url": "vendor/select2/js/i18n/ca.js",
+ "revision": "2eaad4eb1950a0d542812c58d30c93dd"
+ },
+ {
+ "url": "vendor/select2/js/i18n/cs.js",
+ "revision": "a68bcd293adcd6d9ac0b8527c9b39189"
+ },
+ {
+ "url": "vendor/select2/js/i18n/da.js",
+ "revision": "cbf897a0ae53b0cffbbe3f50d8b1b136"
+ },
+ {
+ "url": "vendor/select2/js/i18n/de.js",
+ "revision": "366d0aacb55f4929cc50bb977abec674"
+ },
+ {
+ "url": "vendor/select2/js/i18n/el.js",
+ "revision": "5629ce65500f96c62414a27c6eaed62c"
+ },
+ {
+ "url": "vendor/select2/js/i18n/en.js",
+ "revision": "05649b26c08630d2b703bc1e9ef93c7b"
+ },
+ {
+ "url": "vendor/select2/js/i18n/es.js",
+ "revision": "dc9dbf9d65df3f69e6b6d650c97bd967"
+ },
+ {
+ "url": "vendor/select2/js/i18n/et.js",
+ "revision": "c3953fb90b6bb9669697f5f12e802a66"
+ },
+ {
+ "url": "vendor/select2/js/i18n/eu.js",
+ "revision": "11b925456433eaab07e35b8dca7046f5"
+ },
+ {
+ "url": "vendor/select2/js/i18n/fa.js",
+ "revision": "98e52839b583e1ca66f4360a4f43f9b0"
+ },
+ {
+ "url": "vendor/select2/js/i18n/fi.js",
+ "revision": "659847deefdcfd7e4f8f2ed924d360f4"
+ },
+ {
+ "url": "vendor/select2/js/i18n/fr.js",
+ "revision": "b06a3340de45535358a0bc33fa2b9739"
+ },
+ {
+ "url": "vendor/select2/js/i18n/gl.js",
+ "revision": "78a87f7c0a519118fbe4f583ff2a3b3f"
+ },
+ {
+ "url": "vendor/select2/js/i18n/he.js",
+ "revision": "222d90ee0344ee8beeb5fb1835c93c76"
+ },
+ {
+ "url": "vendor/select2/js/i18n/hi.js",
+ "revision": "116a90b7111b953cd092e30a034d6913"
+ },
+ {
+ "url": "vendor/select2/js/i18n/hr.js",
+ "revision": "e1d2c70b4df50d98d2c35856804d38be"
+ },
+ {
+ "url": "vendor/select2/js/i18n/hu.js",
+ "revision": "db45641f10b2412801d5872e40ef7c2f"
+ },
+ {
+ "url": "vendor/select2/js/i18n/id.js",
+ "revision": "6ee6c9c64b945bb8a0f42d247ee0d868"
+ },
+ {
+ "url": "vendor/select2/js/i18n/is.js",
+ "revision": "808c7d47acb59537728bc74fdeb0ad0d"
+ },
+ {
+ "url": "vendor/select2/js/i18n/it.js",
+ "revision": "bae1661dbb77c15384655faffc10a3fa"
+ },
+ {
+ "url": "vendor/select2/js/i18n/ja.js",
+ "revision": "19cf1ce8a03de84ea668e8fec99a8c80"
+ },
+ {
+ "url": "vendor/select2/js/i18n/km.js",
+ "revision": "6074a9c5575cfaa8b3c1dccdb3133dde"
+ },
+ {
+ "url": "vendor/select2/js/i18n/ko.js",
+ "revision": "74b17541834ff1bb8c5651d321bd2281"
+ },
+ {
+ "url": "vendor/select2/js/i18n/lt.js",
+ "revision": "a0783b1bd1594b7c584564cc68b6c6e5"
+ },
+ {
+ "url": "vendor/select2/js/i18n/lv.js",
+ "revision": "07fe2a580d17cba308a972fdabbcaea0"
+ },
+ {
+ "url": "vendor/select2/js/i18n/mk.js",
+ "revision": "4986d7fc3ff3ed9a5f8af646f5ca587b"
+ },
+ {
+ "url": "vendor/select2/js/i18n/ms.js",
+ "revision": "23e7b436957996a10f451bc8d688764d"
+ },
+ {
+ "url": "vendor/select2/js/i18n/nb.js",
+ "revision": "137e184004aaec03977a4caf1cca30f4"
+ },
+ {
+ "url": "vendor/select2/js/i18n/nl.js",
+ "revision": "c363ace8aa0501526c17a61ab2fb854f"
+ },
+ {
+ "url": "vendor/select2/js/i18n/pl.js",
+ "revision": "76465b54a6b0eb6b2204143a0827d0ca"
+ },
+ {
+ "url": "vendor/select2/js/i18n/pt-BR.js",
+ "revision": "9efbbac4fda8d23225df16dddecb2718"
+ },
+ {
+ "url": "vendor/select2/js/i18n/pt.js",
+ "revision": "5d6ccc53b347b155e1af6afb1bc5fe94"
+ },
+ {
+ "url": "vendor/select2/js/i18n/ro.js",
+ "revision": "1ddc2b9980dcdd1008761149e0349a8b"
+ },
+ {
+ "url": "vendor/select2/js/i18n/ru.js",
+ "revision": "d83609abf2e0ba927b9ec472bf47e180"
+ },
+ {
+ "url": "vendor/select2/js/i18n/sk.js",
+ "revision": "a0f1a818d09228a87ae105d09fdee80c"
+ },
+ {
+ "url": "vendor/select2/js/i18n/sr-Cyrl.js",
+ "revision": "2f3047aad49eedd75dd5dacc092a7e02"
+ },
+ {
+ "url": "vendor/select2/js/i18n/sr.js",
+ "revision": "157bc6eb978e9a35985bc655d09ac258"
+ },
+ {
+ "url": "vendor/select2/js/i18n/sv.js",
+ "revision": "2b21bb3f61100fd656b41d16e25e2f80"
+ },
+ {
+ "url": "vendor/select2/js/i18n/th.js",
+ "revision": "2a4ece4c4355b7efd9e9591a53b3edc1"
+ },
+ {
+ "url": "vendor/select2/js/i18n/tr.js",
+ "revision": "c1925d8817db211164145dc47b18d333"
+ },
+ {
+ "url": "vendor/select2/js/i18n/uk.js",
+ "revision": "3d56f311192daf9ce44246c52777789f"
+ },
+ {
+ "url": "vendor/select2/js/i18n/vi.js",
+ "revision": "3520aa7bdea8234161b2c18f631417a0"
+ },
+ {
+ "url": "vendor/select2/js/i18n/zh-CN.js",
+ "revision": "419002d3c6c10ec9618ce6275c1057d1"
+ },
+ {
+ "url": "vendor/select2/js/i18n/zh-TW.js",
+ "revision": "c021537edf2c555f149509150ff986e3"
+ },
+ {
+ "url": "vendor/select2/js/select2.full.js",
+ "revision": "a95323cb476000ee17d7a252786df963"
+ },
+ {
+ "url": "vendor/select2/js/select2.full.min.js",
+ "revision": "da607360bcc65284a197ada3d68d5439"
+ },
+ {
+ "url": "vendor/select2/js/select2.js",
+ "revision": "b8f26dd6733ccc6263cb273e8f821dab"
+ },
+ {
+ "url": "vendor/select2/js/select2.min.js",
+ "revision": "e87ca4c3554f7b9e693605ce12d3a234"
+ }
+]);
+
+ console.log(`Yay! Workbox is loaded 🎉`);
+
+ workbox.routing.registerRoute(
+ /\/assets\/css/,
+ new workbox.strategies.CacheFirst({
+ cacheName: 'vendor-local-css',
+ plugins: [
+ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] }),
+ ],
+ })
+ );
+ workbox.routing.registerRoute(
+ /\/assets\/js/,
+ new workbox.strategies.CacheFirst({
+ cacheName: 'vendor-local-js',
+ plugins: [
+ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] }),
+ ],
+ })
+ );
+ workbox.routing.registerRoute(
+ /\/img/,
+ new workbox.strategies.CacheFirst({
+ cacheName: 'image-files',
+ plugins: [
+ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] }),
+
+ })
+ );
+
+ // Cache the Google Fonts stylesheets with a stale-while-revalidate strategy.
+ workbox.routing.registerRoute(
+ /^https:\/\/fonts\.googleapis\.com/,
+ new workbox.strategies.StaleWhileRevalidate({
+ cacheName: 'google-fonts-stylesheets',
+ })
+ );
+
+ // Cache the underlying font files with a cache-first strategy for 1 year.
+ workbox.routing.registerRoute(
+ /^https:\/\/fonts\.gstatic\.com/,
+ new workbox.strategies.CacheFirst({
+ cacheName: 'google-fonts-webfonts',
+ plugins: [
+ new workbox.cacheableResponse.CacheableResponse({ statuses: [0, 200] }),
+ ],
+ })
+ );
+} else {
+ console.log(`Boo! Workbox didn't load 😬`);
+}
diff --git a/assets/templates/components/common_head.twig b/assets/templates/components/common_head.twig
index 925f5028..f0f22438 100644
--- a/assets/templates/components/common_head.twig
+++ b/assets/templates/components/common_head.twig
@@ -1,6 +1,10 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <link rel="stylesheet" href="{{subfolder}}/assets/themes/global.css" type="text/css" id="csstheme" />
+ {% set development_assets=true %}
+ {% if development_assets==true %}
+ <script src="{{subfolder}}/assets/vendor/less.min.js" type="text/javascript"></script>
+ {% else %}
+ <link rel="stylesheet" href="{{subfolder}}/assets/themes/global.css" type="text/css" id="cssmain" />
+ {% endif %}
<link rel="stylesheet" href="{{subfolder}}/assets/themes/{{theme}}/global.css" type="text/css" id="csstheme" />
<link rel="stylesheet" href="{{subfolder}}/assets/vendor/jquery/jquery-ui.min.css" type="text/css" />
<link rel="shortcut icon" href="{{Favicon}}" type="image/vnd.microsoft.icon" />
@@ -23,11 +27,13 @@
subfolder:'{{subfolder}}',
path:"{{path}}",
query_string:"{{query_string}}",
- strconfdropcred:"{{strconfdropcred}}",
+ strconfdropcred:"{{lang.strconfdropcred}}",
};
if (stateObj.reload !== "none" && window.jsTree) {
window.jsTree.jstree('refresh')
}
+
+
</script>
diff --git a/assets/templates/footer_iframe.twig b/assets/templates/footer_iframe.twig
index 3469b3da..e0033b58 100644
--- a/assets/templates/footer_iframe.twig
+++ b/assets/templates/footer_iframe.twig
@@ -10,4 +10,25 @@
window.onpopstate = function (event) { console.log('onpopstate', { state: event.state }); if (event.state &&
event.state.realurl) { var ifr = document.getElementById('detail')
ifr.contentWindow.location.replace(event.state.realurl); } };
+if('serviceWorker' in navigator) {
+ navigator.serviceWorker.register('assets/sw.dev.js').then(function(registration) {
+ console.log('Service Worker Registered');
+ }).catch(warn=>{
+ console.warn(warn);
+ })
+}
+window.addEventListener("message", (event) => {
+ const {origin,isTrusted,data}=event,browserIframe= document.getElementById('browser');
+ if(!isTrusted||origin!==location.origin) {
+ return;
+ }
+ if(data.reload_browser && browserIframe) {
+ try {
+ browserIframe.contentWindow.jsTree.jstree('refresh')
+ }catch(err){
+ console.warn(err);
+ }
+ }
+ console.log(event);
+}, false);
</script>
diff --git a/assets/themes/global.css b/assets/themes/global.css
index 214f7d41..c1cb510d 100644
--- a/assets/themes/global.css
+++ b/assets/themes/global.css
@@ -18,16 +18,43 @@ html body.sql_edit #sqlform #queryedition {
html body.sql_edit #sqlform #queryedition > .CodeMirror {
min-height: 70px;
}
-html body.sql_edit #sqlform #queryedition > .CodeMirror .CodeMirror-scroll .CodeMirror-sizer {
+html
+ body.sql_edit
+ #sqlform
+ #queryedition
+ > .CodeMirror
+ .CodeMirror-scroll
+ .CodeMirror-sizer {
margin-left: 40px !important;
}
-html body.sql_edit #sqlform #queryedition > .CodeMirror .CodeMirror-scroll .CodeMirror-sizer .cm-m-sql.cm-keyword {
+html
+ body.sql_edit
+ #sqlform
+ #queryedition
+ > .CodeMirror
+ .CodeMirror-scroll
+ .CodeMirror-sizer
+ .cm-m-sql.cm-keyword {
text-transform: uppercase;
}
-html body.sql_edit #sqlform #queryedition > .CodeMirror .CodeMirror-scroll .CodeMirror-gutters .CodeMirror-linenumbers {
+html
+ body.sql_edit
+ #sqlform
+ #queryedition
+ > .CodeMirror
+ .CodeMirror-scroll
+ .CodeMirror-gutters
+ .CodeMirror-linenumbers {
min-width: 30px !important;
}
-html body.sql_edit #sqlform #queryedition > .CodeMirror .CodeMirror-scroll .CodeMirror-gutters .CodeMirror-foldgutter {
+html
+ body.sql_edit
+ #sqlform
+ #queryedition
+ > .CodeMirror
+ .CodeMirror-scroll
+ .CodeMirror-gutters
+ .CodeMirror-foldgutter {
width: 0.7em !important;
}
html body.sql_edit #sqlform #queryedition #query {
@@ -188,7 +215,11 @@ html body.flexbox_body .flexbox_wrapper > #browser_container {
float: left;
flex: 0 0 300px;
}
-html body.flexbox_body .flexbox_wrapper > #browser_container > .browser_container {
+html
+ body.flexbox_body
+ .flexbox_wrapper
+ > #browser_container
+ > .browser_container {
height: 100%;
margin: 0px;
padding: 0px;
@@ -201,7 +232,11 @@ html body.flexbox_body .flexbox_wrapper > #browser_container.ui-resizable {
flex: unset;
border-right: 8px solid #cfd8dc;
}
-html body.flexbox_body .flexbox_wrapper > #browser_container.ui-resizable .ui-resizable-handle.ui-resizable-e {
+html
+ body.flexbox_body
+ .flexbox_wrapper
+ > #browser_container.ui-resizable
+ .ui-resizable-handle.ui-resizable-e {
width: 8px;
right: -8px;
background: #84a0ad;
@@ -221,7 +256,11 @@ html body.flexbox_body.rtl .flexbox_wrapper > #browser_container.ui-resizable {
border-right: 0 none;
border-left: 8px solid #cfd8dc;
}
-html body.flexbox_body.rtl .flexbox_wrapper > #browser_container.ui-resizable .ui-resizable-handle.ui-resizable-w {
+html
+ body.flexbox_body.rtl
+ .flexbox_wrapper
+ > #browser_container.ui-resizable
+ .ui-resizable-handle.ui-resizable-w {
width: 8px;
left: -8px;
background: #84a0ad;
diff --git a/assets/vendor/less.min.js b/assets/vendor/less.min.js
deleted file mode 100644
index be8dee91..00000000
--- a/assets/vendor/less.min.js
+++ /dev/null
@@ -1,8843 +0,0 @@
-/*!
- * Less - Leaner CSS v2.7.2
- * http://lesscss.org
- *
- * Copyright (c) 2009-2017, Alexis Sellier <self@cloudhead.net>
- * Licensed under the Apache-2.0 License.
- *
- */
-
-/** * @license Apache-2.0
- */
-
-!(function (a) {
- if ('object' == typeof exports && 'undefined' != typeof module)
- module.exports = a();
- else if ('function' == typeof define && define.amd) define([], a);
- else {
- var b;
- (b =
- 'undefined' != typeof window
- ? window
- : 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : this),
- (b.less = a());
- }
-})(function () {
- return (function a(b, c, d) {
- function e(g, h) {
- if (!c[g]) {
- if (!b[g]) {
- var i = 'function' == typeof require && require;
- if (!h && i) return i(g, !0);
- if (f) return f(g, !0);
- var j = new Error("Cannot find module '" + g + "'");
- throw ((j.code = 'MODULE_NOT_FOUND'), j);
- }
- var k = (c[g] = { exports: {} });
- b[g][0].call(
- k.exports,
- function (a) {
- var c = b[g][1][a];
- return e(c ? c : a);
- },
- k,
- k.exports,
- a,
- b,
- c,
- d
- );
- }
- return c[g].exports;
- }
- for (
- var f = 'function' == typeof require && require, g = 0;
- g < d.length;
- g++
- )
- e(d[g]);
- return e;
- })(
- {
- 1: [
- function (a, b, c) {
- var d = a('./utils').addDataAttr,
- e = a('./browser');
- b.exports = function (a, b) {
- d(b, e.currentScript(a)),
- void 0 === b.isFileProtocol &&
- (b.isFileProtocol = /^(file|(chrome|safari)(-extension)?|resource|qrc|app):/.test(
- a.location.protocol
- )),
- (b.async = b.async || !1),
- (b.fileAsync = b.fileAsync || !1),
- (b.poll = b.poll || (b.isFileProtocol ? 1e3 : 1500)),
- (b.env =
- b.env ||
- ('127.0.0.1' == a.location.hostname ||
- '0.0.0.0' == a.location.hostname ||
- 'localhost' == a.location.hostname ||
- (a.location.port && a.location.port.length > 0) ||
- b.isFileProtocol
- ? 'development'
- : 'production'));
- var c = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(
- a.location.hash
- );
- c && (b.dumpLineNumbers = c[1]),
- void 0 === b.useFileCache && (b.useFileCache = !0),
- void 0 === b.onReady && (b.onReady = !0);
- };
- },
- { './browser': 3, './utils': 10 },
- ],
- 2: [
- function (a, b, c) {
- function d(a) {
- a.filename && console.warn(a), e.async || h.removeChild(i);
- }
- a('promise/polyfill.js');
- var e = window.less || {};
- a('./add-default-options')(window, e);
- var f = (b.exports = a('./index')(window, e));
- window.less = f;
- var g, h, i;
- e.onReady &&
- (/!watch/.test(window.location.hash) && f.watch(),
- e.async ||
- ((g = 'body { display: none !important }'),
- (h = document.head || document.getElementsByTagName('head')[0]),
- (i = document.createElement('style')),
- (i.type = 'text/css'),
- i.styleSheet
- ? (i.styleSheet.cssText = g)
- : i.appendChild(document.createTextNode(g)),
- h.appendChild(i)),
- f.registerStylesheetsImmediately(),
- (f.pageLoadFinished = f
- .refresh('development' === f.env)
- .then(d, d)));
- },
- { './add-default-options': 1, './index': 8, 'promise/polyfill.js': 97 },
- ],
- 3: [
- function (a, b, c) {
- var d = a('./utils');
- b.exports = {
- createCSS: function (a, b, c) {
- var e = c.href || '',
- f = 'less:' + (c.title || d.extractId(e)),
- g = a.getElementById(f),
- h = !1,
- i = a.createElement('style');
- i.setAttribute('type', 'text/css'),
- c.media && i.setAttribute('media', c.media),
- (i.id = f),
- i.styleSheet ||
- (i.appendChild(a.createTextNode(b)),
- (h =
- null !== g &&
- g.childNodes.length > 0 &&
- i.childNodes.length > 0 &&
- g.firstChild.nodeValue === i.firstChild.nodeValue));
- var j = a.getElementsByTagName('head')[0];
- if (null === g || h === !1) {
- var k = (c && c.nextSibling) || null;
- k ? k.parentNode.insertBefore(i, k) : j.appendChild(i);
- }
- if ((g && h === !1 && g.parentNode.removeChild(g), i.styleSheet))
- try {
- i.styleSheet.cssText = b;
- } catch (l) {
- throw new Error("Couldn't reassign styleSheet.cssText.");
- }
- },
- currentScript: function (a) {
- var b = a.document;
- return (
- b.currentScript ||
- (function () {
- var a = b.getElementsByTagName('script');
- return a[a.length - 1];
- })()
- );
- },
- };
- },
- { './utils': 10 },
- ],
- 4: [
- function (a, b, c) {
- b.exports = function (a, b, c) {
- var d = null;
- if ('development' !== b.env)
- try {
- d =
- 'undefined' == typeof a.localStorage ? null : a.localStorage;
- } catch (e) {}
- return {
- setCSS: function (a, b, e, f) {
- if (d) {
- c.info('saving ' + a + ' to cache.');
- try {
- d.setItem(a, f),
- d.setItem(a + ':timestamp', b),
- e && d.setItem(a + ':vars', JSON.stringify(e));
- } catch (g) {
- c.error(
- 'failed to save "' + a + '" to local storage for caching.'
- );
- }
- }
- },
- getCSS: function (a, b, c) {
- var e = d && d.getItem(a),
- f = d && d.getItem(a + ':timestamp'),
- g = d && d.getItem(a + ':vars');
- if (
- ((c = c || {}),
- f &&
- b.lastModified &&
- new Date(b.lastModified).valueOf() ===
- new Date(f).valueOf() &&
- ((!c && !g) || JSON.stringify(c) === g))
- )
- return e;
- },
- };
- };
- },
- {},
- ],
- 5: [
- function (a, b, c) {
- var d = a('./utils'),
- e = a('./browser');
- b.exports = function (a, b, c) {
- function f(b, f) {
- var g,
- h,
- i = 'less-error-message:' + d.extractId(f || ''),
- j =
- '<li><label>{line}</label><pre class="{class}">{content}</pre></li>',
- k = a.document.createElement('div'),
- l = [],
- m = b.filename || f,
- n = m.match(/([^\/]+(\?.*)?)$/)[1];
- (k.id = i),
- (k.className = 'less-error-message'),
- (h =
- '<h3>' +
- (b.type || 'Syntax') +
- 'Error: ' +
- (b.message || 'There is an error in your .less file') +
- '</h3><p>in <a href="' +
- m +
- '">' +
- n +
- '</a> ');
- var o = function (a, b, c) {
- void 0 !== a.extract[b] &&
- l.push(
- j
- .replace(
- /\{line\}/,
- (parseInt(a.line, 10) || 0) + (b - 1)
- )
- .replace(/\{class\}/, c)
- .replace(/\{content\}/, a.extract[b])
- );
- };
- b.extract &&
- (o(b, 0, ''),
- o(b, 1, 'line'),
- o(b, 2, ''),
- (h +=
- 'on line ' +
- b.line +
- ', column ' +
- (b.column + 1) +
- ':</p><ul>' +
- l.join('') +
- '</ul>')),
- b.stack &&
- (b.extract || c.logLevel >= 4) &&
- (h +=
- '<br/>Stack Trace</br />' +
- b.stack.split('\n').slice(1).join('<br/>')),
- (k.innerHTML = h),
- e.createCSS(
- a.document,
- [
- '.less-error-message ul, .less-error-message li {',
- 'list-style-type: none;',
- 'margin-right: 15px;',
- 'padding: 4px 0;',
- 'margin: 0;',
- '}',
- '.less-error-message label {',
- 'font-size: 12px;',
- 'margin-right: 15px;',
- 'padding: 4px 0;',
- 'color: #cc7777;',
- '}',
- '.less-error-message pre {',
- 'color: #dd6666;',
- 'padding: 4px 0;',
- 'margin: 0;',
- 'display: inline-block;',
- '}',
- '.less-error-message pre.line {',
- 'color: #ff0000;',
- '}',
- '.less-error-message h3 {',
- 'font-size: 20px;',
- 'font-weight: bold;',
- 'padding: 15px 0 5px 0;',
- 'margin: 0;',
- '}',
- '.less-error-message a {',
- 'color: #10a',
- '}',
- '.less-error-message .error {',
- 'color: red;',
- 'font-weight: bold;',
- 'padding-bottom: 2px;',
- 'border-bottom: 1px dashed red;',
- '}',
- ].join('\n'),
- { title: 'error-message' }
- ),
- (k.style.cssText = [
- 'font-family: Arial, sans-serif',
- 'border: 1px solid #e00',
- 'background-color: #eee',
- 'border-radius: 5px',
- '-webkit-border-radius: 5px',
- '-moz-border-radius: 5px',
- 'color: #e00',
- 'padding: 15px',
- 'margin-bottom: 15px',
- ].join(';')),
- 'development' === c.env &&
- (g = setInterval(function () {
- var b = a.document,
- c = b.body;
- c &&
- (b.getElementById(i)
- ? c.replaceChild(k, b.getElementById(i))
- : c.insertBefore(k, c.firstChild),
- clearInterval(g));
- }, 10));
- }
- function g(b) {
- var c = a.document.getElementById(
- 'less-error-message:' + d.extractId(b)
- );
- c && c.parentNode.removeChild(c);
- }
- function h(a) {}
- function i(a) {
- c.errorReporting && 'html' !== c.errorReporting
- ? 'console' === c.errorReporting
- ? h(a)
- : 'function' == typeof c.errorReporting &&
- c.errorReporting('remove', a)
- : g(a);
- }
- function j(a, d) {
- var e = '{line} {content}',
- f = a.filename || d,
- g = [],
- h =
- (a.type || 'Syntax') +
- 'Error: ' +
- (a.message || 'There is an error in your .less file') +
- ' in ' +
- f +
- ' ',
- i = function (a, b, c) {
- void 0 !== a.extract[b] &&
- g.push(
- e
- .replace(
- /\{line\}/,
- (parseInt(a.line, 10) || 0) + (b - 1)
- )
- .replace(/\{class\}/, c)
- .replace(/\{content\}/, a.extract[b])
- );
- };
- a.extract &&
- (i(a, 0, ''),
- i(a, 1, 'line'),
- i(a, 2, ''),
- (h +=
- 'on line ' +
- a.line +
- ', column ' +
- (a.column + 1) +
- ':\n' +
- g.join('\n'))),
- a.stack &&
- (a.extract || c.logLevel >= 4) &&
- (h += '\nStack Trace\n' + a.stack),
- b.logger.error(h);
- }
- function k(a, b) {
- c.errorReporting && 'html' !== c.errorReporting
- ? 'console' === c.errorReporting
- ? j(a, b)
- : 'function' == typeof c.errorReporting &&
- c.errorReporting('add', a, b)
- : f(a, b);
- }
- return { add: k, remove: i };
- };
- },
- { './browser': 3, './utils': 10 },
- ],
- 6: [
- function (a, b, c) {
- b.exports = function (b, c) {
- function d() {
- if (
- window.XMLHttpRequest &&
- !(
- 'file:' === window.location.protocol &&
- 'ActiveXObject' in window
- )
- )
- return new XMLHttpRequest();
- try {
- return new ActiveXObject('Microsoft.XMLHTTP');
- } catch (a) {
- return c.error("browser doesn't support AJAX."), null;
- }
- }
- var e = a('../less/environment/abstract-file-manager.js'),
- f = {},
- g = function () {};
- return (
- (g.prototype = new e()),
- (g.prototype.alwaysMakePathsAbsolute = function () {
- return !0;
- }),
- (g.prototype.join = function (a, b) {
- return a ? this.extractUrlParts(b, a).path : b;
- }),
- (g.prototype.doXHR = function (a, e, f, g) {
- function h(b, c, d) {
- b.status >= 200 && b.status < 300
- ? c(b.responseText, b.getResponseHeader('Last-Modified'))
- : 'function' == typeof d && d(b.status, a);
- }
- var i = d(),
- j = !b.isFileProtocol || b.fileAsync;
- 'function' == typeof i.overrideMimeType &&
- i.overrideMimeType('text/css'),
- c.debug("XHR: Getting '" + a + "'"),
- i.open('GET', a, j),
- i.setRequestHeader(
- 'Accept',
- e || 'text/x-less, text/css; q=0.9, */*; q=0.5'
- ),
- i.send(null),
- b.isFileProtocol && !b.fileAsync
- ? 0 === i.status || (i.status >= 200 && i.status < 300)
- ? f(i.responseText)
- : g(i.status, a)
- : j
- ? (i.onreadystatechange = function () {
- 4 == i.readyState && h(i, f, g);
- })
- : h(i, f, g);
- }),
- (g.prototype.supports = function (a, b, c, d) {
- return !0;
- }),
- (g.prototype.clearFileCache = function () {
- f = {};
- }),
- (g.prototype.loadFile = function (a, b, c, d, e) {
- b && !this.isPathAbsolute(a) && (a = b + a), (c = c || {});
- var g = this.extractUrlParts(a, window.location.href),
- h = g.url;
- if (c.useFileCache && f[h])
- try {
- var i = f[h];
- e(null, {
- contents: i,
- filename: h,
- webInfo: { lastModified: new Date() },
- });
- } catch (j) {
- e({
- filename: h,
- message:
- 'Error loading file ' + h + ' error was ' + j.message,
- });
- }
- else
- this.doXHR(
- h,
- c.mime,
- function (a, b) {
- (f[h] = a),
- e(null, {
- contents: a,
- filename: h,
- webInfo: { lastModified: b },
- });
- },
- function (a, b) {
- e({
- type: 'File',
- message: "'" + b + "' wasn't found (" + a + ')',
- href: h,
- });
- }
- );
- }),
- g
- );
- };
- },
- { '../less/environment/abstract-file-manager.js': 15 },
- ],
- 7: [
- function (a, b, c) {
- b.exports = function () {
- function b() {
- throw {
- type: 'Runtime',
- message:
- 'Image size functions are not supported in browser version of less',
- };
- }
- var c = a('./../less/functions/function-registry'),
- d = {
- 'image-size': function (a) {
- return b(this, a), -1;
- },
- 'image-width': function (a) {
- return b(this, a), -1;
- },
- 'image-height': function (a) {
- return b(this, a), -1;
- },
- };
- c.addMultiple(d);
- };
- },
- { './../less/functions/function-registry': 22 },
- ],
- 8: [
- function (a, b, c) {
- var d = a('./utils').addDataAttr,
- e = a('./browser');
- b.exports = function (b, c) {
- function f(a) {
- return (
- c.postProcessor &&
- 'function' == typeof c.postProcessor &&
- (a = c.postProcessor.call(a, a) || a),
- a
- );
- }
- function g(a) {
- var b = {};
- for (var c in a) a.hasOwnProperty(c) && (b[c] = a[c]);
- return b;
- }
- function h(a, b) {
- var c = Array.prototype.slice.call(arguments, 2);
- return function () {
- var d = c.concat(Array.prototype.slice.call(arguments, 0));
- return a.apply(b, d);
- };
- }
- function i(a) {
- for (
- var b, d = m.getElementsByTagName('style'), e = 0;
- e < d.length;
- e++
- )
- if (((b = d[e]), b.type.match(t))) {
- var f = g(c);
- f.modifyVars = a;
- var i = b.innerHTML || '';
- (f.filename = m.location.href.replace(/#.*$/, '')),
- n.render(
- i,
- f,
- h(
- function (a, b, c) {
- b
- ? r.add(b, 'inline')
- : ((a.type = 'text/css'),
- a.styleSheet
- ? (a.styleSheet.cssText = c.css)
- : (a.innerHTML = c.css));
- },
- null,
- b
- )
- );
- }
- }
- function j(a, b, e, h, i) {
- function j(c) {
- var d = c.contents,
- g = c.filename,
- i = c.webInfo,
- j = {
- currentDirectory: q.getPath(g),
- filename: g,
- rootFilename: g,
- relativeUrls: k.relativeUrls,
- };
- if (
- ((j.entryPath = j.currentDirectory),
- (j.rootpath = k.rootpath || j.currentDirectory),
- i)
- ) {
- i.remaining = h;
- var l = s.getCSS(g, i, k.modifyVars);
- if (!e && l)
- return (i.local = !0), void b(null, l, d, a, i, g);
- }
- r.remove(g),
- (k.rootFileInfo = j),
- n.render(d, k, function (c, e) {
- c
- ? ((c.href = g), b(c))
- : ((e.css = f(e.css)),
- s.setCSS(a.href, i.lastModified, k.modifyVars, e.css),
- b(null, e.css, d, a, i, g));
- });
- }
- var k = g(c);
- d(k, a),
- (k.mime = a.type),
- i && (k.modifyVars = i),
- q.loadFile(a.href, null, k, o, function (a, c) {
- return a ? void b(a) : void j(c);
- });
- }
- function k(a, b, c) {
- for (var d = 0; d < n.sheets.length; d++)
- j(n.sheets[d], a, b, n.sheets.length - (d + 1), c);
- }
- function l() {
- 'development' === n.env &&
- (n.watchTimer = setInterval(function () {
- n.watchMode &&
- (q.clearFileCache(),
- k(function (a, c, d, f, g) {
- a
- ? r.add(a, a.href || f.href)
- : c && e.createCSS(b.document, c, f);
- }));
- }, c.poll));
- }
- var m = b.document,
- n = a('../less')();
- n.options = c;
- var o = n.environment,
- p = a('./file-manager')(c, n.logger),
- q = new p();
- o.addFileManager(q), (n.FileManager = p), a('./log-listener')(n, c);
- var r = a('./error-reporting')(b, n, c),
- s = (n.cache = c.cache || a('./cache')(b, c, n.logger));
- a('./image-size')(n.environment),
- c.functions &&
- n.functions.functionRegistry.addMultiple(c.functions);
- var t = /^text\/(x-)?less$/;
- return (
- (n.watch = function () {
- return (
- n.watchMode || ((n.env = 'development'), l()),
- (this.watchMode = !0),
- !0
- );
- }),
- (n.unwatch = function () {
- return clearInterval(n.watchTimer), (this.watchMode = !1), !1;
- }),
- (n.registerStylesheetsImmediately = function () {
- var a = m.getElementsByTagName('link');
- n.sheets = [];
- for (var b = 0; b < a.length; b++)
- ('stylesheet/less' === a[b].rel ||
- (a[b].rel.match(/stylesheet/) && a[b].type.match(t))) &&
- n.sheets.push(a[b]);
- }),
- (n.registerStylesheets = function () {
- return new Promise(function (a, b) {
- n.registerStylesheetsImmediately(), a();
- });
- }),
- (n.modifyVars = function (a) {
- return n.refresh(!0, a, !1);
- }),
- (n.refresh = function (a, c, d) {
- return (
- (a || d) && d !== !1 && q.clearFileCache(),
- new Promise(function (d, f) {
- var g, h, j, l;
- (g = h = new Date()),
- (l = n.sheets.length),
- 0 === l
- ? ((h = new Date()),
- (j = h - g),
- n.logger.info(
- 'Less has finished and no sheets were loaded.'
- ),
- d({
- startTime: g,
- endTime: h,
- totalMilliseconds: j,
- sheets: n.sheets.length,
- }))
- : k(
- function (a, c, i, k, m) {
- return a
- ? (r.add(a, a.href || k.href), void f(a))
- : (n.logger.info(
- m.local
- ? 'Loading ' + k.href + ' from cache.'
- : 'Rendered ' + k.href + ' successfully.'
- ),
- e.createCSS(b.document, c, k),
- n.logger.info(
- 'CSS for ' +
- k.href +
- ' generated in ' +
- (new Date() - h) +
- 'ms'
- ),
- l--,
- 0 === l &&
- ((j = new Date() - g),
- n.logger.info(
- 'Less has finished. CSS generated in ' +
- j +
- 'ms'
- ),
- d({
- startTime: g,
- endTime: h,
- totalMilliseconds: j,
- sheets: n.sheets.length,
- })),
- void (h = new Date()));
- },
- a,
- c
- ),
- i(c);
- })
- );
- }),
- (n.refreshStyles = i),
- n
- );
- };
- },
- {
- '../less': 31,
- './browser': 3,
- './cache': 4,
- './error-reporting': 5,
- './file-manager': 6,
- './image-size': 7,
- './log-listener': 9,
- './utils': 10,
- },
- ],
- 9: [
- function (a, b, c) {
- b.exports = function (a, b) {
- var c = 4,
- d = 3,
- e = 2,
- f = 1;
- (b.logLevel =
- 'undefined' != typeof b.logLevel
- ? b.logLevel
- : 'development' === b.env
- ? d
- : f),
- b.loggers ||
- (b.loggers = [
- {
- debug: function (a) {
- b.logLevel >= c && console.log(a);
- },
- info: function (a) {
- b.logLevel >= d && console.log(a);
- },
- warn: function (a) {
- b.logLevel >= e && console.warn(a);
- },
- error: function (a) {
- b.logLevel >= f && console.error(a);
- },
- },
- ]);
- for (var g = 0; g < b.loggers.length; g++)
- a.logger.addListener(b.loggers[g]);
- };
- },
- {},
- ],
- 10: [
- function (a, b, c) {
- b.exports = {
- extractId: function (a) {
- return a
- .replace(/^[a-z-]+:\/+?[^\/]+/, '')
- .replace(/[\?\&]livereload=\w+/, '')
- .replace(/^\//, '')
- .replace(/\.[a-zA-Z]+$/, '')
- .replace(/[^\.\w-]+/g, '-')
- .replace(/\./g, ':');
- },
- addDataAttr: function (a, b) {
- for (var c in b.dataset)
- if (b.dataset.hasOwnProperty(c))
- if (
- 'env' === c ||
- 'dumpLineNumbers' === c ||
- 'rootpath' === c ||
- 'errorReporting' === c
- )
- a[c] = b.dataset[c];
- else
- try {
- a[c] = JSON.parse(b.dataset[c]);
- } catch (d) {}
- },
- };
- },
- {},
- ],
- 11: [
- function (a, b, c) {
- var d = {};
- b.exports = d;
- var e = function (a, b, c) {
- if (a)
- for (var d = 0; d < c.length; d++)
- a.hasOwnProperty(c[d]) && (b[c[d]] = a[c[d]]);
- },
- f = [
- 'paths',
- 'relativeUrls',
- 'rootpath',
- 'strictImports',
- 'insecure',
- 'dumpLineNumbers',
- 'compress',
- 'syncImport',
- 'chunkInput',
- 'mime',
- 'useFileCache',
- 'processImports',
- 'pluginManager',
- ];
- d.Parse = function (a) {
- e(a, this, f),
- 'string' == typeof this.paths && (this.paths = [this.paths]);
- };
- var g = [
- 'paths',
- 'compress',
- 'ieCompat',
- 'strictMath',
- 'strictUnits',
- 'sourceMap',
- 'importMultiple',
- 'urlArgs',
- 'javascriptEnabled',
- 'pluginManager',
- 'importantScope',
- ];
- (d.Eval = function (a, b) {
- e(a, this, g),
- 'string' == typeof this.paths && (this.paths = [this.paths]),
- (this.frames = b || []),
- (this.importantScope = this.importantScope || []);
- }),
- (d.Eval.prototype.inParenthesis = function () {
- this.parensStack || (this.parensStack = []),
- this.parensStack.push(!0);
- }),
- (d.Eval.prototype.outOfParenthesis = function () {
- this.parensStack.pop();
- }),
- (d.Eval.prototype.isMathOn = function () {
- return (
- !this.strictMath ||
- (this.parensStack && this.parensStack.length)
- );
- }),
- (d.Eval.prototype.isPathRelative = function (a) {
- return !/^(?:[a-z-]+:|\/|#)/i.test(a);
- }),
- (d.Eval.prototype.normalizePath = function (a) {
- var b,
- c = a.split('/').reverse();
- for (a = []; 0 !== c.length; )
- switch ((b = c.pop())) {
- case '.':
- break;
- case '..':
- 0 === a.length || '..' === a[a.length - 1]
- ? a.push(b)
- : a.pop();
- break;
- default:
- a.push(b);
- }
- return a.join('/');
- });
- },
- {},
- ],
- 12: [
- function (a, b, c) {
- b.exports = {
- aliceblue: '#f0f8ff',
- antiquewhite: '#faebd7',
- aqua: '#00ffff',
- aquamarine: '#7fffd4',
- azure: '#f0ffff',
- beige: '#f5f5dc',
- bisque: '#ffe4c4',
- black: '#000000',
- blanchedalmond: '#ffebcd',
- blue: '#0000ff',
- blueviolet: '#8a2be2',
- brown: '#a52a2a',
- burlywood: '#deb887',
- cadetblue: '#5f9ea0',
- chartreuse: '#7fff00',
- chocolate: '#d2691e',
- coral: '#ff7f50',
- cornflowerblue: '#6495ed',
- cornsilk: '#fff8dc',
- crimson: '#dc143c',
- cyan: '#00ffff',
- darkblue: '#00008b',
- darkcyan: '#008b8b',
- darkgoldenrod: '#b8860b',
- darkgray: '#a9a9a9',
- darkgrey: '#a9a9a9',
- darkgreen: '#006400',
- darkkhaki: '#bdb76b',
- darkmagenta: '#8b008b',
- darkolivegreen: '#556b2f',
- darkorange: '#ff8c00',
- darkorchid: '#9932cc',
- darkred: '#8b0000',
- darksalmon: '#e9967a',
- darkseagreen: '#8fbc8f',
- darkslateblue: '#483d8b',
- darkslategray: '#2f4f4f',
- darkslategrey: '#2f4f4f',
- darkturquoise: '#00ced1',
- darkviolet: '#9400d3',
- deeppink: '#ff1493',
- deepskyblue: '#00bfff',
- dimgray: '#696969',
- dimgrey: '#696969',
- dodgerblue: '#1e90ff',
- firebrick: '#b22222',
- floralwhite: '#fffaf0',
- forestgreen: '#228b22',
- fuchsia: '#ff00ff',
- gainsboro: '#dcdcdc',
- ghostwhite: '#f8f8ff',
- gold: '#ffd700',
- goldenrod: '#daa520',
- gray: '#808080',
- grey: '#808080',
- green: '#008000',
- greenyellow: '#adff2f',
- honeydew: '#f0fff0',
- hotpink: '#ff69b4',
- indianred: '#cd5c5c',
- indigo: '#4b0082',
- ivory: '#fffff0',
- khaki: '#f0e68c',
- lavender: '#e6e6fa',
- lavenderblush: '#fff0f5',
- lawngreen: '#7cfc00',
- lemonchiffon: '#fffacd',
- lightblue: '#add8e6',
- lightcoral: '#f08080',
- lightcyan: '#e0ffff',
- lightgoldenrodyellow: '#fafad2',
- lightgray: '#d3d3d3',
- lightgrey: '#d3d3d3',
- lightgreen: '#90ee90',
- lightpink: '#ffb6c1',
- lightsalmon: '#ffa07a',
- lightseagreen: '#20b2aa',
- lightskyblue: '#87cefa',
- lightslategray: '#778899',
- lightslategrey: '#778899',
- lightsteelblue: '#b0c4de',
- lightyellow: '#ffffe0',
- lime: '#00ff00',
- limegreen: '#32cd32',
- linen: '#faf0e6',
- magenta: '#ff00ff',
- maroon: '#800000',
- mediumaquamarine: '#66cdaa',
- mediumblue: '#0000cd',
- mediumorchid: '#ba55d3',
- mediumpurple: '#9370d8',
- mediumseagreen: '#3cb371',
- mediumslateblue: '#7b68ee',
- mediumspringgreen: '#00fa9a',
- mediumturquoise: '#48d1cc',
- mediumvioletred: '#c71585',
- midnightblue: '#191970',
- mintcream: '#f5fffa',
- mistyrose: '#ffe4e1',
- moccasin: '#ffe4b5',
- navajowhite: '#ffdead',
- navy: '#000080',
- oldlace: '#fdf5e6',
- olive: '#808000',
- olivedrab: '#6b8e23',
- orange: '#ffa500',
- orangered: '#ff4500',
- orchid: '#da70d6',
- palegoldenrod: '#eee8aa',
- palegreen: '#98fb98',
- paleturquoise: '#afeeee',
- palevioletred: '#d87093',
- papayawhip: '#ffefd5',
- peachpuff: '#ffdab9',
- peru: '#cd853f',
- pink: '#ffc0cb',
- plum: '#dda0dd',
- powderblue: '#b0e0e6',
- purple: '#800080',
- rebeccapurple: '#663399',
- red: '#ff0000',
- rosybrown: '#bc8f8f',
- royalblue: '#4169e1',
- saddlebrown: '#8b4513',
- salmon: '#fa8072',
- sandybrown: '#f4a460',
- seagreen: '#2e8b57',
- seashell: '#fff5ee',
- sienna: '#a0522d',
- silver: '#c0c0c0',
- skyblue: '#87ceeb',
- slateblue: '#6a5acd',
- slategray: '#708090',
- slategrey: '#708090',
- snow: '#fffafa',
- springgreen: '#00ff7f',
- steelblue: '#4682b4',
- tan: '#d2b48c',
- teal: '#008080',
- thistle: '#d8bfd8',
- tomato: '#ff6347',
- turquoise: '#40e0d0',
- violet: '#ee82ee',
- wheat: '#f5deb3',
- white: '#ffffff',
- whitesmoke: '#f5f5f5',
- yellow: '#ffff00',
- yellowgreen: '#9acd32',
- };
- },
- {},
- ],
- 13: [
- function (a, b, c) {
- b.exports = {
- colors: a('./colors'),
- unitConversions: a('./unit-conversions'),
- };
- },
- { './colors': 12, './unit-conversions': 14 },
- ],
- 14: [
- function (a, b, c) {
- b.exports = {
- length: {
- m: 1,
- cm: 0.01,
- mm: 0.001,
- in: 0.0254,
- px: 0.0254 / 96,
- pt: 0.0254 / 72,
- pc: (0.0254 / 72) * 12,
- },
- duration: { s: 1, ms: 0.001 },
- angle: {
- rad: 1 / (2 * Math.PI),
- deg: 1 / 360,
- grad: 0.0025,
- turn: 1,
- },
- };
- },
- {},
- ],
- 15: [
- function (a, b, c) {
- var d = function () {};
- (d.prototype.getPath = function (a) {
- var b = a.lastIndexOf('?');
- return (
- b > 0 && (a = a.slice(0, b)),
- (b = a.lastIndexOf('/')),
- b < 0 && (b = a.lastIndexOf('\\')),
- b < 0 ? '' : a.slice(0, b + 1)
- );
- }),
- (d.prototype.tryAppendExtension = function (a, b) {
- return /(\.[a-z]*$)|([\?;].*)$/.test(a) ? a : a + b;
- }),
- (d.prototype.tryAppendLessExtension = function (a) {
- return this.tryAppendExtension(a, '.less');
- }),
- (d.prototype.supportsSync = function () {
- return !1;
- }),
- (d.prototype.alwaysMakePathsAbsolute = function () {
- return !1;
- }),
- (d.prototype.isPathAbsolute = function (a) {
- return /^(?:[a-z-]+:|\/|\\|#)/i.test(a);
- }),
- (d.prototype.join = function (a, b) {
- return a ? a + b : b;
- }),
- (d.prototype.pathDiff = function (a, b) {
- var c,
- d,
- e,
- f,
- g = this.extractUrlParts(a),
- h = this.extractUrlParts(b),
- i = '';
- if (g.hostPart !== h.hostPart) return '';
- for (
- d = Math.max(h.directories.length, g.directories.length), c = 0;
- c < d && h.directories[c] === g.directories[c];
- c++
- );
- for (
- f = h.directories.slice(c), e = g.directories.slice(c), c = 0;
- c < f.length - 1;
- c++
- )
- i += '../';
- for (c = 0; c < e.length - 1; c++) i += e[c] + '/';
- return i;
- }),
- (d.prototype.extractUrlParts = function (a, b) {
- var c,
- d,
- e = /^((?:[a-z-]+:)?\/{2}(?:[^\/\?#]*\/)|([\/\\]))?((?:[^\/\\\?#]*[\/\\])*)([^\/\\\?#]*)([#\?].*)?$/i,
- f = a.match(e),
- g = {},
- h = [];
- if (!f)
- throw new Error("Could not parse sheet href - '" + a + "'");
- if (b && (!f[1] || f[2])) {
- if (((d = b.match(e)), !d))
- throw new Error("Could not parse page url - '" + b + "'");
- (f[1] = f[1] || d[1] || ''), f[2] || (f[3] = d[3] + f[3]);
- }
- if (f[3]) {
- for (
- h = f[3].replace(/\\/g, '/').split('/'), c = 0;
- c < h.length;
- c++
- )
- '.' === h[c] && (h.splice(c, 1), (c -= 1));
- for (c = 0; c < h.length; c++)
- '..' === h[c] && c > 0 && (h.splice(c - 1, 2), (c -= 2));
- }
- return (
- (g.hostPart = f[1]),
- (g.directories = h),
- (g.path = (f[1] || '') + h.join('/')),
- (g.fileUrl = g.path + (f[4] || '')),
- (g.url = g.fileUrl + (f[5] || '')),
- g
- );
- }),
- (b.exports = d);
- },
- {},
- ],
- 16: [
- function (a, b, c) {
- var d = a('../logger'),
- e = function (a, b) {
- (this.fileManagers = b || []), (a = a || {});
- for (
- var c = [
- 'encodeBase64',
- 'mimeLookup',
- 'charsetLookup',
- 'getSourceMapGenerator',
- ],
- d = [],
- e = d.concat(c),
- f = 0;
- f < e.length;
- f++
- ) {
- var g = e[f],
- h = a[g];
- h
- ? (this[g] = h.bind(a))
- : f < d.length &&
- this.warn(
- 'missing required function in environment - ' + g
- );
- }
- };
- (e.prototype.getFileManager = function (a, b, c, e, f) {
- a ||
- d.warn(
- 'getFileManager called with no filename.. Please report this issue. continuing.'
- ),
- null == b &&
- d.warn(
- 'getFileManager called with null directory.. Please report this issue. continuing.'
- );
- var g = this.fileManagers;
- c.pluginManager &&
- (g = [].concat(g).concat(c.pluginManager.getFileManagers()));
- for (var h = g.length - 1; h >= 0; h--) {
- var i = g[h];
- if (i[f ? 'supportsSync' : 'supports'](a, b, c, e)) return i;
- }
- return null;
- }),
- (e.prototype.addFileManager = function (a) {
- this.fileManagers.push(a);
- }),
- (e.prototype.clearFileManagers = function () {
- this.fileManagers = [];
- }),
- (b.exports = e);
- },
- { '../logger': 33 },
- ],
- 17: [
- function (a, b, c) {
- function d(a, b, c) {
- var d,
- f,
- g,
- h,
- i = b.alpha,
- j = c.alpha,
- k = [];
- g = j + i * (1 - j);
- for (var l = 0; l < 3; l++)
- (d = b.rgb[l] / 255),
- (f = c.rgb[l] / 255),
- (h = a(d, f)),
- g && (h = (j * f + i * (d - j * (d + f - h))) / g),
- (k[l] = 255 * h);
- return new e(k, g);
- }
- var e = a('../tree/color'),
- f = a('./function-registry'),
- g = {
- multiply: function (a, b) {
- return a * b;
- },
- screen: function (a, b) {
- return a + b - a * b;
- },
- overlay: function (a, b) {
- return (a *= 2), a <= 1 ? g.multiply(a, b) : g.screen(a - 1, b);
- },
- softlight: function (a, b) {
- var c = 1,
- d = a;
- return (
- b > 0.5 &&
- ((d = 1),
- (c =
- a > 0.25 ? Math.sqrt(a) : ((16 * a - 12) * a + 4) * a)),
- a - (1 - 2 * b) * d * (c - a)
- );
- },
- hardlight: function (a, b) {
- return g.overlay(b, a);
- },
- difference: function (a, b) {
- return Math.abs(a - b);
- },
- exclusion: function (a, b) {
- return a + b - 2 * a * b;
- },
- average: function (a, b) {
- return (a + b) / 2;
- },
- negation: function (a, b) {
- return 1 - Math.abs(a + b - 1);
- },
- };
- for (var h in g) g.hasOwnProperty(h) && (d[h] = d.bind(null, g[h]));
- f.addMultiple(d);
- },
- { '../tree/color': 50, './function-registry': 22 },
- ],
- 18: [
- function (a, b, c) {
- function d(a) {
- return Math.min(1, Math.max(0, a));
- }
- function e(a) {
- return h.hsla(a.h, a.s, a.l, a.a);
- }
- function f(a) {
- if (a instanceof i)
- return parseFloat(a.unit.is('%') ? a.value / 100 : a.value);
- if ('number' == typeof a) return a;
- throw {
- type: 'Argument',
- message: 'color functions take numbers as parameters',
- };
- }
- function g(a, b) {
- return a instanceof i && a.unit.is('%')
- ? parseFloat((a.value * b) / 100)
- : f(a);
- }
- var h,
- i = a('../tree/dimension'),
- j = a('../tree/color'),
- k = a('../tree/quoted'),
- l = a('../tree/anonymous'),
- m = a('./function-registry');
- (h = {
- rgb: function (a, b, c) {
- return h.rgba(a, b, c, 1);
- },
- rgba: function (a, b, c, d) {
- var e = [a, b, c].map(function (a) {
- return g(a, 255);
- });
- return (d = f(d)), new j(e, d);
- },
- hsl: function (a, b, c) {
- return h.hsla(a, b, c, 1);
- },
- hsla: function (a, b, c, e) {
- function g(a) {
- return (
- (a = a < 0 ? a + 1 : a > 1 ? a - 1 : a),
- 6 * a < 1
- ? i + (j - i) * a * 6
- : 2 * a < 1
- ? j
- : 3 * a < 2
- ? i + (j - i) * (2 / 3 - a) * 6
- : i
- );
- }
- var i, j;
- return (
- (a = (f(a) % 360) / 360),
- (b = d(f(b))),
- (c = d(f(c))),
- (e = d(f(e))),
- (j = c <= 0.5 ? c * (b + 1) : c + b - c * b),
- (i = 2 * c - j),
- h.rgba(255 * g(a + 1 / 3), 255 * g(a), 255 * g(a - 1 / 3), e)
- );
- },
- hsv: function (a, b, c) {
- return h.hsva(a, b, c, 1);
- },
- hsva: function (a, b, c, d) {
- (a = ((f(a) % 360) / 360) * 360),
- (b = f(b)),
- (c = f(c)),
- (d = f(d));
- var e, g;
- (e = Math.floor((a / 60) % 6)), (g = a / 60 - e);
- var i = [c, c * (1 - b), c * (1 - g * b), c * (1 - (1 - g) * b)],
- j = [
- [0, 3, 1],
- [2, 0, 1],
- [1, 0, 3],
- [1, 2, 0],
- [3, 1, 0],
- [0, 1, 2],
- ];
- return h.rgba(
- 255 * i[j[e][0]],
- 255 * i[j[e][1]],
- 255 * i[j[e][2]],
- d
- );
- },
- hue: function (a) {
- return new i(a.toHSL().h);
- },
- saturation: function (a) {
- return new i(100 * a.toHSL().s, '%');
- },
- lightness: function (a) {
- return new i(100 * a.toHSL().l, '%');
- },
- hsvhue: function (a) {
- return new i(a.toHSV().h);
- },
- hsvsaturation: function (a) {
- return new i(100 * a.toHSV().s, '%');
- },
- hsvvalue: function (a) {
- return new i(100 * a.toHSV().v, '%');
- },
- red: function (a) {
- return new i(a.rgb[0]);
- },
- green: function (a) {
- return new i(a.rgb[1]);
- },
- blue: function (a) {
- return new i(a.rgb[2]);
- },
- alpha: function (a) {
- return new i(a.toHSL().a);
- },
- luma: function (a) {
- return new i(a.luma() * a.alpha * 100, '%');
- },
- luminance: function (a) {
- var b =
- (0.2126 * a.rgb[0]) / 255 +
- (0.7152 * a.rgb[1]) / 255 +
- (0.0722 * a.rgb[2]) / 255;
- return new i(b * a.alpha * 100, '%');
- },
- saturate: function (a, b, c) {
- if (!a.rgb) return null;
- var f = a.toHSL();
- return (
- (f.s +=
- 'undefined' != typeof c && 'relative' === c.value
- ? (f.s * b.value) / 100
- : b.value / 100),
- (f.s = d(f.s)),
- e(f)
- );
- },
- desaturate: function (a, b, c) {
- var f = a.toHSL();
- return (
- (f.s -=
- 'undefined' != typeof c && 'relative' === c.value
- ? (f.s * b.value) / 100
- : b.value / 100),
- (f.s = d(f.s)),
- e(f)
- );
- },
- lighten: function (a, b, c) {
- var f = a.toHSL();
- return (
- (f.l +=
- 'undefined' != typeof c && 'relative' === c.value
- ? (f.l * b.value) / 100
- : b.value / 100),
- (f.l = d(f.l)),
- e(f)
- );
- },
- darken: function (a, b, c) {
- var f = a.toHSL();
- return (
- (f.l -=
- 'undefined' != typeof c && 'relative' === c.value
- ? (f.l * b.value) / 100
- : b.value / 100),
- (f.l = d(f.l)),
- e(f)
- );
- },
- fadein: function (a, b, c) {
- var f = a.toHSL();
- return (
- (f.a +=
- 'undefined' != typeof c && 'relative' === c.value
- ? (f.a * b.value) / 100
- : b.value / 100),
- (f.a = d(f.a)),
- e(f)
- );
- },
- fadeout: function (a, b, c) {
- var f = a.toHSL();
- return (
- (f.a -=
- 'undefined' != typeof c && 'relative' === c.value
- ? (f.a * b.value) / 100
- : b.value / 100),
- (f.a = d(f.a)),
- e(f)
- );
- },
- fade: function (a, b) {
- var c = a.toHSL();
- return (c.a = b.value / 100), (c.a = d(c.a)), e(c);
- },
- spin: function (a, b) {
- var c = a.toHSL(),
- d = (c.h + b.value) % 360;
- return (c.h = d < 0 ? 360 + d : d), e(c);
- },
- mix: function (a, b, c) {
- (a.toHSL && b.toHSL) || (console.log(b.type), console.dir(b)),
- c || (c = new i(50));
- var d = c.value / 100,
- e = 2 * d - 1,
- f = a.toHSL().a - b.toHSL().a,
- g = ((e * f == -1 ? e : (e + f) / (1 + e * f)) + 1) / 2,
- h = 1 - g,
- k = [
- a.rgb[0] * g + b.rgb[0] * h,
- a.rgb[1] * g + b.rgb[1] * h,
- a.rgb[2] * g + b.rgb[2] * h,
- ],
- l = a.alpha * d + b.alpha * (1 - d);
- return new j(k, l);
- },
- greyscale: function (a) {
- return h.desaturate(a, new i(100));
- },
- contrast: function (a, b, c, d) {
- if (!a.rgb) return null;
- if (
- ('undefined' == typeof c && (c = h.rgba(255, 255, 255, 1)),
- 'undefined' == typeof b && (b = h.rgba(0, 0, 0, 1)),
- b.luma() > c.luma())
- ) {
- var e = c;
- (c = b), (b = e);
- }
- return (
- (d = 'undefined' == typeof d ? 0.43 : f(d)),
- a.luma() < d ? c : b
- );
- },
- argb: function (a) {
- return new l(a.toARGB());
- },
- color: function (a) {
- if (
- a instanceof k &&
- /^#([a-f0-9]{6}|[a-f0-9]{3})$/i.test(a.value)
- )
- return new j(a.value.slice(1));
- if (a instanceof j || (a = j.fromKeyword(a.value)))
- return (a.value = void 0), a;
- throw {
- type: 'Argument',
- message:
- 'argument must be a color keyword or 3/6 digit hex e.g. #FFF',
- };
- },
- tint: function (a, b) {
- return h.mix(h.rgb(255, 255, 255), a, b);
- },
- shade: function (a, b) {
- return h.mix(h.rgb(0, 0, 0), a, b);
- },
- }),
- m.addMultiple(h);
- },
- {
- '../tree/anonymous': 46,
- '../tree/color': 50,
- '../tree/dimension': 56,
- '../tree/quoted': 73,
- './function-registry': 22,
- },
- ],
- 19: [
- function (a, b, c) {
- b.exports = function (b) {
- var c = a('../tree/quoted'),
- d = a('../tree/url'),
- e = a('./function-registry'),
- f = function (a, b) {
- return new d(b, a.index, a.currentFileInfo).eval(a.context);
- },
- g = a('../logger');
- e.add('data-uri', function (a, e) {
- e || ((e = a), (a = null));
- var h = a && a.value,
- i = e.value,
- j = this.currentFileInfo,
- k = j.relativeUrls ? j.currentDirectory : j.entryPath,
- l = i.indexOf('#'),
- m = '';
- l !== -1 && ((m = i.slice(l)), (i = i.slice(0, l)));
- var n = b.getFileManager(i, k, this.context, b, !0);
- if (!n) return f(this, e);
- var o = !1;
- if (a) o = /;base64$/.test(h);
- else {
- if (((h = b.mimeLookup(i)), 'image/svg+xml' === h)) o = !1;
- else {
- var p = b.charsetLookup(h);
- o = ['US-ASCII', 'UTF-8'].indexOf(p) < 0;
- }
- o && (h += ';base64');
- }
- var q = n.loadFileSync(i, k, this.context, b);
- if (!q.contents)
- return (
- g.warn(
- 'Skipped data-uri embedding of ' +
- i +
- ' because file not found'
- ),
- f(this, e || a)
- );
- var r = q.contents;
- if (o && !b.encodeBase64) return f(this, e);
- r = o ? b.encodeBase64(r) : encodeURIComponent(r);
- var s = 'data:' + h + ',' + r + m,
- t = 32768;
- return s.length >= t && this.context.ieCompat !== !1
- ? (g.warn(
- 'Skipped data-uri embedding of ' +
- i +
- ' because its size (' +
- s.length +
- ' characters) exceeds IE8-safe ' +
- t +
- ' characters!'
- ),
- f(this, e || a))
- : new d(
- new c(
- '"' + s + '"',
- s,
- !1,
- this.index,
- this.currentFileInfo
- ),
- this.index,
- this.currentFileInfo
- );
- });
- };
- },
- {
- '../logger': 33,
- '../tree/quoted': 73,
- '../tree/url': 80,
- './function-registry': 22,
- },
- ],
- 20: [
- function (a, b, c) {
- var d = a('../tree/keyword'),
- e = a('./function-registry'),
- f = {
- eval: function () {
- var a = this.value_,
- b = this.error_;
- if (b) throw b;
- if (null != a) return a ? d.True : d.False;
- },
- value: function (a) {
- this.value_ = a;
- },
- error: function (a) {
- this.error_ = a;
- },
- reset: function () {
- this.value_ = this.error_ = null;
- },
- };
- e.add('default', f.eval.bind(f)), (b.exports = f);
- },
- { '../tree/keyword': 65, './function-registry': 22 },
- ],
- 21: [
- function (a, b, c) {
- var d = a('../tree/expression'),
- e = function (a, b, c, d) {
- (this.name = a.toLowerCase()),
- (this.index = c),
- (this.context = b),
- (this.currentFileInfo = d),
- (this.func = b.frames[0].functionRegistry.get(this.name));
- };
- (e.prototype.isValid = function () {
- return Boolean(this.func);
- }),
- (e.prototype.call = function (a) {
- return (
- Array.isArray(a) &&
- (a = a
- .filter(function (a) {
- return 'Comment' !== a.type;
- })
- .map(function (a) {
- if ('Expression' === a.type) {
- var b = a.value.filter(function (a) {
- return 'Comment' !== a.type;
- });
- return 1 === b.length ? b[0] : new d(b);
- }
- return a;
- })),
- this.func.apply(this, a)
- );
- }),
- (b.exports = e);
- },
- { '../tree/expression': 59 },
- ],
- 22: [
- function (a, b, c) {
- function d(a) {
- return {
- _data: {},
- add: function (a, b) {
- (a = a.toLowerCase()),
- this._data.hasOwnProperty(a),
- (this._data[a] = b);
- },
- addMultiple: function (a) {
- Object.keys(a).forEach(
- function (b) {
- this.add(b, a[b]);
- }.bind(this)
- );
- },
- get: function (b) {
- return this._data[b] || (a && a.get(b));
- },
- inherit: function () {
- return d(this);
- },
- };
- }
- b.exports = d(null);
- },
- {},
- ],
- 23: [
- function (a, b, c) {
- b.exports = function (b) {
- var c = {
- functionRegistry: a('./function-registry'),
- functionCaller: a('./function-caller'),
- };
- return (
- a('./default'),
- a('./color'),
- a('./color-blending'),
- a('./data-uri')(b),
- a('./math'),
- a('./number'),
- a('./string'),
- a('./svg')(b),
- a('./types'),
- c
- );
- };
- },
- {
- './color': 18,
- './color-blending': 17,
- './data-uri': 19,
- './default': 20,
- './function-caller': 21,
- './function-registry': 22,
- './math': 25,
- './number': 26,
- './string': 27,
- './svg': 28,
- './types': 29,
- },
- ],
- 24: [
- function (a, b, c) {
- var d = a('../tree/dimension'),
- e = function () {};
- (e._math = function (a, b, c) {
- if (!(c instanceof d))
- throw { type: 'Argument', message: 'argument must be a number' };
- return (
- null == b ? (b = c.unit) : (c = c.unify()),
- new d(a(parseFloat(c.value)), b)
- );
- }),
- (b.exports = e);
- },
- { '../tree/dimension': 56 },
- ],
- 25: [
- function (a, b, c) {
- var d = a('./function-registry'),
- e = a('./math-helper.js'),
- f = {
- ceil: null,
- floor: null,
- sqrt: null,
- abs: null,
- tan: '',
- sin: '',
- cos: '',
- atan: 'rad',
- asin: 'rad',
- acos: 'rad',
- };
- for (var g in f)
- f.hasOwnProperty(g) && (f[g] = e._math.bind(null, Math[g], f[g]));
- (f.round = function (a, b) {
- var c = 'undefined' == typeof b ? 0 : b.value;
- return e._math(
- function (a) {
- return a.toFixed(c);
- },
- null,
- a
- );
- }),
- d.addMultiple(f);
- },
- { './function-registry': 22, './math-helper.js': 24 },
- ],
- 26: [
- function (a, b, c) {
- var d = a('../tree/dimension'),
- e = a('../tree/anonymous'),
- f = a('./function-registry'),
- g = a('./math-helper.js'),
- h = function (a, b) {
- switch (((b = Array.prototype.slice.call(b)), b.length)) {
- case 0:
- throw {
- type: 'Argument',
- message: 'one or more arguments required',
- };
- }
- var c,
- f,
- g,
- h,
- i,
- j,
- k,
- l,
- m = [],
- n = {};
- for (c = 0; c < b.length; c++)
- if (((g = b[c]), g instanceof d))
- if (
- ((h =
- '' === g.unit.toString() && void 0 !== l
- ? new d(g.value, l).unify()
- : g.unify()),
- (j =
- '' === h.unit.toString() && void 0 !== k
- ? k
- : h.unit.toString()),
- (k =
- ('' !== j && void 0 === k) ||
- ('' !== j && '' === m[0].unify().unit.toString())
- ? j
- : k),
- (l = '' !== j && void 0 === l ? g.unit.toString() : l),
- (f =
- void 0 !== n[''] && '' !== j && j === k ? n[''] : n[j]),
- void 0 !== f)
- )
- (i =
- '' === m[f].unit.toString() && void 0 !== l
- ? new d(m[f].value, l).unify()
- : m[f].unify()),
- ((a && h.value < i.value) || (!a && h.value > i.value)) &&
- (m[f] = g);
- else {
- if (void 0 !== k && j !== k)
- throw { type: 'Argument', message: 'incompatible types' };
- (n[j] = m.length), m.push(g);
- }
- else
- Array.isArray(b[c].value) &&
- Array.prototype.push.apply(
- b,
- Array.prototype.slice.call(b[c].value)
- );
- return 1 == m.length
- ? m[0]
- : ((b = m
- .map(function (a) {
- return a.toCSS(this.context);
- })
- .join(this.context.compress ? ',' : ', ')),
- new e((a ? 'min' : 'max') + '(' + b + ')'));
- };
- f.addMultiple({
- min: function () {
- return h(!0, arguments);
- },
- max: function () {
- return h(!1, arguments);
- },
- convert: function (a, b) {
- return a.convertTo(b.value);
- },
- pi: function () {
- return new d(Math.PI);
- },
- mod: function (a, b) {
- return new d(a.value % b.value, a.unit);
- },
- pow: function (a, b) {
- if ('number' == typeof a && 'number' == typeof b)
- (a = new d(a)), (b = new d(b));
- else if (!(a instanceof d && b instanceof d))
- throw {
- type: 'Argument',
- message: 'arguments must be numbers',
- };
- return new d(Math.pow(a.value, b.value), a.unit);
- },
- percentage: function (a) {
- var b = g._math(
- function (a) {
- return 100 * a;
- },
- '%',
- a
- );
- return b;
- },
- });
- },
- {
- '../tree/anonymous': 46,
- '../tree/dimension': 56,
- './function-registry': 22,
- './math-helper.js': 24,
- },
- ],
- 27: [
- function (a, b, c) {
- var d = a('../tree/quoted'),
- e = a('../tree/anonymous'),
- f = a('../tree/javascript'),
- g = a('./function-registry');
- g.addMultiple({
- e: function (a) {
- return new e(a instanceof f ? a.evaluated : a.value);
- },
- escape: function (a) {
- return new e(
- encodeURI(a.value)
- .replace(/=/g, '%3D')
- .replace(/:/g, '%3A')
- .replace(/#/g, '%23')
- .replace(/;/g, '%3B')
- .replace(/\(/g, '%28')
- .replace(/\)/g, '%29')
- );
- },
- replace: function (a, b, c, e) {
- var f = a.value;
- return (
- (c = 'Quoted' === c.type ? c.value : c.toCSS()),
- (f = f.replace(new RegExp(b.value, e ? e.value : ''), c)),
- new d(a.quote || '', f, a.escaped)
- );
- },
- '%': function (a) {
- for (
- var b = Array.prototype.slice.call(arguments, 1),
- c = a.value,
- e = 0;
- e < b.length;
- e++
- )
- c = c.replace(/%[sda]/i, function (a) {
- var c =
- 'Quoted' === b[e].type && a.match(/s/i)
- ? b[e].value
- : b[e].toCSS();
- return a.match(/[A-Z]$/) ? encodeURIComponent(c) : c;
- });
- return (
- (c = c.replace(/%%/g, '%')), new d(a.quote || '', c, a.escaped)
- );
- },
- });
- },
- {
- '../tree/anonymous': 46,
- '../tree/javascript': 63,
- '../tree/quoted': 73,
- './function-registry': 22,
- },
- ],
- 28: [
- function (a, b, c) {
- b.exports = function (b) {
- var c = a('../tree/dimension'),
- d = a('../tree/color'),
- e = a('../tree/expression'),
- f = a('../tree/quoted'),
- g = a('../tree/url'),
- h = a('./function-registry');
- h.add('svg-gradient', function (a) {
- function b() {
- throw {
- type: 'Argument',
- message:
- 'svg-gradient expects direction, start_color [start_position], [color position,]..., end_color [end_position] or direction, color list',
- };
- }
- var h,
- i,
- j,
- k,
- l,
- m,
- n,
- o,
- p = 'linear',
- q = 'x="0" y="0" width="1" height="1"',
- r = { compress: !1 },
- s = a.toCSS(r);
- switch (
- (2 == arguments.length
- ? (arguments[1].value.length < 2 && b(),
- (h = arguments[1].value))
- : arguments.length < 3
- ? b()
- : (h = Array.prototype.slice.call(arguments, 1)),
- s)
- ) {
- case 'to bottom':
- i = 'x1="0%" y1="0%" x2="0%" y2="100%"';
- break;
- case 'to right':
- i = 'x1="0%" y1="0%" x2="100%" y2="0%"';
- break;
- case 'to bottom right':
- i = 'x1="0%" y1="0%" x2="100%" y2="100%"';
- break;
- case 'to top right':
- i = 'x1="0%" y1="100%" x2="100%" y2="0%"';
- break;
- case 'ellipse':
- case 'ellipse at center':
- (p = 'radial'),
- (i = 'cx="50%" cy="50%" r="75%"'),
- (q = 'x="-50" y="-50" width="101" height="101"');
- break;
- default:
- throw {
- type: 'Argument',
- message:
- "svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'ellipse at center'",
- };
- }
- for (
- j =
- '<?xml version="1.0" ?><svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none"><' +
- p +
- 'Gradient id="gradient" gradientUnits="userSpaceOnUse" ' +
- i +
- '>',
- k = 0;
- k < h.length;
- k += 1
- )
- h[k] instanceof e
- ? ((l = h[k].value[0]), (m = h[k].value[1]))
- : ((l = h[k]), (m = void 0)),
- (l instanceof d &&
- (((0 === k || k + 1 === h.length) && void 0 === m) ||
- m instanceof c)) ||
- b(),
- (n = m ? m.toCSS(r) : 0 === k ? '0%' : '100%'),
- (o = l.alpha),
- (j +=
- '<stop offset="' +
- n +
- '" stop-color="' +
- l.toRGB() +
- '"' +
- (o < 1 ? ' stop-opacity="' + o + '"' : '') +
- '/>');
- return (
- (j +=
- '</' +
- p +
- 'Gradient><rect ' +
- q +
- ' fill="url(#gradient)" /></svg>'),
- (j = encodeURIComponent(j)),
- (j = 'data:image/svg+xml,' + j),
- new g(
- new f("'" + j + "'", j, !1, this.index, this.currentFileInfo),
- this.index,
- this.currentFileInfo
- )
- );
- });
- };
- },
- {
- '../tree/color': 50,
- '../tree/dimension': 56,
- '../tree/expression': 59,
- '../tree/quoted': 73,
- '../tree/url': 80,
- './function-registry': 22,
- },
- ],
- 29: [
- function (a, b, c) {
- var d = a('../tree/keyword'),
- e = a('../tree/detached-ruleset'),
- f = a('../tree/dimension'),
- g = a('../tree/color'),
- h = a('../tree/quoted'),
- i = a('../tree/anonymous'),
- j = a('../tree/url'),
- k = a('../tree/operation'),
- l = a('./function-registry'),
- m = function (a, b) {
- return a instanceof b ? d.True : d.False;
- },
- n = function (a, b) {
- if (void 0 === b)
- throw {
- type: 'Argument',
- message: 'missing the required second argument to isunit.',
- };
- if (
- ((b = 'string' == typeof b.value ? b.value : b),
- 'string' != typeof b)
- )
- throw {
- type: 'Argument',
- message:
- 'Second argument to isunit should be a unit or a string.',
- };
- return a instanceof f && a.unit.is(b) ? d.True : d.False;
- },
- o = function (a) {
- var b = Array.isArray(a.value) ? a.value : Array(a);
- return b;
- };
- l.addMultiple({
- isruleset: function (a) {
- return m(a, e);
- },
- iscolor: function (a) {
- return m(a, g);
- },
- isnumber: function (a) {
- return m(a, f);
- },
- isstring: function (a) {
- return m(a, h);
- },
- iskeyword: function (a) {
- return m(a, d);
- },
- isurl: function (a) {
- return m(a, j);
- },
- ispixel: function (a) {
- return n(a, 'px');
- },
- ispercentage: function (a) {
- return n(a, '%');
- },
- isem: function (a) {
- return n(a, 'em');
- },
- isunit: n,
- unit: function (a, b) {
- if (!(a instanceof f))
- throw {
- type: 'Argument',
- message:
- 'the first argument to unit must be a number' +
- (a instanceof k ? '. Have you forgotten parenthesis?' : ''),
- };
- return (
- (b = b ? (b instanceof d ? b.value : b.toCSS()) : ''),
- new f(a.value, b)
- );
- },
- 'get-unit': function (a) {
- return new i(a.unit);
- },
- extract: function (a, b) {
- return (b = b.value - 1), o(a)[b];
- },
- length: function (a) {
- return new f(o(a).length);
- },
- });
- },
- {
- '../tree/anonymous': 46,
- '../tree/color': 50,
- '../tree/detached-ruleset': 55,
- '../tree/dimension': 56,
- '../tree/keyword': 65,
- '../tree/operation': 71,
- '../tree/quoted': 73,
- '../tree/url': 80,
- './function-registry': 22,
- },
- ],
- 30: [
- function (a, b, c) {
- var d = a('./contexts'),
- e = a('./parser/parser'),
- f = a('./plugins/function-importer');
- b.exports = function (a) {
- var b = function (a, b) {
- (this.rootFilename = b.filename),
- (this.paths = a.paths || []),
- (this.contents = {}),
- (this.contentsIgnoredChars = {}),
- (this.mime = a.mime),
- (this.error = null),
- (this.context = a),
- (this.queue = []),
- (this.files = {});
- };
- return (
- (b.prototype.push = function (b, c, g, h, i) {
- var j = this;
- this.queue.push(b);
- var k = function (a, c, d) {
- j.queue.splice(j.queue.indexOf(b), 1);
- var e = d === j.rootFilename;
- h.optional && a
- ? i(null, { rules: [] }, !1, null)
- : ((j.files[d] = c),
- a && !j.error && (j.error = a),
- i(a, c, e, d));
- },
- l = {
- relativeUrls: this.context.relativeUrls,
- entryPath: g.entryPath,
- rootpath: g.rootpath,
- rootFilename: g.rootFilename,
- },
- m = a.getFileManager(b, g.currentDirectory, this.context, a);
- if (!m)
- return void k({
- message: 'Could not find a file-manager for ' + b,
- });
- c && (b = m.tryAppendExtension(b, h.plugin ? '.js' : '.less'));
- var n = function (a) {
- var b = a.filename,
- c = a.contents.replace(/^\uFEFF/, '');
- (l.currentDirectory = m.getPath(b)),
- l.relativeUrls &&
- ((l.rootpath = m.join(
- j.context.rootpath || '',
- m.pathDiff(l.currentDirectory, l.entryPath)
- )),
- !m.isPathAbsolute(l.rootpath) &&
- m.alwaysMakePathsAbsolute() &&
- (l.rootpath = m.join(l.entryPath, l.rootpath))),
- (l.filename = b);
- var i = new d.Parse(j.context);
- (i.processImports = !1),
- (j.contents[b] = c),
- (g.reference || h.reference) && (l.reference = !0),
- h.plugin
- ? new f(i, l).eval(c, function (a, c) {
- k(a, c, b);
- })
- : h.inline
- ? k(null, c, b)
- : new e(i, j, l).parse(c, function (a, c) {
- k(a, c, b);
- });
- },
- o = m.loadFile(
- b,
- g.currentDirectory,
- this.context,
- a,
- function (a, b) {
- a ? k(a) : n(b);
- }
- );
- o && o.then(n, k);
- }),
- b
- );
- };
- },
- {
- './contexts': 11,
- './parser/parser': 38,
- './plugins/function-importer': 40,
- },
- ],
- 31: [
- function (a, b, c) {
- b.exports = function (b, c) {
- var d,
- e,
- f,
- g,
- h,
- i = {
- version: [2, 7, 2],
- data: a('./data'),
- tree: a('./tree'),
- Environment: (h = a('./environment/environment')),
- AbstractFileManager: a('./environment/abstract-file-manager'),
- environment: (b = new h(b, c)),
- visitors: a('./visitors'),
- Parser: a('./parser/parser'),
- functions: a('./functions')(b),
- contexts: a('./contexts'),
- SourceMapOutput: (d = a('./source-map-output')(b)),
- SourceMapBuilder: (e = a('./source-map-builder')(d, b)),
- ParseTree: (f = a('./parse-tree')(e)),
- ImportManager: (g = a('./import-manager')(b)),
- render: a('./render')(b, f, g),
- parse: a('./parse')(b, f, g),
- LessError: a('./less-error'),
- transformTree: a('./transform-tree'),
- utils: a('./utils'),
- PluginManager: a('./plugin-manager'),
- logger: a('./logger'),
- };
- return i;
- };
- },
- {
- './contexts': 11,
- './data': 13,
- './environment/abstract-file-manager': 15,
- './environment/environment': 16,
- './functions': 23,
- './import-manager': 30,
- './less-error': 32,
- './logger': 33,
- './parse': 35,
- './parse-tree': 34,
- './parser/parser': 38,
- './plugin-manager': 39,
- './render': 41,
- './source-map-builder': 42,
- './source-map-output': 43,
- './transform-tree': 44,
- './tree': 62,
- './utils': 83,
- './visitors': 87,
- },
- ],
- 32: [
- function (a, b, c) {
- var d = a('./utils'),
- e = (b.exports = function (a, b, c) {
- Error.call(this);
- var e = a.filename || c;
- if (b && e) {
- var f = b.contents[e],
- g = d.getLocation(a.index, f),
- h = g.line,
- i = g.column,
- j = a.call && d.getLocation(a.call, f).line,
- k = f.split('\n');
- (this.type = a.type || 'Syntax'),
- (this.filename = e),
- (this.index = a.index),
- (this.line = 'number' == typeof h ? h + 1 : null),
- (this.callLine = j + 1),
- (this.callExtract = k[j]),
- (this.column = i),
- (this.extract = [k[h - 1], k[h], k[h + 1]]);
- }
- (this.message = a.message), (this.stack = a.stack);
- });
- if ('undefined' == typeof Object.create) {
- var f = function () {};
- (f.prototype = Error.prototype), (e.prototype = new f());
- } else e.prototype = Object.create(Error.prototype);
- e.prototype.constructor = e;
- },
- { './utils': 83 },
- ],
- 33: [
- function (a, b, c) {
- b.exports = {
- error: function (a) {
- this._fireEvent('error', a);
- },
- warn: function (a) {
- this._fireEvent('warn', a);
- },
- info: function (a) {
- this._fireEvent('info', a);
- },
- debug: function (a) {
- this._fireEvent('debug', a);
- },
- addListener: function (a) {
- this._listeners.push(a);
- },
- removeListener: function (a) {
- for (var b = 0; b < this._listeners.length; b++)
- if (this._listeners[b] === a)
- return void this._listeners.splice(b, 1);
- },
- _fireEvent: function (a, b) {
- for (var c = 0; c < this._listeners.length; c++) {
- var d = this._listeners[c][a];
- d && d(b);
- }
- },
- _listeners: [],
- };
- },
- {},
- ],
- 34: [
- function (a, b, c) {
- var d = a('./less-error'),
- e = a('./transform-tree'),
- f = a('./logger');
- b.exports = function (a) {
- var b = function (a, b) {
- (this.root = a), (this.imports = b);
- };
- return (
- (b.prototype.toCSS = function (b) {
- var c,
- g,
- h = {};
- try {
- c = e(this.root, b);
- } catch (i) {
- throw new d(i, this.imports);
- }
- try {
- var j = Boolean(b.compress);
- j &&
- f.warn(
- 'The compress option has been deprecated. We recommend you use a dedicated css minifier, for instance see less-plugin-clean-css.'
- );
- var k = {
- compress: j,
- dumpLineNumbers: b.dumpLineNumbers,
- strictUnits: Boolean(b.strictUnits),
- numPrecision: 8,
- };
- b.sourceMap
- ? ((g = new a(b.sourceMap)),
- (h.css = g.toCSS(c, k, this.imports)))
- : (h.css = c.toCSS(k));
- } catch (i) {
- throw new d(i, this.imports);
- }
- if (b.pluginManager)
- for (
- var l = b.pluginManager.getPostProcessors(), m = 0;
- m < l.length;
- m++
- )
- h.css = l[m].process(h.css, {
- sourceMap: g,
- options: b,
- imports: this.imports,
- });
- b.sourceMap && (h.map = g.getExternalSourceMap()),
- (h.imports = []);
- for (var n in this.imports.files)
- this.imports.files.hasOwnProperty(n) &&
- n !== this.imports.rootFilename &&
- h.imports.push(n);
- return h;
- }),
- b
- );
- };
- },
- { './less-error': 32, './logger': 33, './transform-tree': 44 },
- ],
- 35: [
- function (a, b, c) {
- var d,
- e = a('./contexts'),
- f = a('./parser/parser'),
- g = a('./plugin-manager');
- b.exports = function (b, c, h) {
- var i = function (b, c, j) {
- if (
- ((c = c || {}),
- 'function' == typeof c && ((j = c), (c = {})),
- !j)
- ) {
- d ||
- (d = 'undefined' == typeof Promise ? a('promise') : Promise);
- var k = this;
- return new d(function (a, d) {
- i.call(k, b, c, function (b, c) {
- b ? d(b) : a(c);
- });
- });
- }
- var l,
- m,
- n = new g(this);
- if (
- (n.addPlugins(c.plugins),
- (c.pluginManager = n),
- (l = new e.Parse(c)),
- c.rootFileInfo)
- )
- m = c.rootFileInfo;
- else {
- var o = c.filename || 'input',
- p = o.replace(/[^\/\\]*$/, '');
- (m = {
- filename: o,
- relativeUrls: l.relativeUrls,
- rootpath: l.rootpath || '',
- currentDirectory: p,
- entryPath: p,
- rootFilename: o,
- }),
- m.rootpath &&
- '/' !== m.rootpath.slice(-1) &&
- (m.rootpath += '/');
- }
- var q = new h(l, m);
- new f(l, q, m).parse(
- b,
- function (a, b) {
- return a ? j(a) : void j(null, b, q, c);
- },
- c
- );
- };
- return i;
- };
- },
- {
- './contexts': 11,
- './parser/parser': 38,
- './plugin-manager': 39,
- promise: void 0,
- },
- ],
- 36: [
- function (a, b, c) {
- b.exports = function (a, b) {
- function c(b) {
- var c = h - q;
- (c < 512 && !b) || !c || (p.push(a.slice(q, h + 1)), (q = h + 1));
- }
- var d,
- e,
- f,
- g,
- h,
- i,
- j,
- k,
- l,
- m = a.length,
- n = 0,
- o = 0,
- p = [],
- q = 0;
- for (h = 0; h < m; h++)
- if (((j = a.charCodeAt(h)), !((j >= 97 && j <= 122) || j < 34)))
- switch (j) {
- case 40:
- o++, (e = h);
- continue;
- case 41:
- if (--o < 0) return b('missing opening `(`', h);
- continue;
- case 59:
- o || c();
- continue;
- case 123:
- n++, (d = h);
- continue;
- case 125:
- if (--n < 0) return b('missing opening `{`', h);
- n || o || c();
- continue;
- case 92:
- if (h < m - 1) {
- h++;
- continue;
- }
- return b('unescaped `\\`', h);
- case 34:
- case 39:
- case 96:
- for (l = 0, i = h, h += 1; h < m; h++)
- if (((k = a.charCodeAt(h)), !(k > 96))) {
- if (k == j) {
- l = 1;
- break;
- }
- if (92 == k) {
- if (h == m - 1) return b('unescaped `\\`', h);
- h++;
- }
- }
- if (l) continue;
- return b('unmatched `' + String.fromCharCode(j) + '`', i);
- case 47:
- if (o || h == m - 1) continue;
- if (((k = a.charCodeAt(h + 1)), 47 == k))
- for (
- h += 2;
- h < m &&
- ((k = a.charCodeAt(h)),
- !(k <= 13) || (10 != k && 13 != k));
- h++
- );
- else if (42 == k) {
- for (
- f = i = h, h += 2;
- h < m - 1 &&
- ((k = a.charCodeAt(h)),
- 125 == k && (g = h),
- 42 != k || 47 != a.charCodeAt(h + 1));
- h++
- );
- if (h == m - 1) return b('missing closing `*/`', i);
- h++;
- }
- continue;
- case 42:
- if (h < m - 1 && 47 == a.charCodeAt(h + 1))
- return b('unmatched `/*`', h);
- continue;
- }
- return 0 !== n
- ? f > d && g > f
- ? b('missing closing `}` or `*/`', d)
- : b('missing closing `}`', d)
- : 0 !== o
- ? b('missing closing `)`', e)
- : (c(!0), p);
- };
- },
- {},
- ],
- 37: [
- function (a, b, c) {
- var d = a('./chunker');
- b.exports = function () {
- function a(d) {
- for (
- var e,
- f,
- j,
- p = k.i,
- q = c,
- s = k.i - i,
- t = k.i + h.length - s,
- u = (k.i += d),
- v = b;
- k.i < t;
- k.i++
- ) {
- if (((e = v.charCodeAt(k.i)), k.autoCommentAbsorb && e === r)) {
- if (((f = v.charAt(k.i + 1)), '/' === f)) {
- j = { index: k.i, isLineComment: !0 };
- var w = v.indexOf('\n', k.i + 2);
- w < 0 && (w = t),
- (k.i = w),
- (j.text = v.substr(j.index, k.i - j.index)),
- k.commentStore.push(j);
- continue;
- }
- if ('*' === f) {
- var x = v.indexOf('*/', k.i + 2);
- if (x >= 0) {
- (j = {
- index: k.i,
- text: v.substr(k.i, x + 2 - k.i),
- isLineComment: !1,
- }),
- (k.i += j.text.length - 1),
- k.commentStore.push(j);
- continue;
- }
- }
- break;
- }
- if (e !== l && e !== n && e !== m && e !== o) break;
- }
- if (((h = h.slice(d + k.i - u + s)), (i = k.i), !h.length)) {
- if (c < g.length - 1) return (h = g[++c]), a(0), !0;
- k.finished = !0;
- }
- return p !== k.i || q !== c;
- }
- var b,
- c,
- e,
- f,
- g,
- h,
- i,
- j = [],
- k = {},
- l = 32,
- m = 9,
- n = 10,
- o = 13,
- p = 43,
- q = 44,
- r = 47,
- s = 57;
- return (
- (k.save = function () {
- (i = k.i), j.push({ current: h, i: k.i, j: c });
- }),
- (k.restore = function (a) {
- (k.i > e || (k.i === e && a && !f)) && ((e = k.i), (f = a));
- var b = j.pop();
- (h = b.current), (i = k.i = b.i), (c = b.j);
- }),
- (k.forget = function () {
- j.pop();
- }),
- (k.isWhitespace = function (a) {
- var c = k.i + (a || 0),
- d = b.charCodeAt(c);
- return d === l || d === o || d === m || d === n;
- }),
- (k.$re = function (b) {
- k.i > i && ((h = h.slice(k.i - i)), (i = k.i));
- var c = b.exec(h);
- return c
- ? (a(c[0].length),
- 'string' == typeof c ? c : 1 === c.length ? c[0] : c)
- : null;
- }),
- (k.$char = function (c) {
- return b.charAt(k.i) !== c ? null : (a(1), c);
- }),
- (k.$str = function (c) {
- for (var d = c.length, e = 0; e < d; e++)
- if (b.charAt(k.i + e) !== c.charAt(e)) return null;
- return a(d), c;
- }),
- (k.$quoted = function () {
- var c = b.charAt(k.i);
- if ("'" === c || '"' === c) {
- for (var d = b.length, e = k.i, f = 1; f + e < d; f++) {
- var g = b.charAt(f + e);
- switch (g) {
- case '\\':
- f++;
- continue;
- case '\r':
- case '\n':
- break;
- case c:
- var h = b.substr(e, f + 1);
- return a(f + 1), h;
- }
- }
- return null;
- }
- }),
- (k.autoCommentAbsorb = !0),
- (k.commentStore = []),
- (k.finished = !1),
- (k.peek = function (a) {
- if ('string' == typeof a) {
- for (var c = 0; c < a.length; c++)
- if (b.charAt(k.i + c) !== a.charAt(c)) return !1;
- return !0;
- }
- return a.test(h);
- }),
- (k.peekChar = function (a) {
- return b.charAt(k.i) === a;
- }),
- (k.currentChar = function () {
- return b.charAt(k.i);
- }),
- (k.getInput = function () {
- return b;
- }),
- (k.peekNotNumeric = function () {
- var a = b.charCodeAt(k.i);
- return a > s || a < p || a === r || a === q;
- }),
- (k.start = function (f, j, l) {
- (b = f),
- (k.i = c = i = e = 0),
- (g = j ? d(f, l) : [f]),
- (h = g[0]),
- a(0);
- }),
- (k.end = function () {
- var a,
- c = k.i >= b.length;
- return (
- k.i < e && ((a = f), (k.i = e)),
- {
- isFinished: c,
- furthest: k.i,
- furthestPossibleErrorMessage: a,
- furthestReachedEnd: k.i >= b.length - 1,
- furthestChar: b[k.i],
- }
- );
- }),
- k
- );
- };
- },
- { './chunker': 36 },
- ],
- 38: [
- function (a, b, c) {
- var d = a('../less-error'),
- e = a('../tree'),
- f = a('../visitors'),
- g = a('./parser-input'),
- h = a('../utils'),
- i = function j(a, b, c) {
- function i(a, e) {
- throw new d(
- {
- index: o.i,
- filename: c.filename,
- type: e || 'Syntax',
- message: a,
- },
- b
- );
- }
- function k(a, b, c) {
- var d = a instanceof Function ? a.call(n) : o.$re(a);
- return d
- ? d
- : void i(
- b ||
- ('string' == typeof a
- ? "expected '" + a + "' got '" + o.currentChar() + "'"
- : 'unexpected token')
- );
- }
- function l(a, b) {
- return o.$char(a)
- ? a
- : void i(
- b || "expected '" + a + "' got '" + o.currentChar() + "'"
- );
- }
- function m(a) {
- var b = c.filename;
- return {
- lineNumber: h.getLocation(a, o.getInput()).line + 1,
- fileName: b,
- };
- }
- var n,
- o = g();
- return {
- parse: function (g, h, i) {
- var k,
- l,
- m,
- n,
- p = null,
- q = '';
- if (
- ((l =
- i && i.globalVars
- ? j.serializeVars(i.globalVars) + '\n'
- : ''),
- (m =
- i && i.modifyVars
- ? '\n' + j.serializeVars(i.modifyVars)
- : ''),
- a.pluginManager)
- )
- for (
- var r = a.pluginManager.getPreProcessors(), s = 0;
- s < r.length;
- s++
- )
- g = r[s].process(g, {
- context: a,
- imports: b,
- fileInfo: c,
- });
- (l || (i && i.banner)) &&
- ((q = (i && i.banner ? i.banner : '') + l),
- (n = b.contentsIgnoredChars),
- (n[c.filename] = n[c.filename] || 0),
- (n[c.filename] += q.length)),
- (g = g.replace(/\r\n?/g, '\n')),
- (g = q + g.replace(/^\uFEFF/, '') + m),
- (b.contents[c.filename] = g);
- try {
- o.start(g, a.chunkInput, function (a, e) {
- throw new d(
- {
- index: e,
- type: 'Parse',
- message: a,
- filename: c.filename,
- },
- b
- );
- }),
- (k = new e.Ruleset(null, this.parsers.primary())),
- (k.root = !0),
- (k.firstRoot = !0);
- } catch (t) {
- return h(new d(t, b, c.filename));
- }
- var u = o.end();
- if (!u.isFinished) {
- var v = u.furthestPossibleErrorMessage;
- v ||
- ((v = 'Unrecognised input'),
- '}' === u.furthestChar
- ? (v += ". Possibly missing opening '{'")
- : ')' === u.furthestChar
- ? (v += ". Possibly missing opening '('")
- : u.furthestReachedEnd &&
- (v += '. Possibly missing something')),
- (p = new d(
- {
- type: 'Parse',
- message: v,
- index: u.furthest,
- filename: c.filename,
- },
- b
- ));
- }
- var w = function (a) {
- return (
- (a = p || a || b.error),
- a
- ? (a instanceof d || (a = new d(a, b, c.filename)),
- h(a))
- : h(null, k)
- );
- };
- return a.processImports === !1
- ? w()
- : void new f.ImportVisitor(b, w).run(k);
- },
- parsers: (n = {
- primary: function () {
- for (var a, b = this.mixin, c = []; ; ) {
- for (;;) {
- if (((a = this.comment()), !a)) break;
- c.push(a);
- }
- if (o.finished) break;
- if (o.peek('}')) break;
- if ((a = this.extendRule())) c = c.concat(a);
- else if (
- (a =
- b.definition() ||
- this.rule() ||
- this.ruleset() ||
- b.call() ||
- this.rulesetCall() ||
- this.entities.call() ||
- this.directive())
- )
- c.push(a);
- else {
- for (var d = !1; o.$char(';'); ) d = !0;
- if (!d) break;
- }
- }
- return c;
- },
- comment: function () {
- if (o.commentStore.length) {
- var a = o.commentStore.shift();
- return new e.Comment(a.text, a.isLineComment, a.index, c);
- }
- },
- entities: {
- quoted: function () {
- var a,
- b = o.i,
- d = !1;
- return (
- o.save(),
- o.$char('~') && (d = !0),
- (a = o.$quoted())
- ? (o.forget(),
- new e.Quoted(
- a.charAt(0),
- a.substr(1, a.length - 2),
- d,
- b,
- c
- ))
- : void o.restore()
- );
- },
- keyword: function () {
- var a =
- o.$char('%') || o.$re(/^[_A-Za-z-][_A-Za-z0-9-]*/);
- if (a) return e.Color.fromKeyword(a) || new e.Keyword(a);
- },
- call: function () {
- var a,
- b,
- d,
- f,
- g = o.i;
- if (!o.peek(/^url\(/i))
- return (
- o.save(),
- (a = o.$re(/^([\w-]+|%|progid:[\w\.]+)\(/))
- ? ((a = a[1]),
- (b = a.toLowerCase()),
- 'alpha' === b && (f = n.alpha())
- ? (o.forget(), f)
- : ((d = this.arguments()),
- o.$char(')')
- ? (o.forget(), new e.Call(a, d, g, c))
- : void o.restore(
- "Could not parse call arguments or missing ')'"
- )))
- : void o.forget()
- );
- },
- arguments: function () {
- var a,
- b,
- c,
- d = [],
- f = [],
- g = [];
- for (o.save(); ; ) {
- if (
- ((c =
- n.detachedRuleset() ||
- this.assignment() ||
- n.expression()),
- !c)
- )
- break;
- (b = c),
- c.value && 1 == c.value.length && (b = c.value[0]),
- b && g.push(b),
- f.push(b),
- o.$char(',') ||
- ((o.$char(';') || a) &&
- ((a = !0),
- g.length > 1 && (b = new e.Value(g)),
- d.push(b),
- (g = [])));
- }
- return o.forget(), a ? d : f;
- },
- literal: function () {
- return (
- this.dimension() ||
- this.color() ||
- this.quoted() ||
- this.unicodeDescriptor()
- );
- },
- assignment: function () {
- var a, b;
- return (
- o.save(),
- (a = o.$re(/^\w+(?=\s?=)/i)) &&
- o.$char('=') &&
- (b = n.entity())
- ? (o.forget(), new e.Assignment(a, b))
- : void o.restore()
- );
- },
- url: function () {
- var a,
- b = o.i;
- return (
- (o.autoCommentAbsorb = !1),
- o.$str('url(')
- ? ((a =
- this.quoted() ||
- this.variable() ||
- o.$re(/^(?:(?:\\[\(\)'"])|[^\(\)'"])+/) ||
- ''),
- (o.autoCommentAbsorb = !0),
- l(')'),
- new e.URL(
- null != a.value || a instanceof e.Variable
- ? a
- : new e.Anonymous(a),
- b,
- c
- ))
- : void (o.autoCommentAbsorb = !0)
- );
- },
- variable: function () {
- var a,
- b = o.i;
- if ('@' === o.currentChar() && (a = o.$re(/^@@?[\w-]+/)))
- return new e.Variable(a, b, c);
- },
- variableCurly: function () {
- var a,
- b = o.i;
- if (
- '@' === o.currentChar() &&
- (a = o.$re(/^@\{([\w-]+)\}/))
- )
- return new e.Variable('@' + a[1], b, c);
- },
- color: function () {
- var a;
- if (
- '#' === o.currentChar() &&
- (a = o.$re(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/))
- ) {
- var b = a.input.match(/^#([\w]+).*/);
- return (
- (b = b[1]),
- b.match(/^[A-Fa-f0-9]+$/) ||
- i('Invalid HEX color code'),
- new e.Color(a[1], void 0, '#' + b)
- );
- }
- },
- colorKeyword: function () {
- o.save();
- var a = o.autoCommentAbsorb;
- o.autoCommentAbsorb = !1;
- var b = o.$re(/^[_A-Za-z-][_A-Za-z0-9-]+/);
- if (((o.autoCommentAbsorb = a), !b))
- return void o.forget();
- o.restore();
- var c = e.Color.fromKeyword(b);
- return c ? (o.$str(b), c) : void 0;
- },
- dimension: function () {
- if (!o.peekNotNumeric()) {
- var a = o.$re(/^([+-]?\d*\.?\d+)(%|[a-z_]+)?/i);
- return a ? new e.Dimension(a[1], a[2]) : void 0;
- }
- },
- unicodeDescriptor: function () {
- var a;
- if ((a = o.$re(/^U\+[0-9a-fA-F?]+(\-[0-9a-fA-F?]+)?/)))
- return new e.UnicodeDescriptor(a[0]);
- },
- javascript: function () {
- var a,
- b = o.i;
- o.save();
- var d = o.$char('~'),
- f = o.$char('`');
- return f
- ? (a = o.$re(/^[^`]*`/))
- ? (o.forget(),
- new e.JavaScript(
- a.substr(0, a.length - 1),
- Boolean(d),
- b,
- c
- ))
- : void o.restore('invalid javascript definition')
- : void o.restore();
- },
- },
- variable: function () {
- var a;
- if (
- '@' === o.currentChar() &&
- (a = o.$re(/^(@[\w-]+)\s*:/))
- )
- return a[1];
- },
- rulesetCall: function () {
- var a;
- if (
- '@' === o.currentChar() &&
- (a = o.$re(/^(@[\w-]+)\(\s*\)\s*;/))
- )
- return new e.RulesetCall(a[1]);
- },
- extend: function (a) {
- var b,
- d,
- f,
- g,
- h,
- j = o.i;
- if (o.$str(a ? '&:extend(' : ':extend(')) {
- do {
- for (
- f = null, b = null;
- !(f = o.$re(/^(all)(?=\s*(\)|,))/)) &&
- (d = this.element());
-
- )
- b ? b.push(d) : (b = [d]);
- (f = f && f[1]),
- b || i('Missing target selector for :extend().'),
- (h = new e.Extend(new e.Selector(b), f, j, c)),
- g ? g.push(h) : (g = [h]);
- } while (o.$char(','));
- return k(/^\)/), a && k(/^;/), g;
- }
- },
- extendRule: function () {
- return this.extend(!0);
- },
- mixin: {
- call: function () {
- var a,
- b,
- d,
- f,
- g,
- h,
- i = o.currentChar(),
- j = !1,
- k = o.i;
- if ('.' === i || '#' === i) {
- for (o.save(); ; ) {
- if (
- ((a = o.i),
- (f = o.$re(
- /^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/
- )),
- !f)
- )
- break;
- (d = new e.Element(g, f, a, c)),
- b ? b.push(d) : (b = [d]),
- (g = o.$char('>'));
- }
- return b &&
- (o.$char('(') && ((h = this.args(!0).args), l(')')),
- n.important() && (j = !0),
- n.end())
- ? (o.forget(), new e.mixin.Call(b, h, k, c, j))
- : void o.restore();
- }
- },
- args: function (a) {
- var b,
- c,
- d,
- f,
- g,
- h,
- j,
- k = n.entities,
- l = { args: null, variadic: !1 },
- m = [],
- p = [],
- q = [];
- for (o.save(); ; ) {
- if (a) h = n.detachedRuleset() || n.expression();
- else {
- if (((o.commentStore.length = 0), o.$str('...'))) {
- (l.variadic = !0),
- o.$char(';') && !b && (b = !0),
- (b ? p : q).push({ variadic: !0 });
- break;
- }
- h = k.variable() || k.literal() || k.keyword();
- }
- if (!h) break;
- (f = null),
- h.throwAwayComments && h.throwAwayComments(),
- (g = h);
- var r = null;
- if (
- (a
- ? h.value && 1 == h.value.length && (r = h.value[0])
- : (r = h),
- r && r instanceof e.Variable)
- )
- if (o.$char(':')) {
- if (
- (m.length > 0 &&
- (b &&
- i('Cannot mix ; and , as delimiter types'),
- (c = !0)),
- (g = n.detachedRuleset() || n.expression()),
- !g)
- ) {
- if (!a) return o.restore(), (l.args = []), l;
- i(
- 'could not understand value for named argument'
- );
- }
- f = d = r.name;
- } else if (o.$str('...')) {
- if (!a) {
- (l.variadic = !0),
- o.$char(';') && !b && (b = !0),
- (b ? p : q).push({
- name: h.name,
- variadic: !0,
- });
- break;
- }
- j = !0;
- } else a || ((d = f = r.name), (g = null));
- g && m.push(g),
- q.push({ name: f, value: g, expand: j }),
- o.$char(',') ||
- ((o.$char(';') || b) &&
- (c && i('Cannot mix ; and , as delimiter types'),
- (b = !0),
- m.length > 1 && (g = new e.Value(m)),
- p.push({ name: d, value: g, expand: j }),
- (d = null),
- (m = []),
- (c = !1)));
- }
- return o.forget(), (l.args = b ? p : q), l;
- },
- definition: function () {
- var a,
- b,
- c,
- d,
- f = [],
- g = !1;
- if (
- !(
- ('.' !== o.currentChar() &&
- '#' !== o.currentChar()) ||
- o.peek(/^[^{]*\}/)
- )
- )
- if (
- (o.save(),
- (b = o.$re(
- /^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\(/
- )))
- ) {
- a = b[1];
- var h = this.args(!1);
- if (((f = h.args), (g = h.variadic), !o.$char(')')))
- return void o.restore("Missing closing ')'");
- if (
- ((o.commentStore.length = 0),
- o.$str('when') &&
- (d = k(n.conditions, 'expected condition')),
- (c = n.block()))
- )
- return (
- o.forget(), new e.mixin.Definition(a, f, c, d, g)
- );
- o.restore();
- } else o.forget();
- },
- },
- entity: function () {
- var a = this.entities;
- return (
- this.comment() ||
- a.literal() ||
- a.variable() ||
- a.url() ||
- a.call() ||
- a.keyword() ||
- a.javascript()
- );
- },
- end: function () {
- return o.$char(';') || o.peek('}');
- },
- alpha: function () {
- var a;
- if (o.$re(/^opacity=/i))
- return (
- (a = o.$re(/^\d+/)),
- a ||
- (a = k(
- this.entities.variable,
- 'Could not parse alpha'
- )),
- l(')'),
- new e.Alpha(a)
- );
- },
- element: function () {
- var a,
- b,
- d,
- f = o.i;
- if (
- ((b = this.combinator()),
- (a =
- o.$re(/^(?:\d+\.\d+|\d+)%/) ||
- o.$re(
- /^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/
- ) ||
- o.$char('*') ||
- o.$char('&') ||
- this.attribute() ||
- o.$re(/^\([^&()@]+\)/) ||
- o.$re(/^[\.#:](?=@)/) ||
- this.entities.variableCurly()),
- a ||
- (o.save(),
- o.$char('(')
- ? (d = this.selector()) && o.$char(')')
- ? ((a = new e.Paren(d)), o.forget())
- : o.restore("Missing closing ')'")
- : o.forget()),
- a)
- )
- return new e.Element(b, a, f, c);
- },
- combinator: function () {
- var a = o.currentChar();
- if ('/' === a) {
- o.save();
- var b = o.$re(/^\/[a-z]+\//i);
- if (b) return o.forget(), new e.Combinator(b);
- o.restore();
- }
- if (
- '>' === a ||
- '+' === a ||
- '~' === a ||
- '|' === a ||
- '^' === a
- ) {
- for (
- o.i++,
- '^' === a &&
- '^' === o.currentChar() &&
- ((a = '^^'), o.i++);
- o.isWhitespace();
-
- )
- o.i++;
- return new e.Combinator(a);
- }
- return new e.Combinator(o.isWhitespace(-1) ? ' ' : null);
- },
- lessSelector: function () {
- return this.selector(!0);
- },
- selector: function (a) {
- for (
- var b, d, f, g, h, j, l, m = o.i;
- ((a && (d = this.extend())) ||
- (a && (j = o.$str('when'))) ||
- (g = this.element())) &&
- (j
- ? (l = k(this.conditions, 'expected condition'))
- : l
- ? i('CSS guard can only be used at the end of selector')
- : d
- ? (h = h ? h.concat(d) : d)
- : (h &&
- i('Extend can only be used at the end of selector'),
- (f = o.currentChar()),
- b ? b.push(g) : (b = [g]),
- (g = null)),
- '{' !== f &&
- '}' !== f &&
- ';' !== f &&
- ',' !== f &&
- ')' !== f);
-
- );
- return b
- ? new e.Selector(b, h, l, m, c)
- : void (
- h &&
- i(
- 'Extend must be used to extend a selector, it cannot be used on its own'
- )
- );
- },
- attribute: function () {
- if (o.$char('[')) {
- var a,
- b,
- c,
- d = this.entities;
- return (
- (a = d.variableCurly()) ||
- (a = k(
- /^(?:[_A-Za-z0-9-\*]*\|)?(?:[_A-Za-z0-9-]|\\.)+/
- )),
- (c = o.$re(/^[|~*$^]?=/)),
- c &&
- (b =
- d.quoted() ||
- o.$re(/^[0-9]+%/) ||
- o.$re(/^[\w-]+/) ||
- d.variableCurly()),
- l(']'),
- new e.Attribute(a, c, b)
- );
- }
- },
- block: function () {
- var a;
- if (o.$char('{') && (a = this.primary()) && o.$char('}'))
- return a;
- },
- blockRuleset: function () {
- var a = this.block();
- return a && (a = new e.Ruleset(null, a)), a;
- },
- detachedRuleset: function () {
- var a = this.blockRuleset();
- if (a) return new e.DetachedRuleset(a);
- },
- ruleset: function () {
- var b, c, d, f;
- for (o.save(), a.dumpLineNumbers && (f = m(o.i)); ; ) {
- if (((c = this.lessSelector()), !c)) break;
- if (
- (b ? b.push(c) : (b = [c]),
- (o.commentStore.length = 0),
- c.condition &&
- b.length > 1 &&
- i(
- 'Guards are only currently allowed on a single selector.'
- ),
- !o.$char(','))
- )
- break;
- c.condition &&
- i(
- 'Guards are only currently allowed on a single selector.'
- ),
- (o.commentStore.length = 0);
- }
- if (b && (d = this.block())) {
- o.forget();
- var g = new e.Ruleset(b, d, a.strictImports);
- return a.dumpLineNumbers && (g.debugInfo = f), g;
- }
- o.restore();
- },
- rule: function (b) {
- var d,
- f,
- g,
- h,
- i,
- j = o.i,
- k = o.currentChar();
- if ('.' !== k && '#' !== k && '&' !== k && ':' !== k)
- if (
- (o.save(), (d = this.variable() || this.ruleProperty()))
- ) {
- if (
- ((i = 'string' == typeof d),
- i && (f = this.detachedRuleset()),
- (o.commentStore.length = 0),
- !f)
- ) {
- h = !i && d.length > 1 && d.pop().value;
- var l = !b && (a.compress || i);
- if (
- (l && (f = this.value()),
- !f && (f = this.anonymousValue()))
- )
- return o.forget(), new e.Rule(d, f, !1, h, j, c);
- l || f || (f = this.value()), (g = this.important());
- }
- if (f && this.end())
- return o.forget(), new e.Rule(d, f, g, h, j, c);
- if ((o.restore(), f && !b)) return this.rule(!0);
- } else o.forget();
- },
- anonymousValue: function () {
- var a = o.$re(/^([^@+\/'"*`(;{}-]*);/);
- if (a) return new e.Anonymous(a[1]);
- },
- import: function () {
- var a,
- b,
- d = o.i,
- f = o.$re(/^@import?\s+/);
- if (f) {
- var g = (f ? this.importOptions() : null) || {};
- if ((a = this.entities.quoted() || this.entities.url()))
- return (
- (b = this.mediaFeatures()),
- o.$char(';') ||
- ((o.i = d),
- i(
- 'missing semi-colon or unrecognised media features on import'
- )),
- (b = b && new e.Value(b)),
- new e.Import(a, b, g, d, c)
- );
- (o.i = d), i('malformed import statement');
- }
- },
- importOptions: function () {
- var a,
- b,
- c,
- d = {};
- if (!o.$char('(')) return null;
- do
- if ((a = this.importOption())) {
- switch (((b = a), (c = !0), b)) {
- case 'css':
- (b = 'less'), (c = !1);
- break;
- case 'once':
- (b = 'multiple'), (c = !1);
- }
- if (((d[b] = c), !o.$char(','))) break;
- }
- while (a);
- return l(')'), d;
- },
- importOption: function () {
- var a = o.$re(
- /^(less|css|multiple|once|inline|reference|optional)/
- );
- if (a) return a[1];
- },
- mediaFeature: function () {
- var a,
- b,
- d = this.entities,
- f = [];
- o.save();
- do
- (a = d.keyword() || d.variable()),
- a
- ? f.push(a)
- : o.$char('(') &&
- ((b = this.property()),
- (a = this.value()),
- o.$char(')')
- ? b && a
- ? f.push(
- new e.Paren(
- new e.Rule(b, a, null, null, o.i, c, !0)
- )
- )
- : a
- ? f.push(new e.Paren(a))
- : i('badly formed media feature definition')
- : i("Missing closing ')'", 'Parse'));
- while (a);
- if ((o.forget(), f.length > 0)) return new e.Expression(f);
- },
- mediaFeatures: function () {
- var a,
- b = this.entities,
- c = [];
- do
- if ((a = this.mediaFeature())) {
- if ((c.push(a), !o.$char(','))) break;
- } else if (
- ((a = b.variable()), a && (c.push(a), !o.$char(',')))
- )
- break;
- while (a);
- return c.length > 0 ? c : null;
- },
- media: function () {
- var b,
- d,
- f,
- g,
- h = o.i;
- return (
- a.dumpLineNumbers && (g = m(h)),
- o.save(),
- o.$str('@media')
- ? ((b = this.mediaFeatures()),
- (d = this.block()),
- d ||
- i(
- 'media definitions require block statements after any features'
- ),
- o.forget(),
- (f = new e.Media(d, b, h, c)),
- a.dumpLineNumbers && (f.debugInfo = g),
- f)
- : void o.restore()
- );
- },
- plugin: function () {
- var a,
- b = o.i,
- d = o.$re(/^@plugin?\s+/);
- if (d) {
- var f = { plugin: !0 };
- if ((a = this.entities.quoted() || this.entities.url()))
- return (
- o.$char(';') ||
- ((o.i = b), i('missing semi-colon on plugin')),
- new e.Import(a, null, f, b, c)
- );
- (o.i = b), i('malformed plugin statement');
- }
- },
- directive: function () {
- var b,
- d,
- f,
- g,
- h,
- j,
- k,
- l = o.i,
- n = !0,
- p = !0;
- if ('@' === o.currentChar()) {
- if (
- (d = this['import']() || this.plugin() || this.media())
- )
- return d;
- if ((o.save(), (b = o.$re(/^@[a-z-]+/)))) {
- switch (
- ((g = b),
- '-' == b.charAt(1) &&
- b.indexOf('-', 2) > 0 &&
- (g = '@' + b.slice(b.indexOf('-', 2) + 1)),
- g)
- ) {
- case '@charset':
- (h = !0), (n = !1);
- break;
- case '@namespace':
- (j = !0), (n = !1);
- break;
- case '@keyframes':
- case '@counter-style':
- h = !0;
- break;
- case '@document':
- case '@supports':
- (k = !0), (p = !1);
- break;
- default:
- k = !0;
- }
- return (
- (o.commentStore.length = 0),
- h
- ? ((d = this.entity()),
- d || i('expected ' + b + ' identifier'))
- : j
- ? ((d = this.expression()),
- d || i('expected ' + b + ' expression'))
- : k &&
- ((d = (o.$re(/^[^{;]+/) || '').trim()),
- (n = '{' == o.currentChar()),
- d && (d = new e.Anonymous(d))),
- n && (f = this.blockRuleset()),
- f || (!n && d && o.$char(';'))
- ? (o.forget(),
- new e.Directive(
- b,
- d,
- f,
- l,
- c,
- a.dumpLineNumbers ? m(l) : null,
- p
- ))
- : void o.restore('directive options not recognised')
- );
- }
- }
- },
- value: function () {
- var a,
- b = [];
- do
- if (
- ((a = this.expression()),
- a && (b.push(a), !o.$char(',')))
- )
- break;
- while (a);
- if (b.length > 0) return new e.Value(b);
- },
- important: function () {
- if ('!' === o.currentChar()) return o.$re(/^! *important/);
- },
- sub: function () {
- var a, b;
- return (
- o.save(),
- o.$char('(')
- ? ((a = this.addition()),
- a && o.$char(')')
- ? (o.forget(),
- (b = new e.Expression([a])),
- (b.parens = !0),
- b)
- : void o.restore("Expected ')'"))
- : void o.restore()
- );
- },
- multiplication: function () {
- var a, b, c, d, f;
- if ((a = this.operand())) {
- for (f = o.isWhitespace(-1); ; ) {
- if (o.peek(/^\/[*\/]/)) break;
- if (
- (o.save(), (c = o.$char('/') || o.$char('*')), !c)
- ) {
- o.forget();
- break;
- }
- if (((b = this.operand()), !b)) {
- o.restore();
- break;
- }
- o.forget(),
- (a.parensInOp = !0),
- (b.parensInOp = !0),
- (d = new e.Operation(c, [d || a, b], f)),
- (f = o.isWhitespace(-1));
- }
- return d || a;
- }
- },
- addition: function () {
- var a, b, c, d, f;
- if ((a = this.multiplication())) {
- for (f = o.isWhitespace(-1); ; ) {
- if (
- ((c =
- o.$re(/^[-+]\s+/) ||
- (!f && (o.$char('+') || o.$char('-')))),
- !c)
- )
- break;
- if (((b = this.multiplication()), !b)) break;
- (a.parensInOp = !0),
- (b.parensInOp = !0),
- (d = new e.Operation(c, [d || a, b], f)),
- (f = o.isWhitespace(-1));
- }
- return d || a;
- }
- },
- conditions: function () {
- var a,
- b,
- c,
- d = o.i;
- if ((a = this.condition())) {
- for (;;) {
- if (!o.peek(/^,\s*(not\s*)?\(/) || !o.$char(',')) break;
- if (((b = this.condition()), !b)) break;
- c = new e.Condition('or', c || a, b, d);
- }
- return c || a;
- }
- },
- condition: function () {
- function a() {
- return o.$str('or');
- }
- var b, c, d;
- if ((b = this.conditionAnd(this))) {
- if ((c = a())) {
- if (((d = this.condition()), !d)) return;
- b = new e.Condition(c, b, d);
- }
- return b;
- }
- },
- conditionAnd: function () {
- function a(a) {
- return a.negatedCondition() || a.parenthesisCondition();
- }
- function b() {
- return o.$str('and');
- }
- var c, d, f;
- if ((c = a(this))) {
- if ((d = b())) {
- if (((f = this.conditionAnd()), !f)) return;
- c = new e.Condition(d, c, f);
- }
- return c;
- }
- },
- negatedCondition: function () {
- if (o.$str('not')) {
- var a = this.parenthesisCondition();
- return a && (a.negate = !a.negate), a;
- }
- },
- parenthesisCondition: function () {
- function a(a) {
- var b;
- return (
- o.save(),
- (b = a.condition()) && o.$char(')')
- ? (o.forget(), b)
- : void o.restore()
- );
- }
- var b;
- return (
- o.save(),
- o.$str('(')
- ? (b = a(this))
- ? (o.forget(), b)
- : (b = this.atomicCondition())
- ? o.$char(')')
- ? (o.forget(), b)
- : void o.restore(
- "expected ')' got '" + o.currentChar() + "'"
- )
- : void o.restore()
- : void o.restore()
- );
- },
- atomicCondition: function () {
- var a,
- b,
- c,
- d,
- f = this.entities,
- g = o.i;
- if ((a = this.addition() || f.keyword() || f.quoted()))
- return (
- o.$char('>')
- ? (d = o.$char('=') ? '>=' : '>')
- : o.$char('<')
- ? (d = o.$char('=') ? '<=' : '<')
- : o.$char('=') &&
- (d = o.$char('>')
- ? '=>'
- : o.$char('<')
- ? '=<'
- : '='),
- d
- ? ((b = this.addition() || f.keyword() || f.quoted()),
- b
- ? (c = new e.Condition(d, a, b, g, !1))
- : i('expected expression'))
- : (c = new e.Condition(
- '=',
- a,
- new e.Keyword('true'),
- g,
- !1
- )),
- c
- );
- },
- operand: function () {
- var a,
- b = this.entities;
- o.peek(/^-[@\(]/) && (a = o.$char('-'));
- var c =
- this.sub() ||
- b.dimension() ||
- b.color() ||
- b.variable() ||
- b.call() ||
- b.colorKeyword();
- return (
- a && ((c.parensInOp = !0), (c = new e.Negative(c))), c
- );
- },
- expression: function () {
- var a,
- b,
- c = [];
- do
- (a = this.comment()),
- a
- ? c.push(a)
- : ((a = this.addition() || this.entity()),
- a &&
- (c.push(a),
- o.peek(/^\/[\/*]/) ||
- ((b = o.$char('/')),
- b && c.push(new e.Anonymous(b)))));
- while (a);
- if (c.length > 0) return new e.Expression(c);
- },
- property: function () {
- var a = o.$re(/^(\*?-?[_a-zA-Z0-9-]+)\s*:/);
- if (a) return a[1];
- },
- ruleProperty: function () {
- function a(a) {
- var b = o.i,
- c = o.$re(a);
- if (c) return g.push(b), f.push(c[1]);
- }
- var b,
- d,
- f = [],
- g = [];
- o.save();
- var h = o.$re(/^([_a-zA-Z0-9-]+)\s*:/);
- if (h) return (f = [new e.Keyword(h[1])]), o.forget(), f;
- for (a(/^(\*?)/); ; )
- if (!a(/^((?:[\w-]+)|(?:@\{[\w-]+\}))/)) break;
- if (f.length > 1 && a(/^((?:\+_|\+)?)\s*:/)) {
- for (
- o.forget(),
- '' === f[0] && (f.shift(), g.shift()),
- d = 0;
- d < f.length;
- d++
- )
- (b = f[d]),
- (f[d] =
- '@' !== b.charAt(0)
- ? new e.Keyword(b)
- : new e.Variable('@' + b.slice(2, -1), g[d], c));
- return f;
- }
- o.restore();
- },
- }),
- };
- };
- (i.serializeVars = function (a) {
- var b = '';
- for (var c in a)
- if (Object.hasOwnProperty.call(a, c)) {
- var d = a[c];
- b +=
- ('@' === c[0] ? '' : '@') +
- c +
- ': ' +
- d +
- (';' === String(d).slice(-1) ? '' : ';');
- }
- return b;
- }),
- (b.exports = i);
- },
- {
- '../less-error': 32,
- '../tree': 62,
- '../utils': 83,
- '../visitors': 87,
- './parser-input': 37,
- },
- ],
- 39: [
- function (a, b, c) {
- var d = function (a) {
- (this.less = a),
- (this.visitors = []),
- (this.preProcessors = []),
- (this.postProcessors = []),
- (this.installedPlugins = []),
- (this.fileManagers = []);
- };
- (d.prototype.addPlugins = function (a) {
- if (a) for (var b = 0; b < a.length; b++) this.addPlugin(a[b]);
- }),
- (d.prototype.addPlugin = function (a) {
- this.installedPlugins.push(a), a.install(this.less, this);
- }),
- (d.prototype.addVisitor = function (a) {
- this.visitors.push(a);
- }),
- (d.prototype.addPreProcessor = function (a, b) {
- var c;
- for (
- c = 0;
- c < this.preProcessors.length &&
- !(this.preProcessors[c].priority >= b);
- c++
- );
- this.preProcessors.splice(c, 0, { preProcessor: a, priority: b });
- }),
- (d.prototype.addPostProcessor = function (a, b) {
- var c;
- for (
- c = 0;
- c < this.postProcessors.length &&
- !(this.postProcessors[c].priority >= b);
- c++
- );
- this.postProcessors.splice(c, 0, {
- postProcessor: a,
- priority: b,
- });
- }),
- (d.prototype.addFileManager = function (a) {
- this.fileManagers.push(a);
- }),
- (d.prototype.getPreProcessors = function () {
- for (var a = [], b = 0; b < this.preProcessors.length; b++)
- a.push(this.preProcessors[b].preProcessor);
- return a;
- }),
- (d.prototype.getPostProcessors = function () {
- for (var a = [], b = 0; b < this.postProcessors.length; b++)
- a.push(this.postProcessors[b].postProcessor);
- return a;
- }),
- (d.prototype.getVisitors = function () {
- return this.visitors;
- }),
- (d.prototype.getFileManagers = function () {
- return this.fileManagers;
- }),
- (b.exports = d);
- },
- {},
- ],
- 40: [
- function (a, b, c) {
- var d = a('../less-error'),
- e = a('../tree'),
- f = (b.exports = function (a, b) {
- this.fileInfo = b;
- });
- f.prototype.eval = function (a, b) {
- var c,
- f,
- g = {};
- f = {
- add: function (a, b) {
- g[a] = b;
- },
- addMultiple: function (a) {
- Object.keys(a).forEach(function (b) {
- g[b] = a[b];
- });
- },
- };
- try {
- (c = new Function('functions', 'tree', 'fileInfo', a)),
- c(f, e, this.fileInfo);
- } catch (h) {
- b(
- new d({
- message:
- "Plugin evaluation error: '" +
- h.name +
- ': ' +
- h.message.replace(/["]/g, "'") +
- "'",
- filename: this.fileInfo.filename,
- }),
- null
- );
- }
- b(null, { functions: g });
- };
- },
- { '../less-error': 32, '../tree': 62 },
- ],
- 41: [
- function (a, b, c) {
- var d;
- b.exports = function (b, c, e) {
- var f = function (b, e, g) {
- if (('function' == typeof e && ((g = e), (e = {})), !g)) {
- d ||
- (d = 'undefined' == typeof Promise ? a('promise') : Promise);
- var h = this;
- return new d(function (a, c) {
- f.call(h, b, e, function (b, d) {
- b ? c(b) : a(d);
- });
- });
- }
- this.parse(b, e, function (a, b, d, e) {
- if (a) return g(a);
- var f;
- try {
- var h = new c(b, d);
- f = h.toCSS(e);
- } catch (a) {
- return g(a);
- }
- g(null, f);
- });
- };
- return f;
- };
- },
- { promise: void 0 },
- ],
- 42: [
- function (a, b, c) {
- b.exports = function (a, b) {
- var c = function (a) {
- this.options = a;
- };
- return (
- (c.prototype.toCSS = function (b, c, d) {
- var e = new a({
- contentsIgnoredCharsMap: d.contentsIgnoredChars,
- rootNode: b,
- contentsMap: d.contents,
- sourceMapFilename: this.options.sourceMapFilename,
- sourceMapURL: this.options.sourceMapURL,
- outputFilename: this.options.sourceMapOutputFilename,
- sourceMapBasepath: this.options.sourceMapBasepath,
- sourceMapRootpath: this.options.sourceMapRootpath,
- outputSourceFiles: this.options.outputSourceFiles,
- sourceMapGenerator: this.options.sourceMapGenerator,
- sourceMapFileInline: this.options.sourceMapFileInline,
- }),
- f = e.toCSS(c);
- return (
- (this.sourceMap = e.sourceMap),
- (this.sourceMapURL = e.sourceMapURL),
- this.options.sourceMapInputFilename &&
- (this.sourceMapInputFilename = e.normalizeFilename(
- this.options.sourceMapInputFilename
- )),
- f + this.getCSSAppendage()
- );
- }),
- (c.prototype.getCSSAppendage = function () {
- var a = this.sourceMapURL;
- if (this.options.sourceMapFileInline) {
- if (void 0 === this.sourceMap) return '';
- a =
- 'data:application/json;base64,' +
- b.encodeBase64(this.sourceMap);
- }
- return a ? '/*# sourceMappingURL=' + a + ' */' : '';
- }),
- (c.prototype.getExternalSourceMap = function () {
- return this.sourceMap;
- }),
- (c.prototype.setExternalSourceMap = function (a) {
- this.sourceMap = a;
- }),
- (c.prototype.isInline = function () {
- return this.options.sourceMapFileInline;
- }),
- (c.prototype.getSourceMapURL = function () {
- return this.sourceMapURL;
- }),
- (c.prototype.getOutputFilename = function () {
- return this.options.sourceMapOutputFilename;
- }),
- (c.prototype.getInputFilename = function () {
- return this.sourceMapInputFilename;
- }),
- c
- );
- };
- },
- {},
- ],
- 43: [
- function (a, b, c) {
- b.exports = function (a) {
- var b = function (b) {
- (this._css = []),
- (this._rootNode = b.rootNode),
- (this._contentsMap = b.contentsMap),
- (this._contentsIgnoredCharsMap = b.contentsIgnoredCharsMap),
- b.sourceMapFilename &&
- (this._sourceMapFilename = b.sourceMapFilename.replace(
- /\\/g,
- '/'
- )),
- (this._outputFilename = b.outputFilename),
- (this.sourceMapURL = b.sourceMapURL),
- b.sourceMapBasepath &&
- (this._sourceMapBasepath = b.sourceMapBasepath.replace(
- /\\/g,
- '/'
- )),
- b.sourceMapRootpath
- ? ((this._sourceMapRootpath = b.sourceMapRootpath.replace(
- /\\/g,
- '/'
- )),
- '/' !==
- this._sourceMapRootpath.charAt(
- this._sourceMapRootpath.length - 1
- ) && (this._sourceMapRootpath += '/'))
- : (this._sourceMapRootpath = ''),
- (this._outputSourceFiles = b.outputSourceFiles),
- (this._sourceMapGeneratorConstructor = a.getSourceMapGenerator()),
- (this._lineNumber = 0),
- (this._column = 0);
- };
- return (
- (b.prototype.normalizeFilename = function (a) {
- return (
- (a = a.replace(/\\/g, '/')),
- this._sourceMapBasepath &&
- 0 === a.indexOf(this._sourceMapBasepath) &&
- ((a = a.substring(this._sourceMapBasepath.length)),
- ('\\' !== a.charAt(0) && '/' !== a.charAt(0)) ||
- (a = a.substring(1))),
- (this._sourceMapRootpath || '') + a
- );
- }),
- (b.prototype.add = function (a, b, c, d) {
- if (a) {
- var e, f, g, h, i;
- if (b) {
- var j = this._contentsMap[b.filename];
- this._contentsIgnoredCharsMap[b.filename] &&
- ((c -= this._contentsIgnoredCharsMap[b.filename]),
- c < 0 && (c = 0),
- (j = j.slice(this._contentsIgnoredCharsMap[b.filename]))),
- (j = j.substring(0, c)),
- (f = j.split('\n')),
- (h = f[f.length - 1]);
- }
- if (((e = a.split('\n')), (g = e[e.length - 1]), b))
- if (d)
- for (i = 0; i < e.length; i++)
- this._sourceMapGenerator.addMapping({
- generated: {
- line: this._lineNumber + i + 1,
- column: 0 === i ? this._column : 0,
- },
- original: {
- line: f.length + i,
- column: 0 === i ? h.length : 0,
- },
- source: this.normalizeFilename(b.filename),
- });
- else
- this._sourceMapGenerator.addMapping({
- generated: {
- line: this._lineNumber + 1,
- column: this._column,
- },
- original: { line: f.length, column: h.length },
- source: this.normalizeFilename(b.filename),
- });
- 1 === e.length
- ? (this._column += g.length)
- : ((this._lineNumber += e.length - 1),
- (this._column = g.length)),
- this._css.push(a);
- }
- }),
- (b.prototype.isEmpty = function () {
- return 0 === this._css.length;
- }),
- (b.prototype.toCSS = function (a) {
- if (
- ((this._sourceMapGenerator = new this._sourceMapGeneratorConstructor(
- { file: this._outputFilename, sourceRoot: null }
- )),
- this._outputSourceFiles)
- )
- for (var b in this._contentsMap)
- if (this._contentsMap.hasOwnProperty(b)) {
- var c = this._contentsMap[b];
- this._contentsIgnoredCharsMap[b] &&
- (c = c.slice(this._contentsIgnoredCharsMap[b])),
- this._sourceMapGenerator.setSourceContent(
- this.normalizeFilename(b),
- c
- );
- }
- if ((this._rootNode.genCSS(a, this), this._css.length > 0)) {
- var d,
- e = JSON.stringify(this._sourceMapGenerator.toJSON());
- this.sourceMapURL
- ? (d = this.sourceMapURL)
- : this._sourceMapFilename && (d = this._sourceMapFilename),
- (this.sourceMapURL = d),
- (this.sourceMap = e);
- }
- return this._css.join('');
- }),
- b
- );
- };
- },
- {},
- ],
- 44: [
- function (a, b, c) {
- var d = a('./contexts'),
- e = a('./visitors'),
- f = a('./tree');
- b.exports = function (a, b) {
- b = b || {};
- var c,
- g = b.variables,
- h = new d.Eval(b);
- 'object' != typeof g ||
- Array.isArray(g) ||
- ((g = Object.keys(g).map(function (a) {
- var b = g[a];
- return (
- b instanceof f.Value ||
- (b instanceof f.Expression || (b = new f.Expression([b])),
- (b = new f.Value([b]))),
- new f.Rule('@' + a, b, !1, null, 0)
- );
- })),
- (h.frames = [new f.Ruleset(null, g)]));
- var i,
- j = [],
- k = [
- new e.JoinSelectorVisitor(),
- new e.MarkVisibleSelectorsVisitor(!0),
- new e.ExtendVisitor(),
- new e.ToCSSVisitor({ compress: Boolean(b.compress) }),
- ];
- if (b.pluginManager) {
- var l = b.pluginManager.getVisitors();
- for (i = 0; i < l.length; i++) {
- var m = l[i];
- m.isPreEvalVisitor
- ? j.push(m)
- : m.isPreVisitor
- ? k.splice(0, 0, m)
- : k.push(m);
- }
- }
- for (i = 0; i < j.length; i++) j[i].run(a);
- for (c = a.eval(h), i = 0; i < k.length; i++) k[i].run(c);
- return c;
- };
- },
- { './contexts': 11, './tree': 62, './visitors': 87 },
- ],
- 45: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a) {
- this.value = a;
- };
- (e.prototype = new d()),
- (e.prototype.type = 'Alpha'),
- (e.prototype.accept = function (a) {
- this.value = a.visit(this.value);
- }),
- (e.prototype.eval = function (a) {
- return this.value.eval ? new e(this.value.eval(a)) : this;
- }),
- (e.prototype.genCSS = function (a, b) {
- b.add('alpha(opacity='),
- this.value.genCSS ? this.value.genCSS(a, b) : b.add(this.value),
- b.add(')');
- }),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 46: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a, b, c, d, e, f) {
- (this.value = a),
- (this.index = b),
- (this.mapLines = d),
- (this.currentFileInfo = c),
- (this.rulesetLike = 'undefined' != typeof e && e),
- (this.allowRoot = !0),
- this.copyVisibilityInfo(f);
- };
- (e.prototype = new d()),
- (e.prototype.type = 'Anonymous'),
- (e.prototype.eval = function () {
- return new e(
- this.value,
- this.index,
- this.currentFileInfo,
- this.mapLines,
- this.rulesetLike,
- this.visibilityInfo()
- );
- }),
- (e.prototype.compare = function (a) {
- return a.toCSS && this.toCSS() === a.toCSS() ? 0 : void 0;
- }),
- (e.prototype.isRulesetLike = function () {
- return this.rulesetLike;
- }),
- (e.prototype.genCSS = function (a, b) {
- b.add(
- this.value,
- this.currentFileInfo,
- this.index,
- this.mapLines
- );
- }),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 47: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a, b) {
- (this.key = a), (this.value = b);
- };
- (e.prototype = new d()),
- (e.prototype.type = 'Assignment'),
- (e.prototype.accept = function (a) {
- this.value = a.visit(this.value);
- }),
- (e.prototype.eval = function (a) {
- return this.value.eval
- ? new e(this.key, this.value.eval(a))
- : this;
- }),
- (e.prototype.genCSS = function (a, b) {
- b.add(this.key + '='),
- this.value.genCSS ? this.value.genCSS(a, b) : b.add(this.value);
- }),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 48: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a, b, c) {
- (this.key = a), (this.op = b), (this.value = c);
- };
- (e.prototype = new d()),
- (e.prototype.type = 'Attribute'),
- (e.prototype.eval = function (a) {
- return new e(
- this.key.eval ? this.key.eval(a) : this.key,
- this.op,
- this.value && this.value.eval ? this.value.eval(a) : this.value
- );
- }),
- (e.prototype.genCSS = function (a, b) {
- b.add(this.toCSS(a));
- }),
- (e.prototype.toCSS = function (a) {
- var b = this.key.toCSS ? this.key.toCSS(a) : this.key;
- return (
- this.op &&
- ((b += this.op),
- (b += this.value.toCSS ? this.value.toCSS(a) : this.value)),
- '[' + b + ']'
- );
- }),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 49: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('../functions/function-caller'),
- f = function (a, b, c, d) {
- (this.name = a),
- (this.args = b),
- (this.index = c),
- (this.currentFileInfo = d);
- };
- (f.prototype = new d()),
- (f.prototype.type = 'Call'),
- (f.prototype.accept = function (a) {
- this.args && (this.args = a.visitArray(this.args));
- }),
- (f.prototype.eval = function (a) {
- var b,
- c = this.args.map(function (b) {
- return b.eval(a);
- }),
- d = new e(this.name, a, this.index, this.currentFileInfo);
- if (d.isValid()) {
- try {
- b = d.call(c);
- } catch (g) {
- throw {
- type: g.type || 'Runtime',
- message:
- 'error evaluating function `' +
- this.name +
- '`' +
- (g.message ? ': ' + g.message : ''),
- index: this.index,
- filename: this.currentFileInfo.filename,
- };
- }
- if (null != b)
- return (
- (b.index = this.index),
- (b.currentFileInfo = this.currentFileInfo),
- b
- );
- }
- return new f(this.name, c, this.index, this.currentFileInfo);
- }),
- (f.prototype.genCSS = function (a, b) {
- b.add(this.name + '(', this.currentFileInfo, this.index);
- for (var c = 0; c < this.args.length; c++)
- this.args[c].genCSS(a, b),
- c + 1 < this.args.length && b.add(', ');
- b.add(')');
- }),
- (b.exports = f);
- },
- { '../functions/function-caller': 21, './node': 70 },
- ],
- 50: [
- function (a, b, c) {
- function d(a, b) {
- return Math.min(Math.max(a, 0), b);
- }
- function e(a) {
- return (
- '#' +
- a
- .map(function (a) {
- return (
- (a = d(Math.round(a), 255)),
- (a < 16 ? '0' : '') + a.toString(16)
- );
- })
- .join('')
- );
- }
- var f = a('./node'),
- g = a('../data/colors'),
- h = function (a, b, c) {
- (this.rgb = Array.isArray(a)
- ? a
- : 6 == a.length
- ? a.match(/.{2}/g).map(function (a) {
- return parseInt(a, 16);
- })
- : a.split('').map(function (a) {
- return parseInt(a + a, 16);
- })),
- (this.alpha = 'number' == typeof b ? b : 1),
- 'undefined' != typeof c && (this.value = c);
- };
- (h.prototype = new f()),
- (h.prototype.type = 'Color'),
- (h.prototype.luma = function () {
- var a = this.rgb[0] / 255,
- b = this.rgb[1] / 255,
- c = this.rgb[2] / 255;
- return (
- (a =
- a <= 0.03928
- ? a / 12.92
- : Math.pow((a + 0.055) / 1.055, 2.4)),
- (b =
- b <= 0.03928
- ? b / 12.92
- : Math.pow((b + 0.055) / 1.055, 2.4)),
- (c =
- c <= 0.03928
- ? c / 12.92
- : Math.pow((c + 0.055) / 1.055, 2.4)),
- 0.2126 * a + 0.7152 * b + 0.0722 * c
- );
- }),
- (h.prototype.genCSS = function (a, b) {
- b.add(this.toCSS(a));
- }),
- (h.prototype.toCSS = function (a, b) {
- var c,
- e,
- f = a && a.compress && !b;
- if (this.value) return this.value;
- if (((e = this.fround(a, this.alpha)), e < 1))
- return (
- 'rgba(' +
- this.rgb
- .map(function (a) {
- return d(Math.round(a), 255);
- })
- .concat(d(e, 1))
- .join(',' + (f ? '' : ' ')) +
- ')'
- );
- if (((c = this.toRGB()), f)) {
- var g = c.split('');
- g[1] === g[2] &&
- g[3] === g[4] &&
- g[5] === g[6] &&
- (c = '#' + g[1] + g[3] + g[5]);
- }
- return c;
- }),
- (h.prototype.operate = function (a, b, c) {
- for (
- var d = [], e = this.alpha * (1 - c.alpha) + c.alpha, f = 0;
- f < 3;
- f++
- )
- d[f] = this._operate(a, b, this.rgb[f], c.rgb[f]);
- return new h(d, e);
- }),
- (h.prototype.toRGB = function () {
- return e(this.rgb);
- }),
- (h.prototype.toHSL = function () {
- var a,
- b,
- c = this.rgb[0] / 255,
- d = this.rgb[1] / 255,
- e = this.rgb[2] / 255,
- f = this.alpha,
- g = Math.max(c, d, e),
- h = Math.min(c, d, e),
- i = (g + h) / 2,
- j = g - h;
- if (g === h) a = b = 0;
- else {
- switch (((b = i > 0.5 ? j / (2 - g - h) : j / (g + h)), g)) {
- case c:
- a = (d - e) / j + (d < e ? 6 : 0);
- break;
- case d:
- a = (e - c) / j + 2;
- break;
- case e:
- a = (c - d) / j + 4;
- }
- a /= 6;
- }
- return { h: 360 * a, s: b, l: i, a: f };
- }),
- (h.prototype.toHSV = function () {
- var a,
- b,
- c = this.rgb[0] / 255,
- d = this.rgb[1] / 255,
- e = this.rgb[2] / 255,
- f = this.alpha,
- g = Math.max(c, d, e),
- h = Math.min(c, d, e),
- i = g,
- j = g - h;
- if (((b = 0 === g ? 0 : j / g), g === h)) a = 0;
- else {
- switch (g) {
- case c:
- a = (d - e) / j + (d < e ? 6 : 0);
- break;
- case d:
- a = (e - c) / j + 2;
- break;
- case e:
- a = (c - d) / j + 4;
- }
- a /= 6;
- }
- return { h: 360 * a, s: b, v: i, a: f };
- }),
- (h.prototype.toARGB = function () {
- return e([255 * this.alpha].concat(this.rgb));
- }),
- (h.prototype.compare = function (a) {
- return a.rgb &&
- a.rgb[0] === this.rgb[0] &&
- a.rgb[1] === this.rgb[1] &&
- a.rgb[2] === this.rgb[2] &&
- a.alpha === this.alpha
- ? 0
- : void 0;
- }),
- (h.fromKeyword = function (a) {
- var b,
- c = a.toLowerCase();
- if (
- (g.hasOwnProperty(c)
- ? (b = new h(g[c].slice(1)))
- : 'transparent' === c && (b = new h([0, 0, 0], 0)),
- b)
- )
- return (b.value = a), b;
- }),
- (b.exports = h);
- },
- { '../data/colors': 12, './node': 70 },
- ],
- 51: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a) {
- ' ' === a
- ? ((this.value = ' '), (this.emptyOrWhitespace = !0))
- : ((this.value = a ? a.trim() : ''),
- (this.emptyOrWhitespace = '' === this.value));
- };
- (e.prototype = new d()), (e.prototype.type = 'Combinator');
- var f = { '': !0, ' ': !0, '|': !0 };
- (e.prototype.genCSS = function (a, b) {
- var c = a.compress || f[this.value] ? '' : ' ';
- b.add(c + this.value + c);
- }),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 52: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./debug-info'),
- f = function (a, b, c, d) {
- (this.value = a),
- (this.isLineComment = b),
- (this.index = c),
- (this.currentFileInfo = d),
- (this.allowRoot = !0);
- };
- (f.prototype = new d()),
- (f.prototype.type = 'Comment'),
- (f.prototype.genCSS = function (a, b) {
- this.debugInfo &&
- b.add(e(a, this), this.currentFileInfo, this.index),
- b.add(this.value);
- }),
- (f.prototype.isSilent = function (a) {
- var b = a.compress && '!' !== this.value[2];
- return this.isLineComment || b;
- }),
- (b.exports = f);
- },
- { './debug-info': 54, './node': 70 },
- ],
- 53: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a, b, c, d, e) {
- (this.op = a.trim()),
- (this.lvalue = b),
- (this.rvalue = c),
- (this.index = d),
- (this.negate = e);
- };
- (e.prototype = new d()),
- (e.prototype.type = 'Condition'),
- (e.prototype.accept = function (a) {
- (this.lvalue = a.visit(this.lvalue)),
- (this.rvalue = a.visit(this.rvalue));
- }),
- (e.prototype.eval = function (a) {
- var b = (function (a, b, c) {
- switch (a) {
- case 'and':
- return b && c;
- case 'or':
- return b || c;
- default:
- switch (d.compare(b, c)) {
- case -1:
- return '<' === a || '=<' === a || '<=' === a;
- case 0:
- return (
- '=' === a || '>=' === a || '=<' === a || '<=' === a
- );
- case 1:
- return '>' === a || '>=' === a;
- default:
- return !1;
- }
- }
- })(this.op, this.lvalue.eval(a), this.rvalue.eval(a));
- return this.negate ? !b : b;
- }),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 54: [
- function (a, b, c) {
- var d = function (a, b, c) {
- var e = '';
- if (a.dumpLineNumbers && !a.compress)
- switch (a.dumpLineNumbers) {
- case 'comments':
- e = d.asComment(b);
- break;
- case 'mediaquery':
- e = d.asMediaQuery(b);
- break;
- case 'all':
- e = d.asComment(b) + (c || '') + d.asMediaQuery(b);
- }
- return e;
- };
- (d.asComment = function (a) {
- return (
- '/* line ' +
- a.debugInfo.lineNumber +
- ', ' +
- a.debugInfo.fileName +
- ' */\n'
- );
- }),
- (d.asMediaQuery = function (a) {
- var b = a.debugInfo.fileName;
- return (
- /^[a-z]+:\/\//i.test(b) || (b = 'file://' + b),
- '@media -sass-debug-info{filename{font-family:' +
- b.replace(/([.:\/\\])/g, function (a) {
- return '\\' == a && (a = '/'), '\\' + a;
- }) +
- '}line{font-family:\\00003' +
- a.debugInfo.lineNumber +
- '}}\n'
- );
- }),
- (b.exports = d);
- },
- {},
- ],
- 55: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('../contexts'),
- f = function (a, b) {
- (this.ruleset = a), (this.frames = b);
- };
- (f.prototype = new d()),
- (f.prototype.type = 'DetachedRuleset'),
- (f.prototype.evalFirst = !0),
- (f.prototype.accept = function (a) {
- this.ruleset = a.visit(this.ruleset);
- }),
- (f.prototype.eval = function (a) {
- var b = this.frames || a.frames.slice(0);
- return new f(this.ruleset, b);
- }),
- (f.prototype.callEval = function (a) {
- return this.ruleset.eval(
- this.frames ? new e.Eval(a, this.frames.concat(a.frames)) : a
- );
- }),
- (b.exports = f);
- },
- { '../contexts': 11, './node': 70 },
- ],
- 56: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('../data/unit-conversions'),
- f = a('./unit'),
- g = a('./color'),
- h = function (a, b) {
- (this.value = parseFloat(a)),
- (this.unit = b && b instanceof f ? b : new f(b ? [b] : void 0));
- };
- (h.prototype = new d()),
- (h.prototype.type = 'Dimension'),
- (h.prototype.accept = function (a) {
- this.unit = a.visit(this.unit);
- }),
- (h.prototype.eval = function (a) {
- return this;
- }),
- (h.prototype.toColor = function () {
- return new g([this.value, this.value, this.value]);
- }),
- (h.prototype.genCSS = function (a, b) {
- if (a && a.strictUnits && !this.unit.isSingular())
- throw new Error(
- 'Multiple units in dimension. Correct the units or use the unit function. Bad unit: ' +
- this.unit.toString()
- );
- var c = this.fround(a, this.value),
- d = String(c);
- if (
- (0 !== c &&
- c < 1e-6 &&
- c > -1e-6 &&
- (d = c.toFixed(20).replace(/0+$/, '')),
- a && a.compress)
- ) {
- if (0 === c && this.unit.isLength()) return void b.add(d);
- c > 0 && c < 1 && (d = d.substr(1));
- }
- b.add(d), this.unit.genCSS(a, b);
- }),
- (h.prototype.operate = function (a, b, c) {
- var d = this._operate(a, b, this.value, c.value),
- e = this.unit.clone();
- if ('+' === b || '-' === b)
- if (0 === e.numerator.length && 0 === e.denominator.length)
- (e = c.unit.clone()),
- this.unit.backupUnit &&
- (e.backupUnit = this.unit.backupUnit);
- else if (
- 0 === c.unit.numerator.length &&
- 0 === e.denominator.length
- );
- else {
- if (
- ((c = c.convertTo(this.unit.usedUnits())),
- a.strictUnits && c.unit.toString() !== e.toString())
- )
- throw new Error(
- "Incompatible units. Change the units or use the unit function. Bad units: '" +
- e.toString() +
- "' and '" +
- c.unit.toString() +
- "'."
- );
- d = this._operate(a, b, this.value, c.value);
- }
- else
- '*' === b
- ? ((e.numerator = e.numerator
- .concat(c.unit.numerator)
- .sort()),
- (e.denominator = e.denominator
- .concat(c.unit.denominator)
- .sort()),
- e.cancel())
- : '/' === b &&
- ((e.numerator = e.numerator
- .concat(c.unit.denominator)
- .sort()),
- (e.denominator = e.denominator
- .concat(c.unit.numerator)
- .sort()),
- e.cancel());
- return new h(d, e);
- }),
- (h.prototype.compare = function (a) {
- var b, c;
- if (a instanceof h) {
- if (this.unit.isEmpty() || a.unit.isEmpty())
- (b = this), (c = a);
- else if (
- ((b = this.unify()),
- (c = a.unify()),
- 0 !== b.unit.compare(c.unit))
- )
- return;
- return d.numericCompare(b.value, c.value);
- }
- }),
- (h.prototype.unify = function () {
- return this.convertTo({
- length: 'px',
- duration: 's',
- angle: 'rad',
- });
- }),
- (h.prototype.convertTo = function (a) {
- var b,
- c,
- d,
- f,
- g,
- i = this.value,
- j = this.unit.clone(),
- k = {};
- if ('string' == typeof a) {
- for (b in e) e[b].hasOwnProperty(a) && ((k = {}), (k[b] = a));
- a = k;
- }
- g = function (a, b) {
- return d.hasOwnProperty(a)
- ? (b ? (i /= d[a] / d[f]) : (i *= d[a] / d[f]), f)
- : a;
- };
- for (c in a)
- a.hasOwnProperty(c) && ((f = a[c]), (d = e[c]), j.map(g));
- return j.cancel(), new h(i, j);
- }),
- (b.exports = h);
- },
- {
- '../data/unit-conversions': 14,
- './color': 50,
- './node': 70,
- './unit': 79,
- },
- ],
- 57: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./selector'),
- f = a('./ruleset'),
- g = function (a, b, c, d, f, g, h, i) {
- var j;
- if (((this.name = a), (this.value = b), c))
- for (
- Array.isArray(c)
- ? (this.rules = c)
- : ((this.rules = [c]),
- (this.rules[0].selectors = new e(
- [],
- null,
- null,
- this.index,
- f
- ).createEmptySelectors())),
- j = 0;
- j < this.rules.length;
- j++
- )
- this.rules[j].allowImports = !0;
- (this.index = d),
- (this.currentFileInfo = f),
- (this.debugInfo = g),
- (this.isRooted = h || !1),
- this.copyVisibilityInfo(i),
- (this.allowRoot = !0);
- };
- (g.prototype = new d()),
- (g.prototype.type = 'Directive'),
- (g.prototype.accept = function (a) {
- var b = this.value,
- c = this.rules;
- c && (this.rules = a.visitArray(c)),
- b && (this.value = a.visit(b));
- }),
- (g.prototype.isRulesetLike = function () {
- return this.rules || !this.isCharset();
- }),
- (g.prototype.isCharset = function () {
- return '@charset' === this.name;
- }),
- (g.prototype.genCSS = function (a, b) {
- var c = this.value,
- d = this.rules;
- b.add(this.name, this.currentFileInfo, this.index),
- c && (b.add(' '), c.genCSS(a, b)),
- d ? this.outputRuleset(a, b, d) : b.add(';');
- }),
- (g.prototype.eval = function (a) {
- var b,
- c,
- d = this.value,
- e = this.rules;
- return (
- (b = a.mediaPath),
- (c = a.mediaBlocks),
- (a.mediaPath = []),
- (a.mediaBlocks = []),
- d && (d = d.eval(a)),
- e && ((e = [e[0].eval(a)]), (e[0].root = !0)),
- (a.mediaPath = b),
- (a.mediaBlocks = c),
- new g(
- this.name,
- d,
- e,
- this.index,
- this.currentFileInfo,
- this.debugInfo,
- this.isRooted,
- this.visibilityInfo()
- )
- );
- }),
- (g.prototype.variable = function (a) {
- if (this.rules)
- return f.prototype.variable.call(this.rules[0], a);
- }),
- (g.prototype.find = function () {
- if (this.rules)
- return f.prototype.find.apply(this.rules[0], arguments);
- }),
- (g.prototype.rulesets = function () {
- if (this.rules) return f.prototype.rulesets.apply(this.rules[0]);
- }),
- (g.prototype.outputRuleset = function (a, b, c) {
- var d,
- e = c.length;
- if (((a.tabLevel = (0 | a.tabLevel) + 1), a.compress)) {
- for (b.add('{'), d = 0; d < e; d++) c[d].genCSS(a, b);
- return b.add('}'), void a.tabLevel--;
- }
- var f = '\n' + Array(a.tabLevel).join(' '),
- g = f + ' ';
- if (e) {
- for (b.add(' {' + g), c[0].genCSS(a, b), d = 1; d < e; d++)
- b.add(g), c[d].genCSS(a, b);
- b.add(f + '}');
- } else b.add(' {' + f + '}');
- a.tabLevel--;
- }),
- (b.exports = g);
- },
- { './node': 70, './ruleset': 76, './selector': 77 },
- ],
- 58: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./paren'),
- f = a('./combinator'),
- g = function (a, b, c, d, e) {
- (this.combinator = a instanceof f ? a : new f(a)),
- (this.value = 'string' == typeof b ? b.trim() : b ? b : ''),
- (this.index = c),
- (this.currentFileInfo = d),
- this.copyVisibilityInfo(e);
- };
- (g.prototype = new d()),
- (g.prototype.type = 'Element'),
- (g.prototype.accept = function (a) {
- var b = this.value;
- (this.combinator = a.visit(this.combinator)),
- 'object' == typeof b && (this.value = a.visit(b));
- }),
- (g.prototype.eval = function (a) {
- return new g(
- this.combinator,
- this.value.eval ? this.value.eval(a) : this.value,
- this.index,
- this.currentFileInfo,
- this.visibilityInfo()
- );
- }),
- (g.prototype.clone = function () {
- return new g(
- this.combinator,
- this.value,
- this.index,
- this.currentFileInfo,
- this.visibilityInfo()
- );
- }),
- (g.prototype.genCSS = function (a, b) {
- b.add(this.toCSS(a), this.currentFileInfo, this.index);
- }),
- (g.prototype.toCSS = function (a) {
- a = a || {};
- var b = this.value,
- c = a.firstSelector;
- return (
- b instanceof e && (a.firstSelector = !0),
- (b = b.toCSS ? b.toCSS(a) : b),
- (a.firstSelector = c),
- '' === b && '&' === this.combinator.value.charAt(0)
- ? ''
- : this.combinator.toCSS(a) + b
- );
- }),
- (b.exports = g);
- },
- { './combinator': 51, './node': 70, './paren': 72 },
- ],
- 59: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./paren'),
- f = a('./comment'),
- g = function (a) {
- if (((this.value = a), !a))
- throw new Error('Expression requires an array parameter');
- };
- (g.prototype = new d()),
- (g.prototype.type = 'Expression'),
- (g.prototype.accept = function (a) {
- this.value = a.visitArray(this.value);
- }),
- (g.prototype.eval = function (a) {
- var b,
- c = this.parens && !this.parensInOp,
- d = !1;
- return (
- c && a.inParenthesis(),
- this.value.length > 1
- ? (b = new g(
- this.value.map(function (b) {
- return b.eval(a);
- })
- ))
- : 1 === this.value.length
- ? (this.value[0].parens &&
- !this.value[0].parensInOp &&
- (d = !0),
- (b = this.value[0].eval(a)))
- : (b = this),
- c && a.outOfParenthesis(),
- this.parens &&
- this.parensInOp &&
- !a.isMathOn() &&
- !d &&
- (b = new e(b)),
- b
- );
- }),
- (g.prototype.genCSS = function (a, b) {
- for (var c = 0; c < this.value.length; c++)
- this.value[c].genCSS(a, b),
- c + 1 < this.value.length && b.add(' ');
- }),
- (g.prototype.throwAwayComments = function () {
- this.value = this.value.filter(function (a) {
- return !(a instanceof f);
- });
- }),
- (b.exports = g);
- },
- { './comment': 52, './node': 70, './paren': 72 },
- ],
- 60: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./selector'),
- f = function g(a, b, c, d, e) {
- switch (
- ((this.selector = a),
- (this.option = b),
- (this.index = c),
- (this.object_id = g.next_id++),
- (this.parent_ids = [this.object_id]),
- (this.currentFileInfo = d || {}),
- this.copyVisibilityInfo(e),
- (this.allowRoot = !0),
- b)
- ) {
- case 'all':
- (this.allowBefore = !0), (this.allowAfter = !0);
- break;
- default:
- (this.allowBefore = !1), (this.allowAfter = !1);
- }
- };
- (f.next_id = 0),
- (f.prototype = new d()),
- (f.prototype.type = 'Extend'),
- (f.prototype.accept = function (a) {
- this.selector = a.visit(this.selector);
- }),
- (f.prototype.eval = function (a) {
- return new f(
- this.selector.eval(a),
- this.option,
- this.index,
- this.currentFileInfo,
- this.visibilityInfo()
- );
- }),
- (f.prototype.clone = function (a) {
- return new f(
- this.selector,
- this.option,
- this.index,
- this.currentFileInfo,
- this.visibilityInfo()
- );
- }),
- (f.prototype.findSelfSelectors = function (a) {
- var b,
- c,
- d = [];
- for (b = 0; b < a.length; b++)
- (c = a[b].elements),
- b > 0 &&
- c.length &&
- '' === c[0].combinator.value &&
- (c[0].combinator.value = ' '),
- (d = d.concat(a[b].elements));
- (this.selfSelectors = [new e(d)]),
- this.selfSelectors[0].copyVisibilityInfo(this.visibilityInfo());
- }),
- (b.exports = f);
- },
- { './node': 70, './selector': 77 },
- ],
- 61: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./media'),
- f = a('./url'),
- g = a('./quoted'),
- h = a('./ruleset'),
- i = a('./anonymous'),
- j = function (a, b, c, d, e, f) {
- if (
- ((this.options = c),
- (this.index = d),
- (this.path = a),
- (this.features = b),
- (this.currentFileInfo = e),
- (this.allowRoot = !0),
- void 0 !== this.options.less || this.options.inline)
- )
- this.css = !this.options.less || this.options.inline;
- else {
- var g = this.getPath();
- g && /[#\.\&\?\/]css([\?;].*)?$/.test(g) && (this.css = !0);
- }
- this.copyVisibilityInfo(f);
- };
- (j.prototype = new d()),
- (j.prototype.type = 'Import'),
- (j.prototype.accept = function (a) {
- this.features && (this.features = a.visit(this.features)),
- (this.path = a.visit(this.path)),
- this.options.plugin ||
- this.options.inline ||
- !this.root ||
- (this.root = a.visit(this.root));
- }),
- (j.prototype.genCSS = function (a, b) {
- this.css &&
- void 0 === this.path.currentFileInfo.reference &&
- (b.add('@import ', this.currentFileInfo, this.index),
- this.path.genCSS(a, b),
- this.features && (b.add(' '), this.features.genCSS(a, b)),
- b.add(';'));
- }),
- (j.prototype.getPath = function () {
- return this.path instanceof f
- ? this.path.value.value
- : this.path.value;
- }),
- (j.prototype.isVariableImport = function () {
- var a = this.path;
- return (
- a instanceof f && (a = a.value),
- !(a instanceof g) || a.containsVariables()
- );
- }),
- (j.prototype.evalForImport = function (a) {
- var b = this.path;
- return (
- b instanceof f && (b = b.value),
- new j(
- b.eval(a),
- this.features,
- this.options,
- this.index,
- this.currentFileInfo,
- this.visibilityInfo()
- )
- );
- }),
- (j.prototype.evalPath = function (a) {
- var b = this.path.eval(a),
- c = this.currentFileInfo && this.currentFileInfo.rootpath;
- if (!(b instanceof f)) {
- if (c) {
- var d = b.value;
- d && a.isPathRelative(d) && (b.value = c + d);
- }
- b.value = a.normalizePath(b.value);
- }
- return b;
- }),
- (j.prototype.eval = function (a) {
- var b = this.doEval(a);
- return (
- (this.options.reference || this.blocksVisibility()) &&
- (b.length || 0 === b.length
- ? b.forEach(function (a) {
- a.addVisibilityBlock();
- })
- : b.addVisibilityBlock()),
- b
- );
- }),
- (j.prototype.doEval = function (a) {
- var b,
- c,
- d = this.features && this.features.eval(a);
- if (this.options.plugin)
- return (
- (c = a.frames[0] && a.frames[0].functionRegistry),
- c &&
- this.root &&
- this.root.functions &&
- c.addMultiple(this.root.functions),
- []
- );
- if (
- this.skip &&
- ('function' == typeof this.skip && (this.skip = this.skip()),
- this.skip)
- )
- return [];
- if (this.options.inline) {
- var f = new i(
- this.root,
- 0,
- {
- filename: this.importedFilename,
- reference:
- this.path.currentFileInfo &&
- this.path.currentFileInfo.reference,
- },
- !0,
- !0
- );
- return this.features ? new e([f], this.features.value) : [f];
- }
- if (this.css) {
- var g = new j(this.evalPath(a), d, this.options, this.index);
- if (!g.css && this.error) throw this.error;
- return g;
- }
- return (
- (b = new h(null, this.root.rules.slice(0))),
- b.evalImports(a),
- this.features ? new e(b.rules, this.features.value) : b.rules
- );
- }),
- (b.exports = j);
- },
- {
- './anonymous': 46,
- './media': 66,
- './node': 70,
- './quoted': 73,
- './ruleset': 76,
- './url': 80,
- },
- ],
- 62: [
- function (a, b, c) {
- var d = {};
- (d.Node = a('./node')),
- (d.Alpha = a('./alpha')),
- (d.Color = a('./color')),
- (d.Directive = a('./directive')),
- (d.DetachedRuleset = a('./detached-ruleset')),
- (d.Operation = a('./operation')),
- (d.Dimension = a('./dimension')),
- (d.Unit = a('./unit')),
- (d.Keyword = a('./keyword')),
- (d.Variable = a('./variable')),
- (d.Ruleset = a('./ruleset')),
- (d.Element = a('./element')),
- (d.Attribute = a('./attribute')),
- (d.Combinator = a('./combinator')),
- (d.Selector = a('./selector')),
- (d.Quoted = a('./quoted')),
- (d.Expression = a('./expression')),
- (d.Rule = a('./rule')),
- (d.Call = a('./call')),
- (d.URL = a('./url')),
- (d.Import = a('./import')),
- (d.mixin = {
- Call: a('./mixin-call'),
- Definition: a('./mixin-definition'),
- }),
- (d.Comment = a('./comment')),
- (d.Anonymous = a('./anonymous')),
- (d.Value = a('./value')),
- (d.JavaScript = a('./javascript')),
- (d.Assignment = a('./assignment')),
- (d.Condition = a('./condition')),
- (d.Paren = a('./paren')),
- (d.Media = a('./media')),
- (d.UnicodeDescriptor = a('./unicode-descriptor')),
- (d.Negative = a('./negative')),
- (d.Extend = a('./extend')),
- (d.RulesetCall = a('./ruleset-call')),
- (b.exports = d);
- },
- {
- './alpha': 45,
- './anonymous': 46,
- './assignment': 47,
- './attribute': 48,
- './call': 49,
- './color': 50,
- './combinator': 51,
- './comment': 52,
- './condition': 53,
- './detached-ruleset': 55,
- './dimension': 56,
- './directive': 57,
- './element': 58,
- './expression': 59,
- './extend': 60,
- './import': 61,
- './javascript': 63,
- './keyword': 65,
- './media': 66,
- './mixin-call': 67,
- './mixin-definition': 68,
- './negative': 69,
- './node': 70,
- './operation': 71,
- './paren': 72,
- './quoted': 73,
- './rule': 74,
- './ruleset': 76,
- './ruleset-call': 75,
- './selector': 77,
- './unicode-descriptor': 78,
- './unit': 79,
- './url': 80,
- './value': 81,
- './variable': 82,
- },
- ],
- 63: [
- function (a, b, c) {
- var d = a('./js-eval-node'),
- e = a('./dimension'),
- f = a('./quoted'),
- g = a('./anonymous'),
- h = function (a, b, c, d) {
- (this.escaped = b),
- (this.expression = a),
- (this.index = c),
- (this.currentFileInfo = d);
- };
- (h.prototype = new d()),
- (h.prototype.type = 'JavaScript'),
- (h.prototype.eval = function (a) {
- var b = this.evaluateJavaScript(this.expression, a);
- return 'number' == typeof b
- ? new e(b)
- : 'string' == typeof b
- ? new f('"' + b + '"', b, this.escaped, this.index)
- : new g(Array.isArray(b) ? b.join(', ') : b);
- }),
- (b.exports = h);
- },
- {
- './anonymous': 46,
- './dimension': 56,
- './js-eval-node': 64,
- './quoted': 73,
- },
- ],
- 64: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./variable'),
- f = function () {};
- (f.prototype = new d()),
- (f.prototype.evaluateJavaScript = function (a, b) {
- var c,
- d = this,
- f = {};
- if (void 0 !== b.javascriptEnabled && !b.javascriptEnabled)
- throw {
- message: 'You are using JavaScript, which has been disabled.',
- filename: this.currentFileInfo.filename,
- index: this.index,
- };
- a = a.replace(/@\{([\w-]+)\}/g, function (a, c) {
- return d.jsify(
- new e('@' + c, d.index, d.currentFileInfo).eval(b)
- );
- });
- try {
- a = new Function('return (' + a + ')');
- } catch (g) {
- throw {
- message:
- 'JavaScript evaluation error: ' +
- g.message +
- ' from `' +
- a +
- '`',
- filename: this.currentFileInfo.filename,
- index: this.index,
- };
- }
- var h = b.frames[0].variables();
- for (var i in h)
- h.hasOwnProperty(i) &&
- (f[i.slice(1)] = {
- value: h[i].value,
- toJS: function () {
- return this.value.eval(b).toCSS();
- },
- });
- try {
- c = a.call(f);
- } catch (g) {
- throw {
- message:
- "JavaScript evaluation error: '" +
- g.name +
- ': ' +
- g.message.replace(/["]/g, "'") +
- "'",
- filename: this.currentFileInfo.filename,
- index: this.index,
- };
- }
- return c;
- }),
- (f.prototype.jsify = function (a) {
- return Array.isArray(a.value) && a.value.length > 1
- ? '[' +
- a.value
- .map(function (a) {
- return a.toCSS();
- })
- .join(', ') +
- ']'
- : a.toCSS();
- }),
- (b.exports = f);
- },
- { './node': 70, './variable': 82 },
- ],
- 65: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a) {
- this.value = a;
- };
- (e.prototype = new d()),
- (e.prototype.type = 'Keyword'),
- (e.prototype.genCSS = function (a, b) {
- if ('%' === this.value)
- throw { type: 'Syntax', message: 'Invalid % without number' };
- b.add(this.value);
- }),
- (e.True = new e('true')),
- (e.False = new e('false')),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 66: [
- function (a, b, c) {
- var d = a('./ruleset'),
- e = a('./value'),
- f = a('./selector'),
- g = a('./anonymous'),
- h = a('./expression'),
- i = a('./directive'),
- j = function (a, b, c, g, h) {
- (this.index = c), (this.currentFileInfo = g);
- var i = new f(
- [],
- null,
- null,
- this.index,
- this.currentFileInfo
- ).createEmptySelectors();
- (this.features = new e(b)),
- (this.rules = [new d(i, a)]),
- (this.rules[0].allowImports = !0),
- this.copyVisibilityInfo(h),
- (this.allowRoot = !0);
- };
- (j.prototype = new i()),
- (j.prototype.type = 'Media'),
- (j.prototype.isRulesetLike = !0),
- (j.prototype.accept = function (a) {
- this.features && (this.features = a.visit(this.features)),
- this.rules && (this.rules = a.visitArray(this.rules));
- }),
- (j.prototype.genCSS = function (a, b) {
- b.add('@media ', this.currentFileInfo, this.index),
- this.features.genCSS(a, b),
- this.outputRuleset(a, b, this.rules);
- }),
- (j.prototype.eval = function (a) {
- a.mediaBlocks || ((a.mediaBlocks = []), (a.mediaPath = []));
- var b = new j(
- null,
- [],
- this.index,
- this.currentFileInfo,
- this.visibilityInfo()
- );
- this.debugInfo &&
- ((this.rules[0].debugInfo = this.debugInfo),
- (b.debugInfo = this.debugInfo));
- var c = !1;
- a.strictMath || ((c = !0), (a.strictMath = !0));
- try {
- b.features = this.features.eval(a);
- } finally {
- c && (a.strictMath = !1);
- }
- return (
- a.mediaPath.push(b),
- a.mediaBlocks.push(b),
- (this.rules[0].functionRegistry = a.frames[0].functionRegistry.inherit()),
- a.frames.unshift(this.rules[0]),
- (b.rules = [this.rules[0].eval(a)]),
- a.frames.shift(),
- a.mediaPath.pop(),
- 0 === a.mediaPath.length ? b.evalTop(a) : b.evalNested(a)
- );
- }),
- (j.prototype.evalTop = function (a) {
- var b = this;
- if (a.mediaBlocks.length > 1) {
- var c = new f(
- [],
- null,
- null,
- this.index,
- this.currentFileInfo
- ).createEmptySelectors();
- (b = new d(c, a.mediaBlocks)),
- (b.multiMedia = !0),
- b.copyVisibilityInfo(this.visibilityInfo());
- }
- return delete a.mediaBlocks, delete a.mediaPath, b;
- }),
- (j.prototype.evalNested = function (a) {
- var b,
- c,
- f = a.mediaPath.concat([this]);
- for (b = 0; b < f.length; b++)
- (c =
- f[b].features instanceof e
- ? f[b].features.value
- : f[b].features),
- (f[b] = Array.isArray(c) ? c : [c]);
- return (
- (this.features = new e(
- this.permute(f).map(function (a) {
- for (
- a = a.map(function (a) {
- return a.toCSS ? a : new g(a);
- }),
- b = a.length - 1;
- b > 0;
- b--
- )
- a.splice(b, 0, new g('and'));
- return new h(a);
- })
- )),
- new d([], [])
- );
- }),
- (j.prototype.permute = function (a) {
- if (0 === a.length) return [];
- if (1 === a.length) return a[0];
- for (
- var b = [], c = this.permute(a.slice(1)), d = 0;
- d < c.length;
- d++
- )
- for (var e = 0; e < a[0].length; e++)
- b.push([a[0][e]].concat(c[d]));
- return b;
- }),
- (j.prototype.bubbleSelectors = function (a) {
- a && (this.rules = [new d(a.slice(0), [this.rules[0]])]);
- }),
- (b.exports = j);
- },
- {
- './anonymous': 46,
- './directive': 57,
- './expression': 59,
- './ruleset': 76,
- './selector': 77,
- './value': 81,
- },
- ],
- 67: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./selector'),
- f = a('./mixin-definition'),
- g = a('../functions/default'),
- h = function (a, b, c, d, f) {
- (this.selector = new e(a)),
- (this.arguments = b || []),
- (this.index = c),
- (this.currentFileInfo = d),
- (this.important = f),
- (this.allowRoot = !0);
- };
- (h.prototype = new d()),
- (h.prototype.type = 'MixinCall'),
- (h.prototype.accept = function (a) {
- this.selector && (this.selector = a.visit(this.selector)),
- this.arguments.length &&
- (this.arguments = a.visitArray(this.arguments));
- }),
- (h.prototype.eval = function (a) {
- function b(b, c) {
- var d, e, f;
- for (d = 0; d < 2; d++) {
- for (x[d] = !0, g.value(d), e = 0; e < c.length && x[d]; e++)
- (f = c[e]),
- f.matchCondition &&
- (x[d] = x[d] && f.matchCondition(null, a));
- b.matchCondition && (x[d] = x[d] && b.matchCondition(t, a));
- }
- return x[0] || x[1] ? (x[0] != x[1] ? (x[1] ? A : B) : z) : y;
- }
- var c,
- d,
- e,
- h,
- i,
- j,
- k,
- l,
- m,
- n,
- o,
- p,
- q,
- r,
- s,
- t = [],
- u = [],
- v = !1,
- w = [],
- x = [],
- y = -1,
- z = 0,
- A = 1,
- B = 2;
- for (j = 0; j < this.arguments.length; j++)
- if (
- ((h = this.arguments[j]),
- (i = h.value.eval(a)),
- h.expand && Array.isArray(i.value))
- )
- for (i = i.value, k = 0; k < i.length; k++)
- t.push({ value: i[k] });
- else t.push({ name: h.name, value: i });
- for (
- s = function (b) {
- return b.matchArgs(null, a);
- },
- j = 0;
- j < a.frames.length;
- j++
- )
- if ((c = a.frames[j].find(this.selector, null, s)).length > 0) {
- for (n = !0, k = 0; k < c.length; k++) {
- for (
- d = c[k].rule, e = c[k].path, m = !1, l = 0;
- l < a.frames.length;
- l++
- )
- if (
- !(d instanceof f) &&
- d === (a.frames[l].originalRuleset || a.frames[l])
- ) {
- m = !0;
- break;
- }
- m ||
- (d.matchArgs(t, a) &&
- ((o = { mixin: d, group: b(d, e) }),
- o.group !== y && w.push(o),
- (v = !0)));
- }
- for (g.reset(), q = [0, 0, 0], k = 0; k < w.length; k++)
- q[w[k].group]++;
- if (q[z] > 0) p = B;
- else if (((p = A), q[A] + q[B] > 1))
- throw {
- type: 'Runtime',
- message:
- 'Ambiguous use of `default()` found when matching for `' +
- this.format(t) +
- '`',
- index: this.index,
- filename: this.currentFileInfo.filename,
- };
- for (k = 0; k < w.length; k++)
- if (((o = w[k].group), o === z || o === p))
- try {
- (d = w[k].mixin),
- d instanceof f ||
- ((r = d.originalRuleset || d),
- (d = new f(
- '',
- [],
- d.rules,
- null,
- !1,
- null,
- r.visibilityInfo()
- )),
- (d.originalRuleset = r));
- var C = d.evalCall(a, t, this.important).rules;
- this._setVisibilityToReplacement(C),
- Array.prototype.push.apply(u, C);
- } catch (D) {
- throw {
- message: D.message,
- index: this.index,
- filename: this.currentFileInfo.filename,
- stack: D.stack,
- };
- }
- if (v) return u;
- }
- throw n
- ? {
- type: 'Runtime',
- message:
- 'No matching definition was found for `' +
- this.format(t) +
- '`',
- index: this.index,
- filename: this.currentFileInfo.filename,
- }
- : {
- type: 'Name',
- message: this.selector.toCSS().trim() + ' is undefined',
- index: this.index,
- filename: this.currentFileInfo.filename,
- };
- }),
- (h.prototype._setVisibilityToReplacement = function (a) {
- var b, c;
- if (this.blocksVisibility())
- for (b = 0; b < a.length; b++)
- (c = a[b]), c.addVisibilityBlock();
- }),
- (h.prototype.format = function (a) {
- return (
- this.selector.toCSS().trim() +
- '(' +
- (a
- ? a
- .map(function (a) {
- var b = '';
- return (
- a.name && (b += a.name + ':'),
- (b += a.value.toCSS ? a.value.toCSS() : '???')
- );
- })
- .join(', ')
- : '') +
- ')'
- );
- }),
- (b.exports = h);
- },
- {
- '../functions/default': 20,
- './mixin-definition': 68,
- './node': 70,
- './selector': 77,
- },
- ],
- 68: [
- function (a, b, c) {
- var d = a('./selector'),
- e = a('./element'),
- f = a('./ruleset'),
- g = a('./rule'),
- h = a('./expression'),
- i = a('../contexts'),
- j = function (a, b, c, f, g, h, i) {
- (this.name = a),
- (this.selectors = [
- new d([new e(null, a, this.index, this.currentFileInfo)]),
- ]),
- (this.params = b),
- (this.condition = f),
- (this.variadic = g),
- (this.arity = b.length),
- (this.rules = c),
- (this._lookups = {});
- var j = [];
- (this.required = b.reduce(function (a, b) {
- return !b.name || (b.name && !b.value)
- ? a + 1
- : (j.push(b.name), a);
- }, 0)),
- (this.optionalParameters = j),
- (this.frames = h),
- this.copyVisibilityInfo(i),
- (this.allowRoot = !0);
- };
- (j.prototype = new f()),
- (j.prototype.type = 'MixinDefinition'),
- (j.prototype.evalFirst = !0),
- (j.prototype.accept = function (a) {
- this.params &&
- this.params.length &&
- (this.params = a.visitArray(this.params)),
- (this.rules = a.visitArray(this.rules)),
- this.condition && (this.condition = a.visit(this.condition));
- }),
- (j.prototype.evalParams = function (a, b, c, d) {
- var e,
- j,
- k,
- l,
- m,
- n,
- o,
- p,
- q = new f(null, null),
- r = this.params.slice(0),
- s = 0;
- if (
- (b.frames &&
- b.frames[0] &&
- b.frames[0].functionRegistry &&
- (q.functionRegistry = b.frames[0].functionRegistry.inherit()),
- (b = new i.Eval(b, [q].concat(b.frames))),
- c)
- )
- for (c = c.slice(0), s = c.length, k = 0; k < s; k++)
- if (((j = c[k]), (n = j && j.name))) {
- for (o = !1, l = 0; l < r.length; l++)
- if (!d[l] && n === r[l].name) {
- (d[l] = j.value.eval(a)),
- q.prependRule(new g(n, j.value.eval(a))),
- (o = !0);
- break;
- }
- if (o) {
- c.splice(k, 1), k--;
- continue;
- }
- throw {
- type: 'Runtime',
- message:
- 'Named argument for ' +
- this.name +
- ' ' +
- c[k].name +
- ' not found',
- };
- }
- for (p = 0, k = 0; k < r.length; k++)
- if (!d[k]) {
- if (((j = c && c[p]), (n = r[k].name)))
- if (r[k].variadic) {
- for (e = [], l = p; l < s; l++)
- e.push(c[l].value.eval(a));
- q.prependRule(new g(n, new h(e).eval(a)));
- } else {
- if ((m = j && j.value)) m = m.eval(a);
- else {
- if (!r[k].value)
- throw {
- type: 'Runtime',
- message:
- 'wrong number of arguments for ' +
- this.name +
- ' (' +
- s +
- ' for ' +
- this.arity +
- ')',
- };
- (m = r[k].value.eval(b)), q.resetCache();
- }
- q.prependRule(new g(n, m)), (d[k] = m);
- }
- if (r[k].variadic && c)
- for (l = p; l < s; l++) d[l] = c[l].value.eval(a);
- p++;
- }
- return q;
- }),
- (j.prototype.makeImportant = function () {
- var a = this.rules
- ? this.rules.map(function (a) {
- return a.makeImportant ? a.makeImportant(!0) : a;
- })
- : this.rules,
- b = new j(
- this.name,
- this.params,
- a,
- this.condition,
- this.variadic,
- this.frames
- );
- return b;
- }),
- (j.prototype.eval = function (a) {
- return new j(
- this.name,
- this.params,
- this.rules,
- this.condition,
- this.variadic,
- this.frames || a.frames.slice(0)
- );
- }),
- (j.prototype.evalCall = function (a, b, c) {
- var d,
- e,
- j = [],
- k = this.frames ? this.frames.concat(a.frames) : a.frames,
- l = this.evalParams(a, new i.Eval(a, k), b, j);
- return (
- l.prependRule(new g('@arguments', new h(j).eval(a))),
- (d = this.rules.slice(0)),
- (e = new f(null, d)),
- (e.originalRuleset = this),
- (e = e.eval(new i.Eval(a, [this, l].concat(k)))),
- c && (e = e.makeImportant()),
- e
- );
- }),
- (j.prototype.matchCondition = function (a, b) {
- return !(
- this.condition &&
- !this.condition.eval(
- new i.Eval(
- b,
- [
- this.evalParams(
- b,
- new i.Eval(
- b,
- this.frames ? this.frames.concat(b.frames) : b.frames
- ),
- a,
- []
- ),
- ]
- .concat(this.frames || [])
- .concat(b.frames)
- )
- )
- );
- }),
- (j.prototype.matchArgs = function (a, b) {
- var c,
- d = (a && a.length) || 0,
- e = this.optionalParameters,
- f = a
- ? a.reduce(function (a, b) {
- return e.indexOf(b.name) < 0 ? a + 1 : a;
- }, 0)
- : 0;
- if (this.variadic) {
- if (f < this.required - 1) return !1;
- } else {
- if (f < this.required) return !1;
- if (d > this.params.length) return !1;
- }
- c = Math.min(f, this.arity);
- for (var g = 0; g < c; g++)
- if (
- !this.params[g].name &&
- !this.params[g].variadic &&
- a[g].value.eval(b).toCSS() !=
- this.params[g].value.eval(b).toCSS()
- )
- return !1;
- return !0;
- }),
- (b.exports = j);
- },
- {
- '../contexts': 11,
- './element': 58,
- './expression': 59,
- './rule': 74,
- './ruleset': 76,
- './selector': 77,
- },
- ],
- 69: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./operation'),
- f = a('./dimension'),
- g = function (a) {
- this.value = a;
- };
- (g.prototype = new d()),
- (g.prototype.type = 'Negative'),
- (g.prototype.genCSS = function (a, b) {
- b.add('-'), this.value.genCSS(a, b);
- }),
- (g.prototype.eval = function (a) {
- return a.isMathOn()
- ? new e('*', [new f(-1), this.value]).eval(a)
- : new g(this.value.eval(a));
- }),
- (b.exports = g);
- },
- { './dimension': 56, './node': 70, './operation': 71 },
- ],
- 70: [
- function (a, b, c) {
- var d = function () {};
- (d.prototype.toCSS = function (a) {
- var b = [];
- return (
- this.genCSS(a, {
- add: function (a, c, d) {
- b.push(a);
- },
- isEmpty: function () {
- return 0 === b.length;
- },
- }),
- b.join('')
- );
- }),
- (d.prototype.genCSS = function (a, b) {
- b.add(this.value);
- }),
- (d.prototype.accept = function (a) {
- this.value = a.visit(this.value);
- }),
- (d.prototype.eval = function () {
- return this;
- }),
- (d.prototype._operate = function (a, b, c, d) {
- switch (b) {
- case '+':
- return c + d;
- case '-':
- return c - d;
- case '*':
- return c * d;
- case '/':
- return c / d;
- }
- }),
- (d.prototype.fround = function (a, b) {
- var c = a && a.numPrecision;
- return null == c ? b : Number((b + 2e-16).toFixed(c));
- }),
- (d.compare = function (a, b) {
- if (a.compare && 'Quoted' !== b.type && 'Anonymous' !== b.type)
- return a.compare(b);
- if (b.compare) return -b.compare(a);
- if (a.type === b.type) {
- if (((a = a.value), (b = b.value), !Array.isArray(a)))
- return a === b ? 0 : void 0;
- if (a.length === b.length) {
- for (var c = 0; c < a.length; c++)
- if (0 !== d.compare(a[c], b[c])) return;
- return 0;
- }
- }
- }),
- (d.numericCompare = function (a, b) {
- return a < b ? -1 : a === b ? 0 : a > b ? 1 : void 0;
- }),
- (d.prototype.blocksVisibility = function () {
- return (
- null == this.visibilityBlocks && (this.visibilityBlocks = 0),
- 0 !== this.visibilityBlocks
- );
- }),
- (d.prototype.addVisibilityBlock = function () {
- null == this.visibilityBlocks && (this.visibilityBlocks = 0),
- (this.visibilityBlocks = this.visibilityBlocks + 1);
- }),
- (d.prototype.removeVisibilityBlock = function () {
- null == this.visibilityBlocks && (this.visibilityBlocks = 0),
- (this.visibilityBlocks = this.visibilityBlocks - 1);
- }),
- (d.prototype.ensureVisibility = function () {
- this.nodeVisible = !0;
- }),
- (d.prototype.ensureInvisibility = function () {
- this.nodeVisible = !1;
- }),
- (d.prototype.isVisible = function () {
- return this.nodeVisible;
- }),
- (d.prototype.visibilityInfo = function () {
- return {
- visibilityBlocks: this.visibilityBlocks,
- nodeVisible: this.nodeVisible,
- };
- }),
- (d.prototype.copyVisibilityInfo = function (a) {
- a &&
- ((this.visibilityBlocks = a.visibilityBlocks),
- (this.nodeVisible = a.nodeVisible));
- }),
- (b.exports = d);
- },
- {},
- ],
- 71: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./color'),
- f = a('./dimension'),
- g = function (a, b, c) {
- (this.op = a.trim()), (this.operands = b), (this.isSpaced = c);
- };
- (g.prototype = new d()),
- (g.prototype.type = 'Operation'),
- (g.prototype.accept = function (a) {
- this.operands = a.visit(this.operands);
- }),
- (g.prototype.eval = function (a) {
- var b = this.operands[0].eval(a),
- c = this.operands[1].eval(a);
- if (a.isMathOn()) {
- if (
- (b instanceof f && c instanceof e && (b = b.toColor()),
- c instanceof f && b instanceof e && (c = c.toColor()),
- !b.operate)
- )
- throw {
- type: 'Operation',
- message: 'Operation on an invalid type',
- };
- return b.operate(a, this.op, c);
- }
- return new g(this.op, [b, c], this.isSpaced);
- }),
- (g.prototype.genCSS = function (a, b) {
- this.operands[0].genCSS(a, b),
- this.isSpaced && b.add(' '),
- b.add(this.op),
- this.isSpaced && b.add(' '),
- this.operands[1].genCSS(a, b);
- }),
- (b.exports = g);
- },
- { './color': 50, './dimension': 56, './node': 70 },
- ],
- 72: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a) {
- this.value = a;
- };
- (e.prototype = new d()),
- (e.prototype.type = 'Paren'),
- (e.prototype.genCSS = function (a, b) {
- b.add('('), this.value.genCSS(a, b), b.add(')');
- }),
- (e.prototype.eval = function (a) {
- return new e(this.value.eval(a));
- }),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 73: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./js-eval-node'),
- f = a('./variable'),
- g = function (a, b, c, d, e) {
- (this.escaped = null == c || c),
- (this.value = b || ''),
- (this.quote = a.charAt(0)),
- (this.index = d),
- (this.currentFileInfo = e);
- };
- (g.prototype = new e()),
- (g.prototype.type = 'Quoted'),
- (g.prototype.genCSS = function (a, b) {
- this.escaped ||
- b.add(this.quote, this.currentFileInfo, this.index),
- b.add(this.value),
- this.escaped || b.add(this.quote);
- }),
- (g.prototype.containsVariables = function () {
- return this.value.match(/(`([^`]+)`)|@\{([\w-]+)\}/);
- }),
- (g.prototype.eval = function (a) {
- function b(a, b, c) {
- var d = a;
- do (a = d), (d = a.replace(b, c));
- while (a !== d);
- return d;
- }
- var c = this,
- d = this.value,
- e = function (b, d) {
- return String(c.evaluateJavaScript(d, a));
- },
- h = function (b, d) {
- var e = new f('@' + d, c.index, c.currentFileInfo).eval(
- a,
- !0
- );
- return e instanceof g ? e.value : e.toCSS();
- };
- return (
- (d = b(d, /`([^`]+)`/g, e)),
- (d = b(d, /@\{([\w-]+)\}/g, h)),
- new g(
- this.quote + d + this.quote,
- d,
- this.escaped,
- this.index,
- this.currentFileInfo
- )
- );
- }),
- (g.prototype.compare = function (a) {
- return 'Quoted' !== a.type || this.escaped || a.escaped
- ? a.toCSS && this.toCSS() === a.toCSS()
- ? 0
- : void 0
- : d.numericCompare(this.value, a.value);
- }),
- (b.exports = g);
- },
- { './js-eval-node': 64, './node': 70, './variable': 82 },
- ],
- 74: [
- function (a, b, c) {
- function d(a, b) {
- var c,
- d = '',
- e = b.length,
- f = {
- add: function (a) {
- d += a;
- },
- };
- for (c = 0; c < e; c++) b[c].eval(a).genCSS(a, f);
- return d;
- }
- var e = a('./node'),
- f = a('./value'),
- g = a('./keyword'),
- h = function (a, b, c, d, g, h, i, j) {
- (this.name = a),
- (this.value = b instanceof e ? b : new f([b])),
- (this.important = c ? ' ' + c.trim() : ''),
- (this.merge = d),
- (this.index = g),
- (this.currentFileInfo = h),
- (this.inline = i || !1),
- (this.variable =
- void 0 !== j ? j : a.charAt && '@' === a.charAt(0)),
- (this.allowRoot = !0);
- };
- (h.prototype = new e()),
- (h.prototype.type = 'Rule'),
- (h.prototype.genCSS = function (a, b) {
- b.add(
- this.name + (a.compress ? ':' : ': '),
- this.currentFileInfo,
- this.index
- );
- try {
- this.value.genCSS(a, b);
- } catch (c) {
- throw (
- ((c.index = this.index),
- (c.filename = this.currentFileInfo.filename),
- c)
- );
- }
- b.add(
- this.important +
- (this.inline || (a.lastRule && a.compress) ? '' : ';'),
- this.currentFileInfo,
- this.index
- );
- }),
- (h.prototype.eval = function (a) {
- var b,
- c = !1,
- e = this.name,
- f = this.variable;
- 'string' != typeof e &&
- ((e =
- 1 === e.length && e[0] instanceof g ? e[0].value : d(a, e)),
- (f = !1)),
- 'font' !== e || a.strictMath || ((c = !0), (a.strictMath = !0));
- try {
- if (
- (a.importantScope.push({}),
- (b = this.value.eval(a)),
- !this.variable && 'DetachedRuleset' === b.type)
- )
- throw {
- message: 'Rulesets cannot be evaluated on a property.',
- index: this.index,
- filename: this.currentFileInfo.filename,
- };
- var i = this.important,
- j = a.importantScope.pop();
- return (
- !i && j.important && (i = j.important),
- new h(
- e,
- b,
- i,
- this.merge,
- this.index,
- this.currentFileInfo,
- this.inline,
- f
- )
- );
- } catch (k) {
- throw (
- ('number' != typeof k.index &&
- ((k.index = this.index),
- (k.filename = this.currentFileInfo.filename)),
- k)
- );
- } finally {
- c && (a.strictMath = !1);
- }
- }),
- (h.prototype.makeImportant = function () {
- return new h(
- this.name,
- this.value,
- '!important',
- this.merge,
- this.index,
- this.currentFileInfo,
- this.inline
- );
- }),
- (b.exports = h);
- },
- { './keyword': 65, './node': 70, './value': 81 },
- ],
- 75: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./variable'),
- f = function (a) {
- (this.variable = a), (this.allowRoot = !0);
- };
- (f.prototype = new d()),
- (f.prototype.type = 'RulesetCall'),
- (f.prototype.eval = function (a) {
- var b = new e(this.variable).eval(a);
- return b.callEval(a);
- }),
- (b.exports = f);
- },
- { './node': 70, './variable': 82 },
- ],
- 76: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./rule'),
- f = a('./selector'),
- g = a('./element'),
- h = a('./paren'),
- i = a('../contexts'),
- j = a('../functions/function-registry'),
- k = a('../functions/default'),
- l = a('./debug-info'),
- m = function (a, b, c, d) {
- (this.selectors = a),
- (this.rules = b),
- (this._lookups = {}),
- (this.strictImports = c),
- this.copyVisibilityInfo(d),
- (this.allowRoot = !0);
- };
- (m.prototype = new d()),
- (m.prototype.type = 'Ruleset'),
- (m.prototype.isRuleset = !0),
- (m.prototype.isRulesetLike = !0),
- (m.prototype.accept = function (a) {
- this.paths
- ? (this.paths = a.visitArray(this.paths, !0))
- : this.selectors &&
- (this.selectors = a.visitArray(this.selectors)),
- this.rules &&
- this.rules.length &&
- (this.rules = a.visitArray(this.rules));
- }),
- (m.prototype.eval = function (a) {
- var b,
- c,
- d,
- f,
- g = this.selectors,
- h = !1;
- if (g && (c = g.length)) {
- for (
- b = [],
- k.error({
- type: 'Syntax',
- message:
- 'it is currently only allowed in parametric mixin guards,',
- }),
- f = 0;
- f < c;
- f++
- )
- (d = g[f].eval(a)), b.push(d), d.evaldCondition && (h = !0);
- k.reset();
- } else h = !0;
- var i,
- l,
- n = this.rules ? this.rules.slice(0) : null,
- o = new m(b, n, this.strictImports, this.visibilityInfo());
- (o.originalRuleset = this),
- (o.root = this.root),
- (o.firstRoot = this.firstRoot),
- (o.allowImports = this.allowImports),
- this.debugInfo && (o.debugInfo = this.debugInfo),
- h || (n.length = 0),
- (o.functionRegistry = (function (a) {
- for (var b, c = 0, d = a.length; c !== d; ++c)
- if ((b = a[c].functionRegistry)) return b;
- return j;
- })(a.frames).inherit());
- var p = a.frames;
- p.unshift(o);
- var q = a.selectors;
- q || (a.selectors = q = []),
- q.unshift(this.selectors),
- (o.root || o.allowImports || !o.strictImports) &&
- o.evalImports(a);
- var r = o.rules,
- s = r ? r.length : 0;
- for (f = 0; f < s; f++) r[f].evalFirst && (r[f] = r[f].eval(a));
- var t = (a.mediaBlocks && a.mediaBlocks.length) || 0;
- for (f = 0; f < s; f++)
- 'MixinCall' === r[f].type
- ? ((n = r[f].eval(a).filter(function (a) {
- return (
- !(a instanceof e && a.variable) || !o.variable(a.name)
- );
- })),
- r.splice.apply(r, [f, 1].concat(n)),
- (s += n.length - 1),
- (f += n.length - 1),
- o.resetCache())
- : 'RulesetCall' === r[f].type &&
- ((n = r[f].eval(a).rules.filter(function (a) {
- return !(a instanceof e && a.variable);
- })),
- r.splice.apply(r, [f, 1].concat(n)),
- (s += n.length - 1),
- (f += n.length - 1),
- o.resetCache());
- for (f = 0; f < r.length; f++)
- (i = r[f]), i.evalFirst || (r[f] = i = i.eval ? i.eval(a) : i);
- for (f = 0; f < r.length; f++)
- if (
- ((i = r[f]),
- i instanceof m &&
- i.selectors &&
- 1 === i.selectors.length &&
- i.selectors[0].isJustParentSelector())
- ) {
- r.splice(f--, 1);
- for (var u = 0; u < i.rules.length; u++)
- (l = i.rules[u]),
- l.copyVisibilityInfo(i.visibilityInfo()),
- (l instanceof e && l.variable) || r.splice(++f, 0, l);
- }
- if ((p.shift(), q.shift(), a.mediaBlocks))
- for (f = t; f < a.mediaBlocks.length; f++)
- a.mediaBlocks[f].bubbleSelectors(b);
- return o;
- }),
- (m.prototype.evalImports = function (a) {
- var b,
- c,
- d = this.rules;
- if (d)
- for (b = 0; b < d.length; b++)
- 'Import' === d[b].type &&
- ((c = d[b].eval(a)),
- c && (c.length || 0 === c.length)
- ? (d.splice.apply(d, [b, 1].concat(c)),
- (b += c.length - 1))
- : d.splice(b, 1, c),
- this.resetCache());
- }),
- (m.prototype.makeImportant = function () {
- var a = new m(
- this.selectors,
- this.rules.map(function (a) {
- return a.makeImportant ? a.makeImportant() : a;
- }),
- this.strictImports,
- this.visibilityInfo()
- );
- return a;
- }),
- (m.prototype.matchArgs = function (a) {
- return !a || 0 === a.length;
- }),
- (m.prototype.matchCondition = function (a, b) {
- var c = this.selectors[this.selectors.length - 1];
- return (
- !!c.evaldCondition &&
- !(c.condition && !c.condition.eval(new i.Eval(b, b.frames)))
- );
- }),
- (m.prototype.resetCache = function () {
- (this._rulesets = null),
- (this._variables = null),
- (this._lookups = {});
- }),
- (m.prototype.variables = function () {
- return (
- this._variables ||
- (this._variables = this.rules
- ? this.rules.reduce(function (a, b) {
- if (
- (b instanceof e &&
- b.variable === !0 &&
- (a[b.name] = b),
- 'Import' === b.type && b.root && b.root.variables)
- ) {
- var c = b.root.variables();
- for (var d in c) c.hasOwnProperty(d) && (a[d] = c[d]);
- }
- return a;
- }, {})
- : {}),
- this._variables
- );
- }),
- (m.prototype.variable = function (a) {
- return this.variables()[a];
- }),
- (m.prototype.rulesets = function () {
- if (!this.rules) return [];
- var a,
- b,
- c = [],
- d = this.rules,
- e = d.length;
- for (a = 0; a < e; a++) (b = d[a]), b.isRuleset && c.push(b);
- return c;
- }),
- (m.prototype.prependRule = function (a) {
- var b = this.rules;
- b ? b.unshift(a) : (this.rules = [a]);
- }),
- (m.prototype.find = function (a, b, c) {
- b = b || this;
- var d,
- e,
- g = [],
- h = a.toCSS();
- return h in this._lookups
- ? this._lookups[h]
- : (this.rulesets().forEach(function (h) {
- if (h !== b)
- for (var i = 0; i < h.selectors.length; i++)
- if ((d = a.match(h.selectors[i]))) {
- if (a.elements.length > d) {
- if (!c || c(h)) {
- e = h.find(new f(a.elements.slice(d)), b, c);
- for (var j = 0; j < e.length; ++j)
- e[j].path.push(h);
- Array.prototype.push.apply(g, e);
- }
- } else g.push({ rule: h, path: [] });
- break;
- }
- }),
- (this._lookups[h] = g),
- g);
- }),
- (m.prototype.genCSS = function (a, b) {
- function c(a) {
- return 'boolean' == typeof a.isRulesetLike
- ? a.isRulesetLike
- : 'function' == typeof a.isRulesetLike && a.isRulesetLike();
- }
- var d,
- e,
- f,
- g,
- h,
- i = [],
- j = [];
- (a.tabLevel = a.tabLevel || 0), this.root || a.tabLevel++;
- var k,
- m = a.compress ? '' : Array(a.tabLevel + 1).join(' '),
- n = a.compress ? '' : Array(a.tabLevel).join(' '),
- o = 0,
- p = 0;
- for (d = 0; d < this.rules.length; d++)
- (g = this.rules[d]),
- 'Comment' === g.type
- ? (p === d && p++, j.push(g))
- : g.isCharset && g.isCharset()
- ? (j.splice(o, 0, g), o++, p++)
- : 'Import' === g.type
- ? (j.splice(p, 0, g), p++)
- : j.push(g);
- if (((j = i.concat(j)), !this.root)) {
- (f = l(a, this, n)), f && (b.add(f), b.add(n));
- var q,
- r = this.paths,
- s = r.length;
- for (k = a.compress ? ',' : ',\n' + n, d = 0; d < s; d++)
- if (((h = r[d]), (q = h.length)))
- for (
- d > 0 && b.add(k),
- a.firstSelector = !0,
- h[0].genCSS(a, b),
- a.firstSelector = !1,
- e = 1;
- e < q;
- e++
- )
- h[e].genCSS(a, b);
- b.add((a.compress ? '{' : ' {\n') + m);
- }
- for (d = 0; d < j.length; d++) {
- (g = j[d]), d + 1 === j.length && (a.lastRule = !0);
- var t = a.lastRule;
- c(g) && (a.lastRule = !1),
- g.genCSS
- ? g.genCSS(a, b)
- : g.value && b.add(g.value.toString()),
- (a.lastRule = t),
- a.lastRule
- ? (a.lastRule = !1)
- : b.add(a.compress ? '' : '\n' + m);
- }
- this.root ||
- (b.add(a.compress ? '}' : '\n' + n + '}'), a.tabLevel--),
- b.isEmpty() || a.compress || !this.firstRoot || b.add('\n');
- }),
- (m.prototype.joinSelectors = function (a, b, c) {
- for (var d = 0; d < c.length; d++) this.joinSelector(a, b, c[d]);
- }),
- (m.prototype.joinSelector = function (a, b, c) {
- function d(a, b) {
- var c, d;
- if (0 === a.length) c = new h(a[0]);
- else {
- var e = [];
- for (d = 0; d < a.length; d++)
- e.push(new g(null, a[d], b.index, b.currentFileInfo));
- c = new h(new f(e));
- }
- return c;
- }
- function e(a, b) {
- var c, d;
- return (
- (c = new g(null, a, b.index, b.currentFileInfo)),
- (d = new f([c]))
- );
- }
- function i(a, b, c, d) {
- var e, f, h;
- if (
- ((e = []),
- a.length > 0
- ? ((e = a.slice(0)),
- (f = e.pop()),
- (h = d.createDerived(f.elements.slice(0))))
- : (h = d.createDerived([])),
- b.length > 0)
- ) {
- var i = c.combinator,
- j = b[0].elements[0];
- i.emptyOrWhitespace &&
- !j.combinator.emptyOrWhitespace &&
- (i = j.combinator),
- h.elements.push(
- new g(i, j.value, c.index, c.currentFileInfo)
- ),
- (h.elements = h.elements.concat(b[0].elements.slice(1)));
- }
- if ((0 !== h.elements.length && e.push(h), b.length > 1)) {
- var k = b.slice(1);
- (k = k.map(function (a) {
- return a.createDerived(a.elements, []);
- })),
- (e = e.concat(k));
- }
- return e;
- }
- function j(a, b, c, d, e) {
- var f;
- for (f = 0; f < a.length; f++) {
- var g = i(a[f], b, c, d);
- e.push(g);
- }
- return e;
- }
- function k(a, b) {
- var c, d;
- if (0 !== a.length) {
- if (0 === b.length) return void b.push([new f(a)]);
- for (c = 0; c < b.length; c++)
- (d = b[c]),
- d.length > 0
- ? (d[d.length - 1] = d[d.length - 1].createDerived(
- d[d.length - 1].elements.concat(a)
- ))
- : d.push(new f(a));
- }
- }
- function l(a, b, c) {
- function f(a) {
- var b;
- return 'Paren' !== a.value.type
- ? null
- : ((b = a.value.value), 'Selector' !== b.type ? null : b);
- }
- var h,
- m,
- n,
- o,
- p,
- q,
- r,
- s,
- t,
- u,
- v = !1;
- for (o = [], p = [[]], h = 0; h < c.elements.length; h++)
- if (((s = c.elements[h]), '&' !== s.value)) {
- var w = f(s);
- if (null != w) {
- k(o, p);
- var x,
- y = [],
- z = [];
- for (
- x = l(y, b, w), v = v || x, n = 0;
- n < y.length;
- n++
- ) {
- var A = e(d(y[n], s), s);
- j(p, [A], s, c, z);
- }
- (p = z), (o = []);
- } else o.push(s);
- } else {
- for (v = !0, q = [], k(o, p), m = 0; m < p.length; m++)
- if (((r = p[m]), 0 === b.length))
- r.length > 0 &&
- r[0].elements.push(
- new g(s.combinator, '', s.index, s.currentFileInfo)
- ),
- q.push(r);
- else
- for (n = 0; n < b.length; n++) {
- var B = i(r, b[n], s, c);
- q.push(B);
- }
- (p = q), (o = []);
- }
- for (k(o, p), h = 0; h < p.length; h++)
- (t = p[h].length),
- t > 0 &&
- (a.push(p[h]),
- (u = p[h][t - 1]),
- (p[h][t - 1] = u.createDerived(
- u.elements,
- c.extendList
- )));
- return v;
- }
- function m(a, b) {
- var c = b.createDerived(
- b.elements,
- b.extendList,
- b.evaldCondition
- );
- return c.copyVisibilityInfo(a), c;
- }
- var n, o, p;
- if (((o = []), (p = l(o, b, c)), !p))
- if (b.length > 0)
- for (o = [], n = 0; n < b.length; n++) {
- var q = b[n].map(m.bind(this, c.visibilityInfo()));
- q.push(c), o.push(q);
- }
- else o = [[c]];
- for (n = 0; n < o.length; n++) a.push(o[n]);
- }),
- (b.exports = m);
- },
- {
- '../contexts': 11,
- '../functions/default': 20,
- '../functions/function-registry': 22,
- './debug-info': 54,
- './element': 58,
- './node': 70,
- './paren': 72,
- './rule': 74,
- './selector': 77,
- },
- ],
- 77: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('./element'),
- f = function (a, b, c, d, e, f) {
- (this.elements = a),
- (this.extendList = b),
- (this.condition = c),
- (this.currentFileInfo = e || {}),
- c || (this.evaldCondition = !0),
- this.copyVisibilityInfo(f);
- };
- (f.prototype = new d()),
- (f.prototype.type = 'Selector'),
- (f.prototype.accept = function (a) {
- this.elements && (this.elements = a.visitArray(this.elements)),
- this.extendList &&
- (this.extendList = a.visitArray(this.extendList)),
- this.condition && (this.condition = a.visit(this.condition));
- }),
- (f.prototype.createDerived = function (a, b, c) {
- var d = this.visibilityInfo();
- c = null != c ? c : this.evaldCondition;
- var e = new f(
- a,
- b || this.extendList,
- null,
- this.index,
- this.currentFileInfo,
- d
- );
- return (
- (e.evaldCondition = c), (e.mediaEmpty = this.mediaEmpty), e
- );
- }),
- (f.prototype.createEmptySelectors = function () {
- var a = new e('', '&', this.index, this.currentFileInfo),
- b = [new f([a], null, null, this.index, this.currentFileInfo)];
- return (b[0].mediaEmpty = !0), b;
- }),
- (f.prototype.match = function (a) {
- var b,
- c,
- d = this.elements,
- e = d.length;
- if (
- (a.CacheElements(), (b = a._elements.length), 0 === b || e < b)
- )
- return 0;
- for (c = 0; c < b; c++)
- if (d[c].value !== a._elements[c]) return 0;
- return b;
- }),
- (f.prototype.CacheElements = function () {
- if (!this._elements) {
- var a = this.elements
- .map(function (a) {
- return a.combinator.value + (a.value.value || a.value);
- })
- .join('')
- .match(/[,&#\*\.\w-]([\w-]|(\\.))*/g);
- a ? '&' === a[0] && a.shift() : (a = []), (this._elements = a);
- }
- }),
- (f.prototype.isJustParentSelector = function () {
- return (
- !this.mediaEmpty &&
- 1 === this.elements.length &&
- '&' === this.elements[0].value &&
- (' ' === this.elements[0].combinator.value ||
- '' === this.elements[0].combinator.value)
- );
- }),
- (f.prototype.eval = function (a) {
- var b = this.condition && this.condition.eval(a),
- c = this.elements,
- d = this.extendList;
- return (
- (c =
- c &&
- c.map(function (b) {
- return b.eval(a);
- })),
- (d =
- d &&
- d.map(function (b) {
- return b.eval(a);
- })),
- this.createDerived(c, d, b)
- );
- }),
- (f.prototype.genCSS = function (a, b) {
- var c, d;
- if (
- ((a && a.firstSelector) ||
- '' !== this.elements[0].combinator.value ||
- b.add(' ', this.currentFileInfo, this.index),
- !this._css)
- )
- for (c = 0; c < this.elements.length; c++)
- (d = this.elements[c]), d.genCSS(a, b);
- }),
- (f.prototype.getIsOutput = function () {
- return this.evaldCondition;
- }),
- (b.exports = f);
- },
- { './element': 58, './node': 70 },
- ],
- 78: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a) {
- this.value = a;
- };
- (e.prototype = new d()),
- (e.prototype.type = 'UnicodeDescriptor'),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 79: [
- function (a, b, c) {
- var d = a('./node'),
- e = a('../data/unit-conversions'),
- f = function (a, b, c) {
- (this.numerator = a ? a.slice(0).sort() : []),
- (this.denominator = b ? b.slice(0).sort() : []),
- c
- ? (this.backupUnit = c)
- : a && a.length && (this.backupUnit = a[0]);
- };
- (f.prototype = new d()),
- (f.prototype.type = 'Unit'),
- (f.prototype.clone = function () {
- return new f(
- this.numerator.slice(0),
- this.denominator.slice(0),
- this.backupUnit
- );
- }),
- (f.prototype.genCSS = function (a, b) {
- var c = a && a.strictUnits;
- 1 === this.numerator.length
- ? b.add(this.numerator[0])
- : !c && this.backupUnit
- ? b.add(this.backupUnit)
- : !c && this.denominator.length && b.add(this.denominator[0]);
- }),
- (f.prototype.toString = function () {
- var a,
- b = this.numerator.join('*');
- for (a = 0; a < this.denominator.length; a++)
- b += '/' + this.denominator[a];
- return b;
- }),
- (f.prototype.compare = function (a) {
- return this.is(a.toString()) ? 0 : void 0;
- }),
- (f.prototype.is = function (a) {
- return this.toString().toUpperCase() === a.toUpperCase();
- }),
- (f.prototype.isLength = function () {
- return Boolean(this.toCSS().match(/px|em|%|in|cm|mm|pc|pt|ex/));
- }),
- (f.prototype.isEmpty = function () {
- return (
- 0 === this.numerator.length && 0 === this.denominator.length
- );
- }),
- (f.prototype.isSingular = function () {
- return (
- this.numerator.length <= 1 && 0 === this.denominator.length
- );
- }),
- (f.prototype.map = function (a) {
- var b;
- for (b = 0; b < this.numerator.length; b++)
- this.numerator[b] = a(this.numerator[b], !1);
- for (b = 0; b < this.denominator.length; b++)
- this.denominator[b] = a(this.denominator[b], !0);
- }),
- (f.prototype.usedUnits = function () {
- var a,
- b,
- c,
- d = {};
- b = function (b) {
- return a.hasOwnProperty(b) && !d[c] && (d[c] = b), b;
- };
- for (c in e) e.hasOwnProperty(c) && ((a = e[c]), this.map(b));
- return d;
- }),
- (f.prototype.cancel = function () {
- var a,
- b,
- c = {};
- for (b = 0; b < this.numerator.length; b++)
- (a = this.numerator[b]), (c[a] = (c[a] || 0) + 1);
- for (b = 0; b < this.denominator.length; b++)
- (a = this.denominator[b]), (c[a] = (c[a] || 0) - 1);
- (this.numerator = []), (this.denominator = []);
- for (a in c)
- if (c.hasOwnProperty(a)) {
- var d = c[a];
- if (d > 0) for (b = 0; b < d; b++) this.numerator.push(a);
- else if (d < 0)
- for (b = 0; b < -d; b++) this.denominator.push(a);
- }
- this.numerator.sort(), this.denominator.sort();
- }),
- (b.exports = f);
- },
- { '../data/unit-conversions': 14, './node': 70 },
- ],
- 80: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a, b, c, d) {
- (this.value = a),
- (this.currentFileInfo = c),
- (this.index = b),
- (this.isEvald = d);
- };
- (e.prototype = new d()),
- (e.prototype.type = 'Url'),
- (e.prototype.accept = function (a) {
- this.value = a.visit(this.value);
- }),
- (e.prototype.genCSS = function (a, b) {
- b.add('url('), this.value.genCSS(a, b), b.add(')');
- }),
- (e.prototype.eval = function (a) {
- var b,
- c = this.value.eval(a);
- if (
- !this.isEvald &&
- ((b = this.currentFileInfo && this.currentFileInfo.rootpath),
- b &&
- 'string' == typeof c.value &&
- a.isPathRelative(c.value) &&
- (c.quote ||
- (b = b.replace(/[\(\)'"\s]/g, function (a) {
- return '\\' + a;
- })),
- (c.value = b + c.value)),
- (c.value = a.normalizePath(c.value)),
- a.urlArgs && !c.value.match(/^\s*data:/))
- ) {
- var d = c.value.indexOf('?') === -1 ? '?' : '&',
- f = d + a.urlArgs;
- c.value.indexOf('#') !== -1
- ? (c.value = c.value.replace('#', f + '#'))
- : (c.value += f);
- }
- return new e(c, this.index, this.currentFileInfo, !0);
- }),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 81: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a) {
- if (((this.value = a), !a))
- throw new Error('Value requires an array argument');
- };
- (e.prototype = new d()),
- (e.prototype.type = 'Value'),
- (e.prototype.accept = function (a) {
- this.value && (this.value = a.visitArray(this.value));
- }),
- (e.prototype.eval = function (a) {
- return 1 === this.value.length
- ? this.value[0].eval(a)
- : new e(
- this.value.map(function (b) {
- return b.eval(a);
- })
- );
- }),
- (e.prototype.genCSS = function (a, b) {
- var c;
- for (c = 0; c < this.value.length; c++)
- this.value[c].genCSS(a, b),
- c + 1 < this.value.length &&
- b.add(a && a.compress ? ',' : ', ');
- }),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 82: [
- function (a, b, c) {
- var d = a('./node'),
- e = function (a, b, c) {
- (this.name = a),
- (this.index = b),
- (this.currentFileInfo = c || {});
- };
- (e.prototype = new d()),
- (e.prototype.type = 'Variable'),
- (e.prototype.eval = function (a) {
- var b,
- c = this.name;
- if (
- (0 === c.indexOf('@@') &&
- (c =
- '@' +
- new e(c.slice(1), this.index, this.currentFileInfo).eval(a)
- .value),
- this.evaluating)
- )
- throw {
- type: 'Name',
- message: 'Recursive variable definition for ' + c,
- filename: this.currentFileInfo.filename,
- index: this.index,
- };
- if (
- ((this.evaluating = !0),
- (b = this.find(a.frames, function (b) {
- var d = b.variable(c);
- if (d) {
- if (d.important) {
- var e = a.importantScope[a.importantScope.length - 1];
- e.important = d.important;
- }
- return d.value.eval(a);
- }
- })))
- )
- return (this.evaluating = !1), b;
- throw {
- type: 'Name',
- message: 'variable ' + c + ' is undefined',
- filename: this.currentFileInfo.filename,
- index: this.index,
- };
- }),
- (e.prototype.find = function (a, b) {
- for (var c, d = 0; d < a.length; d++)
- if ((c = b.call(a, a[d]))) return c;
- return null;
- }),
- (b.exports = e);
- },
- { './node': 70 },
- ],
- 83: [
- function (a, b, c) {
- b.exports = {
- getLocation: function (a, b) {
- for (
- var c = a + 1, d = null, e = -1;
- --c >= 0 && '\n' !== b.charAt(c);
-
- )
- e++;
- return (
- 'number' == typeof a &&
- (d = (b.slice(0, a).match(/\n/g) || '').length),
- { line: d, column: e }
- );
- },
- };
- },
- {},
- ],
- 84: [
- function (a, b, c) {
- var d = a('../tree'),
- e = a('./visitor'),
- f = a('../logger'),
- g = function () {
- (this._visitor = new e(this)),
- (this.contexts = []),
- (this.allExtendsStack = [[]]);
- };
- g.prototype = {
- run: function (a) {
- return (
- (a = this._visitor.visit(a)),
- (a.allExtends = this.allExtendsStack[0]),
- a
- );
- },
- visitRule: function (a, b) {
- b.visitDeeper = !1;
- },
- visitMixinDefinition: function (a, b) {
- b.visitDeeper = !1;
- },
- visitRuleset: function (a, b) {
- if (!a.root) {
- var c,
- e,
- f,
- g,
- h = [],
- i = a.rules,
- j = i ? i.length : 0;
- for (c = 0; c < j; c++)
- a.rules[c] instanceof d.Extend &&
- (h.push(i[c]), (a.extendOnEveryPath = !0));
- var k = a.paths;
- for (c = 0; c < k.length; c++) {
- var l = k[c],
- m = l[l.length - 1],
- n = m.extendList;
- for (
- g = n ? n.slice(0).concat(h) : h,
- g &&
- (g = g.map(function (a) {
- return a.clone();
- })),
- e = 0;
- e < g.length;
- e++
- )
- (this.foundExtends = !0),
- (f = g[e]),
- f.findSelfSelectors(l),
- (f.ruleset = a),
- 0 === e && (f.firstExtendOnThisSelectorPath = !0),
- this.allExtendsStack[
- this.allExtendsStack.length - 1
- ].push(f);
- }
- this.contexts.push(a.selectors);
- }
- },
- visitRulesetOut: function (a) {
- a.root || (this.contexts.length = this.contexts.length - 1);
- },
- visitMedia: function (a, b) {
- (a.allExtends = []), this.allExtendsStack.push(a.allExtends);
- },
- visitMediaOut: function (a) {
- this.allExtendsStack.length = this.allExtendsStack.length - 1;
- },
- visitDirective: function (a, b) {
- (a.allExtends = []), this.allExtendsStack.push(a.allExtends);
- },
- visitDirectiveOut: function (a) {
- this.allExtendsStack.length = this.allExtendsStack.length - 1;
- },
- };
- var h = function () {
- this._visitor = new e(this);
- };
- (h.prototype = {
- run: function (a) {
- var b = new g();
- if (((this.extendIndices = {}), b.run(a), !b.foundExtends))
- return a;
- (a.allExtends = a.allExtends.concat(
- this.doExtendChaining(a.allExtends, a.allExtends)
- )),
- (this.allExtendsStack = [a.allExtends]);
- var c = this._visitor.visit(a);
- return this.checkExtendsForNonMatched(a.allExtends), c;
- },
- checkExtendsForNonMatched: function (a) {
- var b = this.extendIndices;
- a.filter(function (a) {
- return !a.hasFoundMatches && 1 == a.parent_ids.length;
- }).forEach(function (a) {
- var c = '_unknown_';
- try {
- c = a.selector.toCSS({});
- } catch (d) {}
- b[a.index + ' ' + c] ||
- ((b[a.index + ' ' + c] = !0),
- f.warn("extend '" + c + "' has no matches"));
- });
- },
- doExtendChaining: function (a, b, c) {
- var e,
- f,
- g,
- h,
- i,
- j,
- k,
- l,
- m = [],
- n = this;
- for (c = c || 0, e = 0; e < a.length; e++)
- for (f = 0; f < b.length; f++)
- (j = a[e]),
- (k = b[f]),
- j.parent_ids.indexOf(k.object_id) >= 0 ||
- ((i = [k.selfSelectors[0]]),
- (g = n.findMatch(j, i)),
- g.length &&
- ((j.hasFoundMatches = !0),
- j.selfSelectors.forEach(function (a) {
- var b = k.visibilityInfo();
- (h = n.extendSelector(g, i, a, j.isVisible())),
- (l = new d.Extend(
- k.selector,
- k.option,
- 0,
- k.currentFileInfo,
- b
- )),
- (l.selfSelectors = h),
- (h[h.length - 1].extendList = [l]),
- m.push(l),
- (l.ruleset = k.ruleset),
- (l.parent_ids = l.parent_ids.concat(
- k.parent_ids,
- j.parent_ids
- )),
- k.firstExtendOnThisSelectorPath &&
- ((l.firstExtendOnThisSelectorPath = !0),
- k.ruleset.paths.push(h));
- })));
- if (m.length) {
- if ((this.extendChainCount++, c > 100)) {
- var o = '{unable to calculate}',
- p = '{unable to calculate}';
- try {
- (o = m[0].selfSelectors[0].toCSS()),
- (p = m[0].selector.toCSS());
- } catch (q) {}
- throw {
- message:
- 'extend circular reference detected. One of the circular extends is currently:' +
- o +
- ':extend(' +
- p +
- ')',
- };
- }
- return m.concat(n.doExtendChaining(m, b, c + 1));
- }
- return m;
- },
- visitRule: function (a, b) {
- b.visitDeeper = !1;
- },
- visitMixinDefinition: function (a, b) {
- b.visitDeeper = !1;
- },
- visitSelector: function (a, b) {
- b.visitDeeper = !1;
- },
- visitRuleset: function (a, b) {
- if (!a.root) {
- var c,
- d,
- e,
- f,
- g = this.allExtendsStack[this.allExtendsStack.length - 1],
- h = [],
- i = this;
- for (e = 0; e < g.length; e++)
- for (d = 0; d < a.paths.length; d++)
- if (((f = a.paths[d]), !a.extendOnEveryPath)) {
- var j = f[f.length - 1].extendList;
- (j && j.length) ||
- ((c = this.findMatch(g[e], f)),
- c.length &&
- ((g[e].hasFoundMatches = !0),
- g[e].selfSelectors.forEach(function (a) {
- var b;
- (b = i.extendSelector(c, f, a, g[e].isVisible())),
- h.push(b);
- })));
- }
- a.paths = a.paths.concat(h);
- }
- },
- findMatch: function (a, b) {
- var c,
- d,
- e,
- f,
- g,
- h,
- i,
- j = this,
- k = a.selector.elements,
- l = [],
- m = [];
- for (c = 0; c < b.length; c++)
- for (d = b[c], e = 0; e < d.elements.length; e++)
- for (
- f = d.elements[e],
- (a.allowBefore || (0 === c && 0 === e)) &&
- l.push({
- pathIndex: c,
- index: e,
- matched: 0,
- initialCombinator: f.combinator,
- }),
- h = 0;
- h < l.length;
- h++
- )
- (i = l[h]),
- (g = f.combinator.value),
- '' === g && 0 === e && (g = ' '),
- !j.isElementValuesEqual(k[i.matched].value, f.value) ||
- (i.matched > 0 && k[i.matched].combinator.value !== g)
- ? (i = null)
- : i.matched++,
- i &&
- ((i.finished = i.matched === k.length),
- i.finished &&
- !a.allowAfter &&
- (e + 1 < d.elements.length || c + 1 < b.length) &&
- (i = null)),
- i
- ? i.finished &&
- ((i.length = k.length),
- (i.endPathIndex = c),
- (i.endPathElementIndex = e + 1),
- (l.length = 0),
- m.push(i))
- : (l.splice(h, 1), h--);
- return m;
- },
- isElementValuesEqual: function (a, b) {
- if ('string' == typeof a || 'string' == typeof b) return a === b;
- if (a instanceof d.Attribute)
- return (
- a.op === b.op &&
- a.key === b.key &&
- (a.value && b.value
- ? ((a = a.value.value || a.value),
- (b = b.value.value || b.value),
- a === b)
- : !a.value && !b.value)
- );
- if (((a = a.value), (b = b.value), a instanceof d.Selector)) {
- if (
- !(b instanceof d.Selector) ||
- a.elements.length !== b.elements.length
- )
- return !1;
- for (var c = 0; c < a.elements.length; c++) {
- if (
- a.elements[c].combinator.value !==
- b.elements[c].combinator.value &&
- (0 !== c ||
- (a.elements[c].combinator.value || ' ') !==
- (b.elements[c].combinator.value || ' '))
- )
- return !1;
- if (
- !this.isElementValuesEqual(
- a.elements[c].value,
- b.elements[c].value
- )
- )
- return !1;
- }
- return !0;
- }
- return !1;
- },
- extendSelector: function (a, b, c, e) {
- var f,
- g,
- h,
- i,
- j,
- k = 0,
- l = 0,
- m = [];
- for (f = 0; f < a.length; f++)
- (i = a[f]),
- (g = b[i.pathIndex]),
- (h = new d.Element(
- i.initialCombinator,
- c.elements[0].value,
- c.elements[0].index,
- c.elements[0].currentFileInfo
- )),
- i.pathIndex > k &&
- l > 0 &&
- ((m[m.length - 1].elements = m[
- m.length - 1
- ].elements.concat(b[k].elements.slice(l))),
- (l = 0),
- k++),
- (j = g.elements
- .slice(l, i.index)
- .concat([h])
- .concat(c.elements.slice(1))),
- k === i.pathIndex && f > 0
- ? (m[m.length - 1].elements = m[
- m.length - 1
- ].elements.concat(j))
- : ((m = m.concat(b.slice(k, i.pathIndex))),
- m.push(new d.Selector(j))),
- (k = i.endPathIndex),
- (l = i.endPathElementIndex),
- l >= b[k].elements.length && ((l = 0), k++);
- return (
- k < b.length &&
- l > 0 &&
- ((m[m.length - 1].elements = m[m.length - 1].elements.concat(
- b[k].elements.slice(l)
- )),
- k++),
- (m = m.concat(b.slice(k, b.length))),
- (m = m.map(function (a) {
- var b = a.createDerived(a.elements);
- return e ? b.ensureVisibility() : b.ensureInvisibility(), b;
- }))
- );
- },
- visitMedia: function (a, b) {
- var c = a.allExtends.concat(
- this.allExtendsStack[this.allExtendsStack.length - 1]
- );
- (c = c.concat(this.doExtendChaining(c, a.allExtends))),
- this.allExtendsStack.push(c);
- },
- visitMediaOut: function (a) {
- var b = this.allExtendsStack.length - 1;
- this.allExtendsStack.length = b;
- },
- visitDirective: function (a, b) {
- var c = a.allExtends.concat(
- this.allExtendsStack[this.allExtendsStack.length - 1]
- );
- (c = c.concat(this.doExtendChaining(c, a.allExtends))),
- this.allExtendsStack.push(c);
- },
- visitDirectiveOut: function (a) {
- var b = this.allExtendsStack.length - 1;
- this.allExtendsStack.length = b;
- },
- }),
- (b.exports = h);
- },
- { '../logger': 33, '../tree': 62, './visitor': 91 },
- ],
- 85: [
- function (a, b, c) {
- function d(a) {
- (this.imports = []),
- (this.variableImports = []),
- (this._onSequencerEmpty = a),
- (this._currentDepth = 0);
- }
- (d.prototype.addImport = function (a) {
- var b = this,
- c = { callback: a, args: null, isReady: !1 };
- return (
- this.imports.push(c),
- function () {
- (c.args = Array.prototype.slice.call(arguments, 0)),
- (c.isReady = !0),
- b.tryRun();
- }
- );
- }),
- (d.prototype.addVariableImport = function (a) {
- this.variableImports.push(a);
- }),
- (d.prototype.tryRun = function () {
- this._currentDepth++;
- try {
- for (;;) {
- for (; this.imports.length > 0; ) {
- var a = this.imports[0];
- if (!a.isReady) return;
- (this.imports = this.imports.slice(1)),
- a.callback.apply(null, a.args);
- }
- if (0 === this.variableImports.length) break;
- var b = this.variableImports[0];
- (this.variableImports = this.variableImports.slice(1)), b();
- }
- } finally {
- this._currentDepth--;
- }
- 0 === this._currentDepth &&
- this._onSequencerEmpty &&
- this._onSequencerEmpty();
- }),
- (b.exports = d);
- },
- {},
- ],
- 86: [
- function (a, b, c) {
- var d = a('../contexts'),
- e = a('./visitor'),
- f = a('./import-sequencer'),
- g = function (a, b) {
- (this._visitor = new e(this)),
- (this._importer = a),
- (this._finish = b),
- (this.context = new d.Eval()),
- (this.importCount = 0),
- (this.onceFileDetectionMap = {}),
- (this.recursionDetector = {}),
- (this._sequencer = new f(this._onSequencerEmpty.bind(this)));
- };
- (g.prototype = {
- isReplacing: !1,
- run: function (a) {
- try {
- this._visitor.visit(a);
- } catch (b) {
- this.error = b;
- }
- (this.isFinished = !0), this._sequencer.tryRun();
- },
- _onSequencerEmpty: function () {
- this.isFinished && this._finish(this.error);
- },
- visitImport: function (a, b) {
- var c = a.options.inline;
- if (!a.css || c) {
- var e = new d.Eval(this.context, this.context.frames.slice(0)),
- f = e.frames[0];
- this.importCount++,
- a.isVariableImport()
- ? this._sequencer.addVariableImport(
- this.processImportNode.bind(this, a, e, f)
- )
- : this.processImportNode(a, e, f);
- }
- b.visitDeeper = !1;
- },
- processImportNode: function (a, b, c) {
- var d,
- e = a.options.inline;
- try {
- d = a.evalForImport(b);
- } catch (f) {
- f.filename ||
- ((f.index = a.index),
- (f.filename = a.currentFileInfo.filename)),
- (a.css = !0),
- (a.error = f);
- }
- if (!d || (d.css && !e))
- this.importCount--, this.isFinished && this._sequencer.tryRun();
- else {
- d.options.multiple && (b.importMultiple = !0);
- for (var g = void 0 === d.css, h = 0; h < c.rules.length; h++)
- if (c.rules[h] === a) {
- c.rules[h] = d;
- break;
- }
- var i = this.onImported.bind(this, d, b),
- j = this._sequencer.addImport(i);
- this._importer.push(
- d.getPath(),
- g,
- d.currentFileInfo,
- d.options,
- j
- );
- }
- },
- onImported: function (a, b, c, d, e, f) {
- c &&
- (c.filename ||
- ((c.index = a.index),
- (c.filename = a.currentFileInfo.filename)),
- (this.error = c));
- var g = this,
- h = a.options.inline,
- i = a.options.plugin,
- j = a.options.optional,
- k = e || f in g.recursionDetector;
- if (
- (b.importMultiple ||
- (a.skip =
- !!k ||
- function () {
- return (
- f in g.onceFileDetectionMap ||
- ((g.onceFileDetectionMap[f] = !0), !1)
- );
- }),
- !f && j && (a.skip = !0),
- d &&
- ((a.root = d),
- (a.importedFilename = f),
- !h && !i && (b.importMultiple || !k)))
- ) {
- g.recursionDetector[f] = !0;
- var l = this.context;
- this.context = b;
- try {
- this._visitor.visit(d);
- } catch (c) {
- this.error = c;
- }
- this.context = l;
- }
- g.importCount--, g.isFinished && g._sequencer.tryRun();
- },
- visitRule: function (a, b) {
- 'DetachedRuleset' === a.value.type
- ? this.context.frames.unshift(a)
- : (b.visitDeeper = !1);
- },
- visitRuleOut: function (a) {
- 'DetachedRuleset' === a.value.type && this.context.frames.shift();
- },
- visitDirective: function (a, b) {
- this.context.frames.unshift(a);
- },
- visitDirectiveOut: function (a) {
- this.context.frames.shift();
- },
- visitMixinDefinition: function (a, b) {
- this.context.frames.unshift(a);
- },
- visitMixinDefinitionOut: function (a) {
- this.context.frames.shift();
- },
- visitRuleset: function (a, b) {
- this.context.frames.unshift(a);
- },
- visitRulesetOut: function (a) {
- this.context.frames.shift();
- },
- visitMedia: function (a, b) {
- this.context.frames.unshift(a.rules[0]);
- },
- visitMediaOut: function (a) {
- this.context.frames.shift();
- },
- }),
- (b.exports = g);
- },
- { '../contexts': 11, './import-sequencer': 85, './visitor': 91 },
- ],
- 87: [
- function (a, b, c) {
- var d = {
- Visitor: a('./visitor'),
- ImportVisitor: a('./import-visitor'),
- MarkVisibleSelectorsVisitor: a('./set-tree-visibility-visitor'),
- ExtendVisitor: a('./extend-visitor'),
- JoinSelectorVisitor: a('./join-selector-visitor'),
- ToCSSVisitor: a('./to-css-visitor'),
- };
- b.exports = d;
- },
- {
- './extend-visitor': 84,
- './import-visitor': 86,
- './join-selector-visitor': 88,
- './set-tree-visibility-visitor': 89,
- './to-css-visitor': 90,
- './visitor': 91,
- },
- ],
- 88: [
- function (a, b, c) {
- var d = a('./visitor'),
- e = function () {
- (this.contexts = [[]]), (this._visitor = new d(this));
- };
- (e.prototype = {
- run: function (a) {
- return this._visitor.visit(a);
- },
- visitRule: function (a, b) {
- b.visitDeeper = !1;
- },
- visitMixinDefinition: function (a, b) {
- b.visitDeeper = !1;
- },
- visitRuleset: function (a, b) {
- var c,
- d = this.contexts[this.contexts.length - 1],
- e = [];
- this.contexts.push(e),
- a.root ||
- ((c = a.selectors),
- c &&
- ((c = c.filter(function (a) {
- return a.getIsOutput();
- })),
- (a.selectors = c.length ? c : (c = null)),
- c && a.joinSelectors(e, d, c)),
- c || (a.rules = null),
- (a.paths = e));
- },
- visitRulesetOut: function (a) {
- this.contexts.length = this.contexts.length - 1;
- },
- visitMedia: function (a, b) {
- var c = this.contexts[this.contexts.length - 1];
- a.rules[0].root = 0 === c.length || c[0].multiMedia;
- },
- visitDirective: function (a, b) {
- var c = this.contexts[this.contexts.length - 1];
- a.rules &&
- a.rules.length &&
- (a.rules[0].root = a.isRooted || 0 === c.length || null);
- },
- }),
- (b.exports = e);
- },
- { './visitor': 91 },
- ],
- 89: [
- function (a, b, c) {
- var d = function (a) {
- this.visible = a;
- };
- (d.prototype.run = function (a) {
- this.visit(a);
- }),
- (d.prototype.visitArray = function (a) {
- if (!a) return a;
- var b,
- c = a.length;
- for (b = 0; b < c; b++) this.visit(a[b]);
- return a;
- }),
- (d.prototype.visit = function (a) {
- return a
- ? a.constructor === Array
- ? this.visitArray(a)
- : !a.blocksVisibility || a.blocksVisibility()
- ? a
- : (this.visible
- ? a.ensureVisibility()
- : a.ensureInvisibility(),
- a.accept(this),
- a)
- : a;
- }),
- (b.exports = d);
- },
- {},
- ],
- 90: [
- function (a, b, c) {
- var d = a('../tree'),
- e = a('./visitor'),
- f = function (a) {
- (this._visitor = new e(this)), (this._context = a);
- };
- f.prototype = {
- containsSilentNonBlockedChild: function (a) {
- var b;
- if (null == a) return !1;
- for (var c = 0; c < a.length; c++)
- if (
- ((b = a[c]),
- b.isSilent &&
- b.isSilent(this._context) &&
- !b.blocksVisibility())
- )
- return !0;
- return !1;
- },
- keepOnlyVisibleChilds: function (a) {
- null != a &&
- null != a.rules &&
- (a.rules = a.rules.filter(function (a) {
- return a.isVisible();
- }));
- },
- isEmpty: function (a) {
- return null == a || null == a.rules || 0 === a.rules.length;
- },
- hasVisibleSelector: function (a) {
- return null != a && null != a.paths && a.paths.length > 0;
- },
- resolveVisibility: function (a, b) {
- if (!a.blocksVisibility()) {
- if (this.isEmpty(a) && !this.containsSilentNonBlockedChild(b))
- return;
- return a;
- }
- var c = a.rules[0];
- if ((this.keepOnlyVisibleChilds(c), !this.isEmpty(c)))
- return a.ensureVisibility(), a.removeVisibilityBlock(), a;
- },
- isVisibleRuleset: function (a) {
- return (
- !!a.firstRoot ||
- (!this.isEmpty(a) && !(!a.root && !this.hasVisibleSelector(a)))
- );
- },
- };
- var g = function (a) {
- (this._visitor = new e(this)),
- (this._context = a),
- (this.utils = new f(a));
- };
- (g.prototype = {
- isReplacing: !0,
- run: function (a) {
- return this._visitor.visit(a);
- },
- visitRule: function (a, b) {
- if (!a.blocksVisibility() && !a.variable) return a;
- },
- visitMixinDefinition: function (a, b) {
- a.frames = [];
- },
- visitExtend: function (a, b) {},
- visitComment: function (a, b) {
- if (!a.blocksVisibility() && !a.isSilent(this._context)) return a;
- },
- visitMedia: function (a, b) {
- var c = a.rules[0].rules;
- return (
- a.accept(this._visitor),
- (b.visitDeeper = !1),
- this.utils.resolveVisibility(a, c)
- );
- },
- visitImport: function (a, b) {
- if (!a.blocksVisibility()) return a;
- },
- visitDirective: function (a, b) {
- return a.rules && a.rules.length
- ? this.visitDirectiveWithBody(a, b)
- : this.visitDirectiveWithoutBody(a, b);
- },
- visitDirectiveWithBody: function (a, b) {
- function c(a) {
- var b = a.rules;
- return (
- 1 === b.length && (!b[0].paths || 0 === b[0].paths.length)
- );
- }
- function d(a) {
- var b = a.rules;
- return c(a) ? b[0].rules : b;
- }
- var e = d(a);
- return (
- a.accept(this._visitor),
- (b.visitDeeper = !1),
- this.utils.isEmpty(a) || this._mergeRules(a.rules[0].rules),
- this.utils.resolveVisibility(a, e)
- );
- },
- visitDirectiveWithoutBody: function (a, b) {
- if (!a.blocksVisibility()) {
- if ('@charset' === a.name) {
- if (this.charset) {
- if (a.debugInfo) {
- var c = new d.Comment(
- '/* ' +
- a.toCSS(this._context).replace(/\n/g, '') +
- ' */\n'
- );
- return (
- (c.debugInfo = a.debugInfo), this._visitor.visit(c)
- );
- }
- return;
- }
- this.charset = !0;
- }
- return a;
- }
- },
- checkValidNodes: function (a, b) {
- if (a)
- for (var c = 0; c < a.length; c++) {
- var e = a[c];
- if (b && e instanceof d.Rule && !e.variable)
- throw {
- message:
- 'Properties must be inside selector blocks. They cannot be in the root',
- index: e.index,
- filename: e.currentFileInfo && e.currentFileInfo.filename,
- };
- if (e instanceof d.Call)
- throw {
- message: "Function '" + e.name + "' is undefined",
- index: e.index,
- filename: e.currentFileInfo && e.currentFileInfo.filename,
- };
- if (e.type && !e.allowRoot)
- throw {
- message:
- e.type +
- ' node returned by a function is not valid here',
- index: e.index,
- filename: e.currentFileInfo && e.currentFileInfo.filename,
- };
- }
- },
- visitRuleset: function (a, b) {
- var c,
- d = [];
- if ((this.checkValidNodes(a.rules, a.firstRoot), a.root))
- a.accept(this._visitor), (b.visitDeeper = !1);
- else {
- this._compileRulesetPaths(a);
- for (var e = a.rules, f = e ? e.length : 0, g = 0; g < f; )
- (c = e[g]),
- c && c.rules
- ? (d.push(this._visitor.visit(c)), e.splice(g, 1), f--)
- : g++;
- f > 0 ? a.accept(this._visitor) : (a.rules = null),
- (b.visitDeeper = !1);
- }
- return (
- a.rules &&
- (this._mergeRules(a.rules),
- this._removeDuplicateRules(a.rules)),
- this.utils.isVisibleRuleset(a) &&
- (a.ensureVisibility(), d.splice(0, 0, a)),
- 1 === d.length ? d[0] : d
- );
- },
- _compileRulesetPaths: function (a) {
- a.paths &&
- (a.paths = a.paths.filter(function (a) {
- var b;
- for (
- ' ' === a[0].elements[0].combinator.value &&
- (a[0].elements[0].combinator = new d.Combinator('')),
- b = 0;
- b < a.length;
- b++
- )
- if (a[b].isVisible() && a[b].getIsOutput()) return !0;
- return !1;
- }));
- },
- _removeDuplicateRules: function (a) {
- if (a) {
- var b,
- c,
- e,
- f = {};
- for (e = a.length - 1; e >= 0; e--)
- if (((c = a[e]), c instanceof d.Rule))
- if (f[c.name]) {
- (b = f[c.name]),
- b instanceof d.Rule &&
- (b = f[c.name] = [f[c.name].toCSS(this._context)]);
- var g = c.toCSS(this._context);
- b.indexOf(g) !== -1 ? a.splice(e, 1) : b.push(g);
- } else f[c.name] = c;
- }
- },
- _mergeRules: function (a) {
- if (a) {
- for (var b, c, e, f = {}, g = 0; g < a.length; g++)
- (c = a[g]),
- c instanceof d.Rule &&
- c.merge &&
- ((e = [c.name, c.important ? '!' : ''].join(',')),
- f[e] ? a.splice(g--, 1) : (f[e] = []),
- f[e].push(c));
- Object.keys(f).map(function (a) {
- function e(a) {
- return new d.Expression(
- a.map(function (a) {
- return a.value;
- })
- );
- }
- function g(a) {
- return new d.Value(
- a.map(function (a) {
- return a;
- })
- );
- }
- if (((b = f[a]), b.length > 1)) {
- c = b[0];
- var h = [],
- i = [];
- b.map(function (a) {
- '+' === a.merge &&
- (i.length > 0 && h.push(e(i)), (i = [])),
- i.push(a);
- }),
- h.push(e(i)),
- (c.value = g(h));
- }
- });
- }
- },
- visitAnonymous: function (a, b) {
- if (!a.blocksVisibility()) return a.accept(this._visitor), a;
- },
- }),
- (b.exports = g);
- },
- { '../tree': 62, './visitor': 91 },
- ],
- 91: [
- function (a, b, c) {
- function d(a) {
- return a;
- }
- function e(a, b) {
- var c, d;
- for (c in a)
- if (a.hasOwnProperty(c))
- switch (((d = a[c]), typeof d)) {
- case 'function':
- d.prototype &&
- d.prototype.type &&
- (d.prototype.typeIndex = b++);
- break;
- case 'object':
- b = e(d, b);
- }
- return b;
- }
- var f = a('../tree'),
- g = { visitDeeper: !0 },
- h = !1,
- i = function (a) {
- (this._implementation = a),
- (this._visitFnCache = []),
- h || (e(f, 1), (h = !0));
- };
- (i.prototype = {
- visit: function (a) {
- if (!a) return a;
- var b = a.typeIndex;
- if (!b) return a;
- var c,
- e = this._visitFnCache,
- f = this._implementation,
- h = b << 1,
- i = 1 | h,
- j = e[h],
- k = e[i],
- l = g;
- if (
- ((l.visitDeeper = !0),
- j ||
- ((c = 'visit' + a.type),
- (j = f[c] || d),
- (k = f[c + 'Out'] || d),
- (e[h] = j),
- (e[i] = k)),
- j !== d)
- ) {
- var m = j.call(f, a, l);
- f.isReplacing && (a = m);
- }
- return (
- l.visitDeeper && a && a.accept && a.accept(this),
- k != d && k.call(f, a),
- a
- );
- },
- visitArray: function (a, b) {
- if (!a) return a;
- var c,
- d = a.length;
- if (b || !this._implementation.isReplacing) {
- for (c = 0; c < d; c++) this.visit(a[c]);
- return a;
- }
- var e = [];
- for (c = 0; c < d; c++) {
- var f = this.visit(a[c]);
- void 0 !== f &&
- (f.splice ? f.length && this.flatten(f, e) : e.push(f));
- }
- return e;
- },
- flatten: function (a, b) {
- b || (b = []);
- var c, d, e, f, g, h;
- for (d = 0, c = a.length; d < c; d++)
- if (((e = a[d]), void 0 !== e))
- if (e.splice)
- for (g = 0, f = e.length; g < f; g++)
- (h = e[g]),
- void 0 !== h &&
- (h.splice
- ? h.length && this.flatten(h, b)
- : b.push(h));
- else b.push(e);
- return b;
- },
- }),
- (b.exports = i);
- },
- { '../tree': 62 },
- ],
- 92: [
- function (a, b, c) {
- 'use strict';
- function d() {
- if (i.length) throw i.shift();
- }
- function e(a) {
- var b;
- (b = h.length ? h.pop() : new f()), (b.task = a), g(b);
- }
- function f() {
- this.task = null;
- }
- var g = a('./raw'),
- h = [],
- i = [],
- j = g.makeRequestCallFromTimer(d);
- (b.exports = e),
- (f.prototype.call = function () {
- try {
- this.task.call();
- } catch (a) {
- e.onerror ? e.onerror(a) : (i.push(a), j());
- } finally {
- (this.task = null), (h[h.length] = this);
- }
- });
- },
- { './raw': 93 },
- ],
- 93: [
- function (a, b, c) {
- (function (a) {
- 'use strict';
- function c(a) {
- h.length || (g(), (i = !0)), (h[h.length] = a);
- }
- function d() {
- for (; j < h.length; ) {
- var a = j;
- if (((j += 1), h[a].call(), j > k)) {
- for (var b = 0, c = h.length - j; b < c; b++) h[b] = h[b + j];
- (h.length -= j), (j = 0);
- }
- }
- (h.length = 0), (j = 0), (i = !1);
- }
- function e(a) {
- var b = 1,
- c = new l(a),
- d = document.createTextNode('');
- return (
- c.observe(d, { characterData: !0 }),
- function () {
- (b = -b), (d.data = b);
- }
- );
- }
- function f(a) {
- return function () {
- function b() {
- clearTimeout(c), clearInterval(d), a();
- }
- var c = setTimeout(b, 0),
- d = setInterval(b, 50);
- };
- }
- b.exports = c;
- var g,
- h = [],
- i = !1,
- j = 0,
- k = 1024,
- l = a.MutationObserver || a.WebKitMutationObserver;
- (g = 'function' == typeof l ? e(d) : f(d)),
- (c.requestFlush = g),
- (c.makeRequestCallFromTimer = f);
- }.call(
- this,
- 'undefined' != typeof global
- ? global
- : 'undefined' != typeof self
- ? self
- : 'undefined' != typeof window
- ? window
- : {}
- ));
- },
- {},
- ],
- 94: [
- function (a, b, c) {
- 'use strict';
- function d() {}
- function e(a) {
- try {
- return a.then;
- } catch (b) {
- return (r = b), s;
- }
- }
- function f(a, b) {
- try {
- return a(b);
- } catch (c) {
- return (r = c), s;
- }
- }
- function g(a, b, c) {
- try {
- a(b, c);
- } catch (d) {
- return (r = d), s;
- }
- }
- function h(a) {
- if ('object' != typeof this)
- throw new TypeError('Promises must be constructed via new');
- if ('function' != typeof a) throw new TypeError('not a function');
- (this._45 = 0),
- (this._81 = 0),
- (this._65 = null),
- (this._54 = null),
- a !== d && p(a, this);
- }
- function i(a, b, c) {
- return new a.constructor(function (e, f) {
- var g = new h(d);
- g.then(e, f), j(a, new o(b, c, g));
- });
- }
- function j(a, b) {
- for (; 3 === a._81; ) a = a._65;
- return (
- h._10 && h._10(a),
- 0 === a._81
- ? 0 === a._45
- ? ((a._45 = 1), void (a._54 = b))
- : 1 === a._45
- ? ((a._45 = 2), void (a._54 = [a._54, b]))
- : void a._54.push(b)
- : void k(a, b)
- );
- }
- function k(a, b) {
- q(function () {
- var c = 1 === a._81 ? b.onFulfilled : b.onRejected;
- if (null === c)
- return void (1 === a._81
- ? l(b.promise, a._65)
- : m(b.promise, a._65));
- var d = f(c, a._65);
- d === s ? m(b.promise, r) : l(b.promise, d);
- });
- }
- function l(a, b) {
- if (b === a)
- return m(
- a,
- new TypeError('A promise cannot be resolved with itself.')
- );
- if (b && ('object' == typeof b || 'function' == typeof b)) {
- var c = e(b);
- if (c === s) return m(a, r);
- if (c === a.then && b instanceof h)
- return (a._81 = 3), (a._65 = b), void n(a);
- if ('function' == typeof c) return void p(c.bind(b), a);
- }
- (a._81 = 1), (a._65 = b), n(a);
- }
- function m(a, b) {
- (a._81 = 2), (a._65 = b), h._97 && h._97(a, b), n(a);
- }
- function n(a) {
- if ((1 === a._45 && (j(a, a._54), (a._54 = null)), 2 === a._45)) {
- for (var b = 0; b < a._54.length; b++) j(a, a._54[b]);
- a._54 = null;
- }
- }
- function o(a, b, c) {
- (this.onFulfilled = 'function' == typeof a ? a : null),
- (this.onRejected = 'function' == typeof b ? b : null),
- (this.promise = c);
- }
- function p(a, b) {
- var c = !1,
- d = g(
- a,
- function (a) {
- c || ((c = !0), l(b, a));
- },
- function (a) {
- c || ((c = !0), m(b, a));
- }
- );
- c || d !== s || ((c = !0), m(b, r));
- }
- var q = a('asap/raw'),
- r = null,
- s = {};
- (b.exports = h),
- (h._10 = null),
- (h._97 = null),
- (h._61 = d),
- (h.prototype.then = function (a, b) {
- if (this.constructor !== h) return i(this, a, b);
- var c = new h(d);
- return j(this, new o(a, b, c)), c;
- });
- },
- { 'asap/raw': 93 },
- ],
- 95: [
- function (a, b, c) {
- 'use strict';
- function d(a) {
- var b = new e(e._61);
- return (b._81 = 1), (b._65 = a), b;
- }
- var e = a('./core.js');
- b.exports = e;
- var f = d(!0),
- g = d(!1),
- h = d(null),
- i = d(void 0),
- j = d(0),
- k = d('');
- (e.resolve = function (a) {
- if (a instanceof e) return a;
- if (null === a) return h;
- if (void 0 === a) return i;
- if (a === !0) return f;
- if (a === !1) return g;
- if (0 === a) return j;
- if ('' === a) return k;
- if ('object' == typeof a || 'function' == typeof a)
- try {
- var b = a.then;
- if ('function' == typeof b) return new e(b.bind(a));
- } catch (c) {
- return new e(function (a, b) {
- b(c);
- });
- }
- return d(a);
- }),
- (e.all = function (a) {
- var b = Array.prototype.slice.call(a);
- return new e(function (a, c) {
- function d(g, h) {
- if (h && ('object' == typeof h || 'function' == typeof h)) {
- if (h instanceof e && h.then === e.prototype.then) {
- for (; 3 === h._81; ) h = h._65;
- return 1 === h._81
- ? d(g, h._65)
- : (2 === h._81 && c(h._65),
- void h.then(function (a) {
- d(g, a);
- }, c));
- }
- var i = h.then;
- if ('function' == typeof i) {
- var j = new e(i.bind(h));
- return void j.then(function (a) {
- d(g, a);
- }, c);
- }
- }
- (b[g] = h), 0 === --f && a(b);
- }
- if (0 === b.length) return a([]);
- for (var f = b.length, g = 0; g < b.length; g++) d(g, b[g]);
- });
- }),
- (e.reject = function (a) {
- return new e(function (b, c) {
- c(a);
- });
- }),
- (e.race = function (a) {
- return new e(function (b, c) {
- a.forEach(function (a) {
- e.resolve(a).then(b, c);
- });
- });
- }),
- (e.prototype['catch'] = function (a) {
- return this.then(null, a);
- });
- },
- { './core.js': 94 },
- ],
- 96: [
- function (a, b, c) {
- 'function' != typeof Promise.prototype.done &&
- (Promise.prototype.done = function (a, b) {
- var c = arguments.length
- ? this.then.apply(this, arguments)
- : this;
- c.then(null, function (a) {
- setTimeout(function () {
- throw a;
- }, 0);
- });
- });
- },
- {},
- ],
- 97: [
- function (a, b, c) {
- a('asap');
- 'undefined' == typeof Promise &&
- ((Promise = a('./lib/core.js')), a('./lib/es6-extensions.js')),
- a('./polyfill-done.js');
- },
- {
- './lib/core.js': 94,
- './lib/es6-extensions.js': 95,
- './polyfill-done.js': 96,
- asap: 92,
- },
- ],
- },
- {},
- [2]
- )(2);
-});
diff --git a/composer-require-checker.json b/composer-require-checker.json
index b79d709c..6fc7210e 100644
--- a/composer-require-checker.json
+++ b/composer-require-checker.json
@@ -20,9 +20,15 @@
"ADORecordSet_postgres8",
"dump",
"PDO",
- "PHPPGA_SUBFOLDER",
- "Psr\\Http\\Message\\ResponseInterface",
- "requestInstance",
- "responseInstance"
- ]
+ "PHP_SESSION_ACTIVE",
+ "session_id",
+ "session_name",
+ "session_set_cookie_params",
+ "session_start",
+ "session_status",
+ "Psr\\Container\\ContainerInterface"
+
+ ],
+ "scan-files" : ["src/lib.inc.php", "router.php"]
+
} \ No newline at end of file
diff --git a/composer.json b/composer.json
index fb8121a1..60a67915 100644
--- a/composer.json
+++ b/composer.json
@@ -14,18 +14,18 @@
}
],
"require": {
- "php": ">=7.1",
+ "php": ">=7.2",
+ "ext-json": "*",
"ext-mbstring": "*",
- "ext-xml": "*",
"ext-json": "*",
"ext-pgsql": "*",
+ "ext-xml": "*",
"adodb/adodb-php": "^5.20",
"slim/flash": "^0.4.0",
"slim/slim": "^3.6",
"slim/twig-view": "~2.5.1",
-
- "symfony/yaml": "^5.0",
- "twig/twig": "~1.42.4"
+ "symfony/yaml": "^5.1",
+ "twig/twig": "~3"
},
"require-dev": {
"codeception/codeception": "*",
@@ -38,7 +38,8 @@
"ocramius/package-versions": "~1.4.0",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpstan/phpstan": "^0.12.14",
- "simpletest/simpletest": "^1.1",
+ "rector/rector-prefixed": "^0.8.29",
+ "staabm/annotate-pull-request-from-checkstyle": "^1.4",
"vimeo/psalm": "~3.9.3"
},
"extra": {
@@ -65,6 +66,7 @@
},
"scripts": {
"post-install-cmd": "@clear_twig_cache",
+ "post-autoload-dump": "@composer normalize",
"post-create-project-cmd": "@clear_twig_cache",
"clear_twig_cache": [
"make fix_permissions",
diff --git a/composer.lock b/composer.lock
index f2b9b40b..f781e0ca 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "fba1ba7f899357b0d4f2c8001a47fa9f",
+ "content-hash": "7cc086a62801adc7300f58ecdbdc9ad1",
"packages": [
{
"name": "adodb/adodb-php",
- "version": "v5.20.17",
+ "version": "v5.20.18",
"source": {
"type": "git",
"url": "https://github.com/ADOdb/ADOdb.git",
- "reference": "c47e5c272e98a06e1c92248b5d9d1ae0afe71c97"
+ "reference": "0363eca78eed8bd02d1456072c729da302655241"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ADOdb/ADOdb/zipball/c47e5c272e98a06e1c92248b5d9d1ae0afe71c97",
- "reference": "c47e5c272e98a06e1c92248b5d9d1ae0afe71c97",
+ "url": "https://api.github.com/repos/ADOdb/ADOdb/zipball/0363eca78eed8bd02d1456072c729da302655241",
+ "reference": "0363eca78eed8bd02d1456072c729da302655241",
"shasum": ""
},
"require": {
@@ -58,7 +58,7 @@
"library",
"php"
],
- "time": "2020-03-31T17:32:58+00:00"
+ "time": "2020-06-28T17:52:20+00:00"
},
{
"name": "nikic/fast-route",
@@ -428,17 +428,67 @@
"time": "2019-11-28T18:03:50+00:00"
},
{
+ "name": "symfony/deprecation-contracts",
+ "version": "v2.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665",
+ "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.2-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "time": "2020-09-07T11:33:47+00:00"
+ },
+ {
"name": "symfony/polyfill-ctype",
- "version": "v1.17.0",
+ "version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
+ "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
- "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
+ "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
"shasum": ""
},
"require": {
@@ -450,7 +500,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.17-dev"
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -483,24 +537,88 @@
"polyfill",
"portable"
],
- "time": "2020-05-12T16:14:59+00:00"
+ "time": "2020-07-14T12:35:20+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.18.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
+ "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/yaml",
- "version": "v5.0.8",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f"
+ "reference": "e147a68cb66a8b510f4b7481fe4da5b2ab65ec6a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/482fb4e710e5af3e0e78015f19aa716ad953392f",
- "reference": "482fb4e710e5af3e0e78015f19aa716ad953392f",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/e147a68cb66a8b510f4b7481fe4da5b2ab65ec6a",
+ "reference": "e147a68cb66a8b510f4b7481fe4da5b2ab65ec6a",
"shasum": ""
},
"require": {
- "php": "^7.2.5",
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
@@ -512,10 +630,13 @@
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
+ "bin": [
+ "Resources/bin/yaml-lint"
+ ],
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -542,40 +663,52 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2020-04-28T17:58:55+00:00"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-09-27T03:44:28+00:00"
},
{
"name": "twig/twig",
- "version": "v1.42.5",
+ "version": "v3.0.5",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e"
+ "reference": "9b76b1535483cdf4edf01bb787b0217b62bd68a5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e",
- "reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/9b76b1535483cdf4edf01bb787b0217b62bd68a5",
+ "reference": "9b76b1535483cdf4edf01bb787b0217b62bd68a5",
"shasum": ""
},
"require": {
- "php": ">=5.5.0",
- "symfony/polyfill-ctype": "^1.8"
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "^1.8",
+ "symfony/polyfill-mbstring": "^1.3"
},
"require-dev": {
"psr/container": "^1.0",
- "symfony/phpunit-bridge": "^4.4|^5.0"
+ "symfony/phpunit-bridge": "^4.4.9|^5.0.9"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.42-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
- "psr-0": {
- "Twig_": "lib/"
- },
"psr-4": {
"Twig\\": "src/"
}
@@ -606,22 +739,32 @@
"keywords": [
"templating"
],
- "time": "2020-02-11T05:59:23+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/twig/twig",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-08-05T15:13:19+00:00"
}
],
"packages-dev": [
{
"name": "amphp/amp",
- "version": "v2.4.4",
+ "version": "v2.5.0",
"source": {
"type": "git",
"url": "https://github.com/amphp/amp.git",
- "reference": "1e58d53e4af390efc7813e36cd215bd82cba4b06"
+ "reference": "f220a51458bf4dd0dedebb171ac3457813c72bbc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/amphp/amp/zipball/1e58d53e4af390efc7813e36cd215bd82cba4b06",
- "reference": "1e58d53e4af390efc7813e36cd215bd82cba4b06",
+ "url": "https://api.github.com/repos/amphp/amp/zipball/f220a51458bf4dd0dedebb171ac3457813c72bbc",
+ "reference": "f220a51458bf4dd0dedebb171ac3457813c72bbc",
"shasum": ""
},
"require": {
@@ -633,8 +776,8 @@
"ext-json": "*",
"jetbrains/phpstorm-stubs": "^2019.3",
"phpunit/phpunit": "^6.0.9 | ^7",
- "react/promise": "^2",
- "vimeo/psalm": "^3.11@dev"
+ "psalm/phar": "^3.11@dev",
+ "react/promise": "^2"
},
"type": "library",
"extra": {
@@ -686,32 +829,33 @@
"non-blocking",
"promise"
],
- "time": "2020-04-30T04:54:50+00:00"
+ "time": "2020-07-14T21:47:18+00:00"
},
{
"name": "amphp/byte-stream",
- "version": "v1.7.3",
+ "version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/amphp/byte-stream.git",
- "reference": "b867505edb79dda8f253ca3c3a2bbadae4b16592"
+ "reference": "f0c20cf598a958ba2aa8c6e5a71c697d652c7088"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/amphp/byte-stream/zipball/b867505edb79dda8f253ca3c3a2bbadae4b16592",
- "reference": "b867505edb79dda8f253ca3c3a2bbadae4b16592",
+ "url": "https://api.github.com/repos/amphp/byte-stream/zipball/f0c20cf598a958ba2aa8c6e5a71c697d652c7088",
+ "reference": "f0c20cf598a958ba2aa8c6e5a71c697d652c7088",
"shasum": ""
},
"require": {
- "amphp/amp": "^2"
+ "amphp/amp": "^2",
+ "php": ">=7.1"
},
"require-dev": {
"amphp/php-cs-fixer-config": "dev-master",
- "amphp/phpunit-util": "^1",
+ "amphp/phpunit-util": "^1.4",
"friendsofphp/php-cs-fixer": "^2.3",
"jetbrains/phpstorm-stubs": "^2019.3",
"phpunit/phpunit": "^6 || ^7 || ^8",
- "vimeo/psalm": "^3.9@dev"
+ "psalm/phar": "^3.11.4"
},
"type": "library",
"extra": {
@@ -751,7 +895,7 @@
"non-blocking",
"stream"
],
- "time": "2020-04-04T16:56:54+00:00"
+ "time": "2020-06-29T18:35:05+00:00"
},
{
"name": "behat/gherkin",
@@ -814,16 +958,16 @@
},
{
"name": "codeception/codeception",
- "version": "4.1.5",
+ "version": "4.1.8",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Codeception.git",
- "reference": "24f2345329b1059f1208f65581fc632a4a6e5a55"
+ "reference": "41036e8af66e727c4587012f0366b7f0576a99da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Codeception/Codeception/zipball/24f2345329b1059f1208f65581fc632a4a6e5a55",
- "reference": "24f2345329b1059f1208f65581fc632a4a6e5a55",
+ "url": "https://api.github.com/repos/Codeception/Codeception/zipball/41036e8af66e727c4587012f0366b7f0576a99da",
+ "reference": "41036e8af66e727c4587012f0366b7f0576a99da",
"shasum": ""
},
"require": {
@@ -895,24 +1039,31 @@
"functional testing",
"unit testing"
],
- "time": "2020-05-24T13:58:47+00:00"
+ "funding": [
+ {
+ "url": "https://opencollective.com/codeception",
+ "type": "open_collective"
+ }
+ ],
+ "time": "2020-10-11T17:54:58+00:00"
},
{
"name": "codeception/lib-asserts",
- "version": "1.12.0",
+ "version": "1.13.1",
"source": {
"type": "git",
"url": "https://github.com/Codeception/lib-asserts.git",
- "reference": "acd0dc8b394595a74b58dcc889f72569ff7d8e71"
+ "reference": "263ef0b7eff80643e82f4cf55351eca553a09a10"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Codeception/lib-asserts/zipball/acd0dc8b394595a74b58dcc889f72569ff7d8e71",
- "reference": "acd0dc8b394595a74b58dcc889f72569ff7d8e71",
+ "url": "https://api.github.com/repos/Codeception/lib-asserts/zipball/263ef0b7eff80643e82f4cf55351eca553a09a10",
+ "reference": "263ef0b7eff80643e82f4cf55351eca553a09a10",
"shasum": ""
},
"require": {
"codeception/phpunit-wrapper": ">6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.0.3 | ^9.0",
+ "ext-dom": "*",
"php": ">=5.6.0 <8.0"
},
"type": "library",
@@ -933,32 +1084,36 @@
},
{
"name": "Gintautas Miselis"
+ },
+ {
+ "name": "Gustavo Nieves",
+ "homepage": "https://medium.com/@ganieves"
}
],
"description": "Assertion methods used by Codeception core and Asserts module",
- "homepage": "http://codeception.com/",
+ "homepage": "https://codeception.com/",
"keywords": [
"codeception"
],
- "time": "2020-04-17T18:20:46+00:00"
+ "time": "2020-08-28T07:49:36+00:00"
},
{
"name": "codeception/module-asserts",
- "version": "1.2.1",
+ "version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/Codeception/module-asserts.git",
- "reference": "79f13d05b63f2fceba4d0e78044bab668c9b2a6b"
+ "reference": "32e5be519faaeb60ed3692383dcd1b3390ec2667"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Codeception/module-asserts/zipball/79f13d05b63f2fceba4d0e78044bab668c9b2a6b",
- "reference": "79f13d05b63f2fceba4d0e78044bab668c9b2a6b",
+ "url": "https://api.github.com/repos/Codeception/module-asserts/zipball/32e5be519faaeb60ed3692383dcd1b3390ec2667",
+ "reference": "32e5be519faaeb60ed3692383dcd1b3390ec2667",
"shasum": ""
},
"require": {
"codeception/codeception": "*@dev",
- "codeception/lib-asserts": "^1.12.0",
+ "codeception/lib-asserts": "^1.13.1",
"php": ">=5.6.0 <8.0"
},
"conflict": {
@@ -983,29 +1138,33 @@
},
{
"name": "Gintautas Miselis"
+ },
+ {
+ "name": "Gustavo Nieves",
+ "homepage": "https://medium.com/@ganieves"
}
],
"description": "Codeception module containing various assertions",
- "homepage": "http://codeception.com/",
+ "homepage": "https://codeception.com/",
"keywords": [
"assertions",
"asserts",
"codeception"
],
- "time": "2020-04-20T07:26:11+00:00"
+ "time": "2020-08-28T08:06:29+00:00"
},
{
"name": "codeception/phpunit-wrapper",
- "version": "9.0.2",
+ "version": "9.0.5",
"source": {
"type": "git",
"url": "https://github.com/Codeception/phpunit-wrapper.git",
- "reference": "eb27243d8edde68593bf8d9ef5e9074734777931"
+ "reference": "72bac7770866799e23a7dda1ac6bec2f8baccf45"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/eb27243d8edde68593bf8d9ef5e9074734777931",
- "reference": "eb27243d8edde68593bf8d9ef5e9074734777931",
+ "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/72bac7770866799e23a7dda1ac6bec2f8baccf45",
+ "reference": "72bac7770866799e23a7dda1ac6bec2f8baccf45",
"shasum": ""
},
"require": {
@@ -1036,20 +1195,20 @@
}
],
"description": "PHPUnit classes used by Codeception",
- "time": "2020-04-17T18:16:31+00:00"
+ "time": "2020-10-11T18:14:42+00:00"
},
{
"name": "codeception/stub",
- "version": "3.6.1",
+ "version": "3.7.0",
"source": {
"type": "git",
"url": "https://github.com/Codeception/Stub.git",
- "reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880"
+ "reference": "468dd5fe659f131fc997f5196aad87512f9b1304"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Codeception/Stub/zipball/a3ba01414cbee76a1bced9f9b6b169cc8d203880",
- "reference": "a3ba01414cbee76a1bced9f9b6b169cc8d203880",
+ "url": "https://api.github.com/repos/Codeception/Stub/zipball/468dd5fe659f131fc997f5196aad87512f9b1304",
+ "reference": "468dd5fe659f131fc997f5196aad87512f9b1304",
"shasum": ""
},
"require": {
@@ -1066,20 +1225,20 @@
"MIT"
],
"description": "Flexible Stub wrapper for PHPUnit's Mock Builder",
- "time": "2020-02-07T18:42:28+00:00"
+ "time": "2020-07-03T15:54:43+00:00"
},
{
"name": "composer/semver",
- "version": "1.5.1",
+ "version": "1.7.1",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
- "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de"
+ "reference": "38276325bd896f90dfcfe30029aa5db40df387a7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
- "reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
+ "url": "https://api.github.com/repos/composer/semver/zipball/38276325bd896f90dfcfe30029aa5db40df387a7",
+ "reference": "38276325bd896f90dfcfe30029aa5db40df387a7",
"shasum": ""
},
"require": {
@@ -1127,20 +1286,20 @@
"validation",
"versioning"
],
- "time": "2020-01-13T12:06:48+00:00"
+ "time": "2020-09-27T13:13:07+00:00"
},
{
"name": "composer/xdebug-handler",
- "version": "1.4.1",
+ "version": "1.4.3",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
- "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7"
+ "reference": "ebd27a9866ae8254e873866f795491f02418c5a5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/1ab9842d69e64fb3a01be6b656501032d1b78cb7",
- "reference": "1ab9842d69e64fb3a01be6b656501032d1b78cb7",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ebd27a9866ae8254e873866f795491f02418c5a5",
+ "reference": "ebd27a9866ae8254e873866f795491f02418c5a5",
"shasum": ""
},
"require": {
@@ -1171,30 +1330,31 @@
"Xdebug",
"performance"
],
- "time": "2020-03-01T12:26:26+00:00"
+ "time": "2020-08-19T10:27:58+00:00"
},
{
"name": "doctrine/annotations",
- "version": "1.10.2",
+ "version": "1.10.4",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
- "reference": "b9d758e831c70751155c698c2f7df4665314a1cb"
+ "reference": "bfe91e31984e2ba76df1c1339681770401ec262f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/annotations/zipball/b9d758e831c70751155c698c2f7df4665314a1cb",
- "reference": "b9d758e831c70751155c698c2f7df4665314a1cb",
+ "url": "https://api.github.com/repos/doctrine/annotations/zipball/bfe91e31984e2ba76df1c1339681770401ec262f",
+ "reference": "bfe91e31984e2ba76df1c1339681770401ec262f",
"shasum": ""
},
"require": {
"doctrine/lexer": "1.*",
"ext-tokenizer": "*",
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/cache": "1.*",
- "phpunit/phpunit": "^7.5"
+ "phpstan/phpstan": "^0.12.20",
+ "phpunit/phpunit": "^7.5 || ^9.1.5"
},
"type": "library",
"extra": {
@@ -1240,24 +1400,24 @@
"docblock",
"parser"
],
- "time": "2020-04-20T09:18:32+00:00"
+ "time": "2020-08-10T19:35:50+00:00"
},
{
"name": "doctrine/instantiator",
- "version": "1.3.0",
+ "version": "1.3.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "ae466f726242e637cebdd526a7d991b9433bacf1"
+ "reference": "f350df0268e904597e3bd9c4685c53e0e333feea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1",
- "reference": "ae466f726242e637cebdd526a7d991b9433bacf1",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f350df0268e904597e3bd9c4685c53e0e333feea",
+ "reference": "f350df0268e904597e3bd9c4685c53e0e333feea",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^6.0",
@@ -1296,24 +1456,24 @@
"constructor",
"instantiate"
],
- "time": "2019-10-21T16:45:58+00:00"
+ "time": "2020-05-29T17:27:14+00:00"
},
{
"name": "doctrine/lexer",
- "version": "1.2.0",
+ "version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/lexer.git",
- "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6"
+ "reference": "e864bbf5904cb8f5bb334f99209b48018522f042"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6",
- "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6",
+ "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042",
+ "reference": "e864bbf5904cb8f5bb334f99209b48018522f042",
"shasum": ""
},
"require": {
- "php": "^7.2"
+ "php": "^7.2 || ^8.0"
},
"require-dev": {
"doctrine/coding-standard": "^6.0",
@@ -1358,42 +1518,43 @@
"parser",
"php"
],
- "time": "2019-10-30T14:39:59+00:00"
+ "time": "2020-05-25T17:44:05+00:00"
},
{
"name": "ergebnis/composer-normalize",
- "version": "2.5.1",
+ "version": "2.8.2",
"source": {
"type": "git",
"url": "https://github.com/ergebnis/composer-normalize.git",
- "reference": "d0faf549e565757a7ffbf1f306a4293080e43bdd"
+ "reference": "0a25a226c5503659179c8ea440d1c76599e434fd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/d0faf549e565757a7ffbf1f306a4293080e43bdd",
- "reference": "d0faf549e565757a7ffbf1f306a4293080e43bdd",
+ "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/0a25a226c5503659179c8ea440d1c76599e434fd",
+ "reference": "0a25a226c5503659179c8ea440d1c76599e434fd",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.1.0 || ^2.0.0",
- "ergebnis/json-normalizer": "~0.12.0",
- "ergebnis/json-printer": "^3.0.2",
- "localheinz/diff": "^1.0.1",
- "php": "^7.1"
+ "ergebnis/json-normalizer": "~0.13.1",
+ "ergebnis/json-printer": "^3.1.1",
+ "justinrainbow/json-schema": "^5.2.10",
+ "localheinz/diff": "^1.1.1",
+ "php": "^7.2 || ^8.0"
},
"require-dev": {
- "composer/composer": "^1.10.5 || ^2.0.0",
- "composer/package-versions-deprecated": "^1.8.0",
- "ergebnis/phpstan-rules": "~0.14.4",
- "ergebnis/test-util": "~1.0.0",
- "jangregor/phpstan-prophecy": "~0.6.2",
- "phpstan/extension-installer": "^1.0.4",
- "phpstan/phpstan": "~0.12.19",
- "phpstan/phpstan-deprecation-rules": "~0.12.2",
- "phpstan/phpstan-phpunit": "~0.12.8",
- "phpstan/phpstan-strict-rules": "~0.12.2",
- "phpunit/phpunit": "^7.5.20",
- "symfony/filesystem": "^4.4.8"
+ "composer/composer": "^1.10.13 || ^2.0.0",
+ "composer/package-versions-deprecated": "^1.11.99",
+ "ergebnis/phpstan-rules": "~0.15.2",
+ "ergebnis/test-util": "^1.1.0",
+ "jangregor/phpstan-prophecy": "~0.8.0",
+ "phpstan/extension-installer": "^1.0.5",
+ "phpstan/phpstan": "~0.12.43",
+ "phpstan/phpstan-deprecation-rules": "~0.12.5",
+ "phpstan/phpstan-phpunit": "~0.12.16",
+ "phpstan/phpstan-strict-rules": "~0.12.5",
+ "phpunit/phpunit": "^8.5.8",
+ "symfony/filesystem": "^5.1.5"
},
"type": "composer-plugin",
"extra": {
@@ -1422,43 +1583,43 @@
"normalizer",
"plugin"
],
- "time": "2020-05-01T12:02:09+00:00"
+ "time": "2020-09-22T09:55:49+00:00"
},
{
"name": "ergebnis/json-normalizer",
- "version": "0.12.0",
+ "version": "0.13.1",
"source": {
"type": "git",
"url": "https://github.com/ergebnis/json-normalizer.git",
- "reference": "0197447cd5d8f7e82116e904196a3e9f470655db"
+ "reference": "82897f7a0b6a896462a08ac02bee33ccf4ece0bb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/0197447cd5d8f7e82116e904196a3e9f470655db",
- "reference": "0197447cd5d8f7e82116e904196a3e9f470655db",
+ "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/82897f7a0b6a896462a08ac02bee33ccf4ece0bb",
+ "reference": "82897f7a0b6a896462a08ac02bee33ccf4ece0bb",
"shasum": ""
},
"require": {
- "ergebnis/json-printer": "^3.0.2",
+ "ergebnis/json-printer": "^3.1.0",
"ext-json": "*",
- "justinrainbow/json-schema": "^4.0.0 || ^5.0.0",
- "php": "^7.1"
+ "justinrainbow/json-schema": "^5.2.10",
+ "php": "^7.2 || ^8.0"
},
"require-dev": {
- "ergebnis/license": "~0.1.0",
- "ergebnis/php-cs-fixer-config": "^2.1.2",
- "ergebnis/phpstan-rules": "~0.14.4",
- "ergebnis/test-util": "~1.0.0",
- "infection/infection": "~0.13.6",
- "jangregor/phpstan-prophecy": "~0.6.2",
+ "ergebnis/license": "^1.0.0",
+ "ergebnis/php-cs-fixer-config": "^2.2.1",
+ "ergebnis/phpstan-rules": "~0.15.2",
+ "ergebnis/test-util": "^1.1.0",
+ "infection/infection": "~0.15.3",
+ "jangregor/phpstan-prophecy": "~0.8.0",
"phpstan/extension-installer": "^1.0.4",
- "phpstan/phpstan": "~0.12.18",
- "phpstan/phpstan-deprecation-rules": "~0.12.2",
- "phpstan/phpstan-phpunit": "~0.12.8",
- "phpstan/phpstan-strict-rules": "~0.12.2",
- "phpunit/phpunit": "^7.5.20",
- "psalm/plugin-phpunit": "~0.10.0",
- "vimeo/psalm": "^3.11.2"
+ "phpstan/phpstan": "~0.12.40",
+ "phpstan/phpstan-deprecation-rules": "~0.12.5",
+ "phpstan/phpstan-phpunit": "~0.12.16",
+ "phpstan/phpstan-strict-rules": "~0.12.4",
+ "phpunit/phpunit": "^8.5.8",
+ "psalm/plugin-phpunit": "~0.11.0",
+ "vimeo/psalm": "^3.14.2"
},
"type": "library",
"autoload": {
@@ -1482,38 +1643,41 @@
"json",
"normalizer"
],
- "time": "2020-04-19T12:30:41+00:00"
+ "time": "2020-08-30T12:00:06+00:00"
},
{
"name": "ergebnis/json-printer",
- "version": "3.0.2",
+ "version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/ergebnis/json-printer.git",
- "reference": "c7985dc4879777f2e4ab689da25bdd49f59dd2cb"
+ "reference": "e4190dadd9937a77d8afcaf2b6c42a528ab367d6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/c7985dc4879777f2e4ab689da25bdd49f59dd2cb",
- "reference": "c7985dc4879777f2e4ab689da25bdd49f59dd2cb",
+ "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/e4190dadd9937a77d8afcaf2b6c42a528ab367d6",
+ "reference": "e4190dadd9937a77d8afcaf2b6c42a528ab367d6",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-mbstring": "*",
- "php": "^7.1"
+ "php": "^7.2 || ^8.0"
},
"require-dev": {
- "ergebnis/php-cs-fixer-config": "~1.1.1",
- "ergebnis/phpstan-rules": "~0.14.1",
- "ergebnis/test-util": "~0.9.0",
- "infection/infection": "~0.13.6",
- "phpbench/phpbench": "~0.16.10",
- "phpstan/extension-installer": "^1.0.3",
- "phpstan/phpstan": "~0.11.19",
- "phpstan/phpstan-deprecation-rules": "~0.11.2",
- "phpstan/phpstan-strict-rules": "~0.11.1",
- "phpunit/phpunit": "^7.5.18"
+ "ergebnis/license": "^1.0.0",
+ "ergebnis/php-cs-fixer-config": "^2.2.1",
+ "ergebnis/phpstan-rules": "~0.15.2",
+ "ergebnis/test-util": "^1.1.0",
+ "infection/infection": "~0.15.3",
+ "phpstan/extension-installer": "^1.0.4",
+ "phpstan/phpstan": "~0.12.40",
+ "phpstan/phpstan-deprecation-rules": "~0.12.5",
+ "phpstan/phpstan-phpunit": "~0.12.16",
+ "phpstan/phpstan-strict-rules": "~0.12.4",
+ "phpunit/phpunit": "^8.5.8",
+ "psalm/plugin-phpunit": "~0.11.0",
+ "vimeo/psalm": "^3.14.2"
},
"type": "library",
"autoload": {
@@ -1538,43 +1702,43 @@
"json",
"printer"
],
- "time": "2019-12-19T14:42:54+00:00"
+ "time": "2020-08-30T12:17:03+00:00"
},
{
"name": "ergebnis/php-cs-fixer-config",
- "version": "2.1.2",
+ "version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/ergebnis/php-cs-fixer-config.git",
- "reference": "c811e48e106a6decc20b3e305629e11c515a772c"
+ "reference": "0bcde3f7cd0c4f01f6135f80ddd9cadcbf341879"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ergebnis/php-cs-fixer-config/zipball/c811e48e106a6decc20b3e305629e11c515a772c",
- "reference": "c811e48e106a6decc20b3e305629e11c515a772c",
+ "url": "https://api.github.com/repos/ergebnis/php-cs-fixer-config/zipball/0bcde3f7cd0c4f01f6135f80ddd9cadcbf341879",
+ "reference": "0bcde3f7cd0c4f01f6135f80ddd9cadcbf341879",
"shasum": ""
},
"require": {
"ext-filter": "*",
- "friendsofphp/php-cs-fixer": "~2.16.3",
- "php": "^7.1"
+ "friendsofphp/php-cs-fixer": "~2.16.4",
+ "php": "^7.2"
},
"require-dev": {
- "ergebnis/composer-normalize": "^2.3.2",
- "ergebnis/license": "~0.1.0",
- "ergebnis/phpstan-rules": "~0.14.4",
- "ergebnis/test-util": "~1.0.0",
- "infection/infection": "~0.13.6",
- "jangregor/phpstan-prophecy": "~0.6.2",
- "phpstan/extension-installer": "^1.0.4",
- "phpstan/phpstan": "~0.12.18",
- "phpstan/phpstan-deprecation-rules": "~0.12.2",
- "phpstan/phpstan-phpunit": "~0.12.7",
- "phpstan/phpstan-strict-rules": "~0.12.2",
- "phpunit/phpunit": "^7.5.20",
- "psalm/plugin-phpunit": "~0.10.0",
+ "ergebnis/composer-normalize": "^2.8.2",
+ "ergebnis/license": "^1.1.0",
+ "ergebnis/phpstan-rules": "~0.15.2",
+ "ergebnis/test-util": "^1.3.0",
+ "infection/infection": "~0.15.3",
+ "jangregor/phpstan-prophecy": "~0.8.0",
+ "phpstan/extension-installer": "^1.0.5",
+ "phpstan/phpstan": "~0.12.48",
+ "phpstan/phpstan-deprecation-rules": "~0.12.5",
+ "phpstan/phpstan-phpunit": "~0.12.16",
+ "phpstan/phpstan-strict-rules": "~0.12.5",
+ "phpunit/phpunit": "^8.5.8",
+ "psalm/plugin-phpunit": "~0.12.2",
"symfony/filesystem": "^4.4.0",
- "vimeo/psalm": "^3.11.2"
+ "vimeo/psalm": "^3.16"
},
"type": "library",
"autoload": {
@@ -1594,7 +1758,13 @@
],
"description": "Provides a configuration factory and multiple rule sets for friendsofphp/php-cs-fixer.",
"homepage": "https://github.com/ergebnis/php-cs-fixer-config",
- "time": "2020-04-16T08:02:53+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/localheinz",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-08T18:03:06+00:00"
},
{
"name": "felixfbecker/advanced-json-rpc",
@@ -1686,25 +1856,25 @@
},
{
"name": "filp/whoops",
- "version": "2.7.2",
+ "version": "2.8.0",
"source": {
"type": "git",
"url": "https://github.com/filp/whoops.git",
- "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a"
+ "reference": "fa50d9db1c0c2fae99cf988d27023effda5524a3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/filp/whoops/zipball/17d0d3f266c8f925ebd035cd36f83cf802b47d4a",
- "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a",
+ "url": "https://api.github.com/repos/filp/whoops/zipball/fa50d9db1c0c2fae99cf988d27023effda5524a3",
+ "reference": "fa50d9db1c0c2fae99cf988d27023effda5524a3",
"shasum": ""
},
"require": {
- "php": "^5.5.9 || ^7.0",
+ "php": "^5.5.9 || ^7.0 || ^8.0",
"psr/log": "^1.0.1"
},
"require-dev": {
"mockery/mockery": "^0.9 || ^1.0",
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0",
+ "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
"symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
},
"suggest": {
@@ -1714,7 +1884,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.6-dev"
+ "dev-master": "2.7-dev"
}
},
"autoload": {
@@ -1743,20 +1913,20 @@
"throwable",
"whoops"
],
- "time": "2020-05-05T12:28:07+00:00"
+ "time": "2020-10-17T09:00:00+00:00"
},
{
"name": "friendsofphp/php-cs-fixer",
- "version": "v2.16.3",
+ "version": "v2.16.4",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
- "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0"
+ "reference": "1023c3458137ab052f6ff1e09621a721bfdeca13"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/83baf823a33a1cbd5416c8626935cf3f843c10b0",
- "reference": "83baf823a33a1cbd5416c8626935cf3f843c10b0",
+ "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/1023c3458137ab052f6ff1e09621a721bfdeca13",
+ "reference": "1023c3458137ab052f6ff1e09621a721bfdeca13",
"shasum": ""
},
"require": {
@@ -1788,12 +1958,12 @@
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
"phpunitgoodpractices/traits": "^1.8",
- "symfony/phpunit-bridge": "^4.3 || ^5.0",
+ "symfony/phpunit-bridge": "^5.1",
"symfony/yaml": "^3.0 || ^4.0 || ^5.0"
},
"suggest": {
"ext-dom": "For handling output formats in XML",
- "ext-mbstring": "For handling non-UTF8 characters in cache signature.",
+ "ext-mbstring": "For handling non-UTF8 characters.",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
"symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
@@ -1834,20 +2004,20 @@
}
],
"description": "A tool to automatically fix PHP code style",
- "time": "2020-04-15T18:51:10+00:00"
+ "time": "2020-06-27T23:57:46+00:00"
},
{
"name": "guzzlehttp/psr7",
- "version": "1.6.1",
+ "version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
- "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/53330f47520498c0ae1f61f7e2c90f55690c06a3",
+ "reference": "53330f47520498c0ae1f61f7e2c90f55690c06a3",
"shasum": ""
},
"require": {
@@ -1860,15 +2030,15 @@
},
"require-dev": {
"ext-zlib": "*",
- "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
+ "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
},
"suggest": {
- "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
+ "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6-dev"
+ "dev-master": "1.7-dev"
}
},
"autoload": {
@@ -1905,20 +2075,20 @@
"uri",
"url"
],
- "time": "2019-07-01T23:21:34+00:00"
+ "time": "2020-09-30T07:37:11+00:00"
},
{
"name": "justinrainbow/json-schema",
- "version": "5.2.9",
+ "version": "5.2.10",
"source": {
"type": "git",
"url": "https://github.com/justinrainbow/json-schema.git",
- "reference": "44c6787311242a979fa15c704327c20e7221a0e4"
+ "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/44c6787311242a979fa15c704327c20e7221a0e4",
- "reference": "44c6787311242a979fa15c704327c20e7221a0e4",
+ "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b",
+ "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b",
"shasum": ""
},
"require": {
@@ -1971,7 +2141,7 @@
"json",
"schema"
],
- "time": "2019-09-25T14:49:45+00:00"
+ "time": "2020-05-27T16:41:55+00:00"
},
{
"name": "kint-php/kint",
@@ -2045,24 +2215,24 @@
},
{
"name": "localheinz/diff",
- "version": "1.0.1",
+ "version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/localheinz/diff.git",
- "reference": "bd5661db4bbed26c6f25df8851fd9f4b424a356e"
+ "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/localheinz/diff/zipball/bd5661db4bbed26c6f25df8851fd9f4b424a356e",
- "reference": "bd5661db4bbed26c6f25df8851fd9f4b424a356e",
+ "url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c",
+ "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^7.5 || ^8.0",
- "symfony/process": "^2 || ^3.3 || ^4"
+ "symfony/process": "^4.2 || ^5"
},
"type": "library",
"autoload": {
@@ -2085,31 +2255,31 @@
}
],
"description": "Fork of sebastian/diff for use with ergebnis/composer-normalize",
- "homepage": "https://github.com/sebastianbergmann/diff",
+ "homepage": "https://github.com/localheinz/diff",
"keywords": [
"diff",
"udiff",
"unidiff",
"unified diff"
],
- "time": "2019-12-17T07:42:37+00:00"
+ "time": "2020-07-06T04:49:32+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.9.5",
+ "version": "1.10.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef"
+ "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef",
- "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
+ "reference": "969b211f9a51aa1f6c01d1d2aef56d3bd91598e5",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
@@ -2140,7 +2310,7 @@
"object",
"object graph"
],
- "time": "2020-01-17T21:11:47+00:00"
+ "time": "2020-06-29T13:22:24+00:00"
},
{
"name": "netresearch/jsonmapper",
@@ -2190,16 +2360,16 @@
},
{
"name": "nikic/php-parser",
- "version": "v4.4.0",
+ "version": "v4.10.2",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120"
+ "reference": "658f1be311a230e0907f5dfe0213742aff0596de"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120",
- "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/658f1be311a230e0907f5dfe0213742aff0596de",
+ "reference": "658f1be311a230e0907f5dfe0213742aff0596de",
"shasum": ""
},
"require": {
@@ -2207,8 +2377,8 @@
"php": ">=7.0"
},
"require-dev": {
- "ircmaxell/php-yacc": "0.0.5",
- "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0"
+ "ircmaxell/php-yacc": "^0.0.7",
+ "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
},
"bin": [
"bin/php-parse"
@@ -2216,7 +2386,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.3-dev"
+ "dev-master": "4.9-dev"
}
},
"autoload": {
@@ -2238,7 +2408,7 @@
"parser",
"php"
],
- "time": "2020-04-10T16:34:50+00:00"
+ "time": "2020-09-26T10:30:38+00:00"
},
{
"name": "ocramius/package-versions",
@@ -2341,20 +2511,20 @@
},
{
"name": "paragonie/random_compat",
- "version": "v9.99.99",
+ "version": "v9.99.100",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
- "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95"
+ "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
- "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
+ "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
"shasum": ""
},
"require": {
- "php": "^7"
+ "php": ">= 7"
},
"require-dev": {
"phpunit/phpunit": "4.*|5.*",
@@ -2382,32 +2552,33 @@
"pseudorandom",
"random"
],
- "time": "2018-07-02T15:55:56+00:00"
+ "time": "2020-10-15T08:29:30+00:00"
},
{
"name": "phar-io/manifest",
- "version": "1.0.3",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/phar-io/manifest.git",
- "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4"
+ "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
- "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
+ "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-phar": "*",
- "phar-io/version": "^2.0",
- "php": "^5.6 || ^7.0"
+ "ext-xmlwriter": "*",
+ "phar-io/version": "^3.0.1",
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "2.0.x-dev"
}
},
"autoload": {
@@ -2437,24 +2608,24 @@
}
],
"description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
- "time": "2018-07-08T19:23:20+00:00"
+ "time": "2020-06-27T14:33:11+00:00"
},
{
"name": "phar-io/version",
- "version": "2.0.1",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/phar-io/version.git",
- "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6"
+ "reference": "c6bb6825def89e0a32220f88337f8ceaf1975fa0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6",
- "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/c6bb6825def89e0a32220f88337f8ceaf1975fa0",
+ "reference": "c6bb6825def89e0a32220f88337f8ceaf1975fa0",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
@@ -2484,27 +2655,27 @@
}
],
"description": "Library for handling version information and constraints",
- "time": "2018-07-08T19:19:57+00:00"
+ "time": "2020-06-27T14:39:04+00:00"
},
{
"name": "php-cs-fixer/diff",
- "version": "v1.3.0",
+ "version": "v1.3.1",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/diff.git",
- "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756"
+ "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756",
- "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756",
+ "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759",
+ "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": "^5.6 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^5.7.23 || ^6.4.3",
+ "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
"symfony/process": "^3.3"
},
"type": "library",
@@ -2519,14 +2690,14 @@
],
"authors": [
{
- "name": "Kore Nordmann",
- "email": "mail@kore-nordmann.de"
- },
- {
"name": "Sebastian Bergmann",
"email": "sebastian@phpunit.de"
},
{
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
+ },
+ {
"name": "SpacePossum"
}
],
@@ -2535,7 +2706,7 @@
"keywords": [
"diff"
],
- "time": "2018-02-15T16:58:55+00:00"
+ "time": "2020-10-14T08:39:05+00:00"
},
{
"name": "php-parallel-lint/php-parallel-lint",
@@ -2592,25 +2763,25 @@
},
{
"name": "phpdocumentor/reflection-common",
- "version": "2.1.0",
+ "version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b"
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
- "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
+ "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
- "php": ">=7.1"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.x-dev"
+ "dev-2.x": "2.x-dev"
}
},
"autoload": {
@@ -2637,32 +2808,31 @@
"reflection",
"static analysis"
],
- "time": "2020-04-27T09:25:28+00:00"
+ "time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "5.1.0",
+ "version": "5.2.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e"
+ "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
- "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
+ "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"shasum": ""
},
"require": {
- "ext-filter": "^7.1",
- "php": "^7.2",
- "phpdocumentor/reflection-common": "^2.0",
- "phpdocumentor/type-resolver": "^1.0",
- "webmozart/assert": "^1"
+ "ext-filter": "*",
+ "php": "^7.2 || ^8.0",
+ "phpdocumentor/reflection-common": "^2.2",
+ "phpdocumentor/type-resolver": "^1.3",
+ "webmozart/assert": "^1.9.1"
},
"require-dev": {
- "doctrine/instantiator": "^1",
- "mockery/mockery": "^1"
+ "mockery/mockery": "~1.3.2"
},
"type": "library",
"extra": {
@@ -2690,34 +2860,33 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "time": "2020-02-22T12:28:44+00:00"
+ "time": "2020-09-03T19:13:55+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "1.1.0",
+ "version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "7462d5f123dfc080dfdf26897032a6513644fc95"
+ "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/7462d5f123dfc080dfdf26897032a6513644fc95",
- "reference": "7462d5f123dfc080dfdf26897032a6513644fc95",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
+ "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"shasum": ""
},
"require": {
- "php": "^7.2",
+ "php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
- "ext-tokenizer": "^7.2",
- "mockery/mockery": "~1"
+ "ext-tokenizer": "*"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.x-dev"
+ "dev-1.x": "1.x-dev"
}
},
"autoload": {
@@ -2736,37 +2905,37 @@
}
],
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
- "time": "2020-02-18T18:59:58+00:00"
+ "time": "2020-09-17T18:55:26+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "v1.10.3",
+ "version": "1.12.1",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "451c3cd1418cf640de218914901e51b064abb093"
+ "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
- "reference": "451c3cd1418cf640de218914901e51b064abb093",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d",
+ "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.0.2",
- "php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
- "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
- "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
+ "doctrine/instantiator": "^1.2",
+ "php": "^7.2 || ~8.0, <8.1",
+ "phpdocumentor/reflection-docblock": "^5.2",
+ "sebastian/comparator": "^3.0 || ^4.0",
+ "sebastian/recursion-context": "^3.0 || ^4.0"
},
"require-dev": {
- "phpspec/phpspec": "^2.5 || ^3.2",
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
+ "phpspec/phpspec": "^6.0",
+ "phpunit/phpunit": "^8.0 || ^9.0 <9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.10.x-dev"
+ "dev-master": "1.11.x-dev"
}
},
"autoload": {
@@ -2799,24 +2968,24 @@
"spy",
"stub"
],
- "time": "2020-03-05T15:02:03+00:00"
+ "time": "2020-09-29T09:10:42+00:00"
},
{
"name": "phpstan/phpstan",
- "version": "0.12.25",
+ "version": "0.12.50",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "9619551d68b2d4c0d681a8df73f3c847c798ee64"
+ "reference": "b8248f9c81265af75d6d969ca3252aaf3e998f3a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9619551d68b2d4c0d681a8df73f3c847c798ee64",
- "reference": "9619551d68b2d4c0d681a8df73f3c847c798ee64",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b8248f9c81265af75d6d969ca3252aaf3e998f3a",
+ "reference": "b8248f9c81265af75d6d969ca3252aaf3e998f3a",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "php": "^7.1|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@@ -2841,36 +3010,53 @@
"MIT"
],
"description": "PHPStan - PHP Static Analysis Tool",
- "time": "2020-05-10T20:36:16+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/ondrejmirtes",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/phpstan",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-16T12:22:23+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "8.0.2",
+ "version": "9.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc"
+ "reference": "53a4b737e83be724efd2bc4e7b929b9a30c48972"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca6647ffddd2add025ab3f21644a441d7c146cdc",
- "reference": "ca6647ffddd2add025ab3f21644a441d7c146cdc",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53a4b737e83be724efd2bc4e7b929b9a30c48972",
+ "reference": "53a4b737e83be724efd2bc4e7b929b9a30c48972",
"shasum": ""
},
"require": {
"ext-dom": "*",
+ "ext-libxml": "*",
"ext-xmlwriter": "*",
- "php": "^7.3",
- "phpunit/php-file-iterator": "^3.0",
- "phpunit/php-text-template": "^2.0",
- "phpunit/php-token-stream": "^4.0",
- "sebastian/code-unit-reverse-lookup": "^2.0",
- "sebastian/environment": "^5.0",
- "sebastian/version": "^3.0",
- "theseer/tokenizer": "^1.1.3"
+ "nikic/php-parser": "^4.8",
+ "php": ">=7.3",
+ "phpunit/php-file-iterator": "^3.0.3",
+ "phpunit/php-text-template": "^2.0.2",
+ "sebastian/code-unit-reverse-lookup": "^2.0.2",
+ "sebastian/complexity": "^2.0",
+ "sebastian/environment": "^5.1.2",
+ "sebastian/lines-of-code": "^1.0",
+ "sebastian/version": "^3.0.1",
+ "theseer/tokenizer": "^1.2.0"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-pcov": "*",
@@ -2879,7 +3065,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "8.0-dev"
+ "dev-master": "9.2-dev"
}
},
"autoload": {
@@ -2905,27 +3091,33 @@
"testing",
"xunit"
],
- "time": "2020-05-23T08:02:54+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-02T03:37:32+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "3.0.1",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4"
+ "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4",
- "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8",
+ "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
@@ -2955,28 +3147,28 @@
"filesystem",
"iterator"
],
- "time": "2020-04-18T05:02:12+00:00"
+ "time": "2020-09-28T05:57:25+00:00"
},
{
"name": "phpunit/php-invoker",
- "version": "3.0.0",
+ "version": "3.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
- "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a"
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7579d5a1ba7f3ac11c80004d205877911315ae7a",
- "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
"ext-pcntl": "*",
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-pcntl": "*"
@@ -2984,7 +3176,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-master": "3.1-dev"
}
},
"autoload": {
@@ -3008,24 +3200,27 @@
"keywords": [
"process"
],
- "time": "2020-02-07T06:06:11+00:00"
+ "time": "2020-09-28T05:58:55+00:00"
},
{
"name": "phpunit/php-text-template",
- "version": "2.0.0",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346"
+ "reference": "18c887016e60e52477e54534956d7b47bc52cd84"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/526dc996cc0ebdfa428cd2dfccd79b7b53fee346",
- "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/18c887016e60e52477e54534956d7b47bc52cd84",
+ "reference": "18c887016e60e52477e54534956d7b47bc52cd84",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
@@ -3054,32 +3249,32 @@
"keywords": [
"template"
],
- "time": "2020-02-01T07:43:44+00:00"
+ "time": "2020-09-28T06:03:05+00:00"
},
{
"name": "phpunit/php-timer",
- "version": "3.1.4",
+ "version": "5.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "dc9368fae6ef2ffa57eba80a7410bcef81df6258"
+ "reference": "c9ff14f493699e2f6adee9fd06a0245b276643b7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/dc9368fae6ef2ffa57eba80a7410bcef81df6258",
- "reference": "dc9368fae6ef2ffa57eba80a7410bcef81df6258",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c9ff14f493699e2f6adee9fd06a0245b276643b7",
+ "reference": "c9ff14f493699e2f6adee9fd06a0245b276643b7",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-master": "5.0-dev"
}
},
"autoload": {
@@ -3103,103 +3298,55 @@
"keywords": [
"timer"
],
- "time": "2020-04-20T06:00:37+00:00"
- },
- {
- "name": "phpunit/php-token-stream",
- "version": "4.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c",
- "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c",
- "shasum": ""
- },
- "require": {
- "ext-tokenizer": "*",
- "php": "^7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Wrapper around PHP's tokenizer extension.",
- "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
- "keywords": [
- "tokenizer"
- ],
- "time": "2020-05-06T09:56:31+00:00"
+ "time": "2020-09-28T06:00:25+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "9.1.5",
+ "version": "9.4.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "1b570cd7edbe136055bf5f651857dc8af6b829d2"
+ "reference": "1f09a12726593737e8a228ebb1c8647305d07c41"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1b570cd7edbe136055bf5f651857dc8af6b829d2",
- "reference": "1b570cd7edbe136055bf5f651857dc8af6b829d2",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1f09a12726593737e8a228ebb1c8647305d07c41",
+ "reference": "1f09a12726593737e8a228ebb1c8647305d07c41",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.2.0",
+ "doctrine/instantiator": "^1.3.1",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
- "myclabs/deep-copy": "^1.9.1",
- "phar-io/manifest": "^1.0.3",
- "phar-io/version": "^2.0.1",
- "php": "^7.3",
- "phpspec/prophecy": "^1.8.1",
- "phpunit/php-code-coverage": "^8.0.1",
- "phpunit/php-file-iterator": "^3.0",
- "phpunit/php-invoker": "^3.0",
- "phpunit/php-text-template": "^2.0",
- "phpunit/php-timer": "^3.1.4",
- "sebastian/code-unit": "^1.0.2",
- "sebastian/comparator": "^4.0",
- "sebastian/diff": "^4.0",
- "sebastian/environment": "^5.0.1",
- "sebastian/exporter": "^4.0",
- "sebastian/global-state": "^4.0",
- "sebastian/object-enumerator": "^4.0",
- "sebastian/resource-operations": "^3.0",
- "sebastian/type": "^2.0",
- "sebastian/version": "^3.0"
+ "myclabs/deep-copy": "^1.10.1",
+ "phar-io/manifest": "^2.0.1",
+ "phar-io/version": "^3.0.2",
+ "php": ">=7.3",
+ "phpspec/prophecy": "^1.12.1",
+ "phpunit/php-code-coverage": "^9.2",
+ "phpunit/php-file-iterator": "^3.0.5",
+ "phpunit/php-invoker": "^3.1.1",
+ "phpunit/php-text-template": "^2.0.3",
+ "phpunit/php-timer": "^5.0.2",
+ "sebastian/cli-parser": "^1.0.1",
+ "sebastian/code-unit": "^1.0.6",
+ "sebastian/comparator": "^4.0.5",
+ "sebastian/diff": "^4.0.3",
+ "sebastian/environment": "^5.1.3",
+ "sebastian/exporter": "^4.0.3",
+ "sebastian/global-state": "^5.0.1",
+ "sebastian/object-enumerator": "^4.0.3",
+ "sebastian/resource-operations": "^3.0.3",
+ "sebastian/type": "^2.3",
+ "sebastian/version": "^3.0.2"
},
"require-dev": {
"ext-pdo": "*",
- "phpspec/prophecy-phpunit": "^2.0"
+ "phpspec/prophecy-phpunit": "^2.0.1"
},
"suggest": {
"ext-soap": "*",
@@ -3211,7 +3358,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.1-dev"
+ "dev-master": "9.4-dev"
}
},
"autoload": {
@@ -3240,7 +3387,17 @@
"testing",
"xunit"
],
- "time": "2020-05-22T13:54:05+00:00"
+ "funding": [
+ {
+ "url": "https://phpunit.de/donate.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-11T07:41:19+00:00"
},
{
"name": "psr/event-dispatcher",
@@ -3376,24 +3533,109 @@
"time": "2019-03-08T08:55:37+00:00"
},
{
+ "name": "rector/rector-prefixed",
+ "version": "0.8.30",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/rectorphp/rector-prefixed.git",
+ "reference": "90910ccc8c97daefa16d2501e35843cfcd395919"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/rectorphp/rector-prefixed/zipball/90910ccc8c97daefa16d2501e35843cfcd395919",
+ "reference": "90910ccc8c97daefa16d2501e35843cfcd395919",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2"
+ },
+ "conflict": {
+ "nikic/php-parser": "<4.7",
+ "phpstan/phpstan": "<0.12"
+ },
+ "replace": {
+ "rector/rector": "self.version"
+ },
+ "require-dev": {
+ "doctrine/orm": "^2.7"
+ },
+ "bin": [
+ "rector",
+ "rector.phar"
+ ],
+ "type": "library",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Prefixed version of Rector compiled in PHAR",
+ "time": "2020-10-18T09:05:00+00:00"
+ },
+ {
+ "name": "sebastian/cli-parser",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/cli-parser.git",
+ "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for parsing CLI options",
+ "homepage": "https://github.com/sebastianbergmann/cli-parser",
+ "time": "2020-09-28T06:08:49+00:00"
+ },
+ {
"name": "sebastian/code-unit",
- "version": "1.0.2",
+ "version": "1.0.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
- "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5"
+ "reference": "59236be62b1bb9919e6d7f60b0b832dc05cef9ab"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ac958085bc19fcd1d36425c781ef4cbb5b06e2a5",
- "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/59236be62b1bb9919e6d7f60b0b832dc05cef9ab",
+ "reference": "59236be62b1bb9919e6d7f60b0b832dc05cef9ab",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
@@ -3419,27 +3661,33 @@
],
"description": "Collection of value objects that represent the PHP code units",
"homepage": "https://github.com/sebastianbergmann/code-unit",
- "time": "2020-04-30T05:58:10+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-02T14:47:54+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "2.0.0",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e"
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5b5dbe0044085ac41df47e79d34911a15b96d82e",
- "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
@@ -3464,29 +3712,29 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "time": "2020-02-07T06:20:13+00:00"
+ "time": "2020-09-28T05:30:19+00:00"
},
{
"name": "sebastian/comparator",
- "version": "4.0.0",
+ "version": "4.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8"
+ "reference": "7a8ff306445707539c1a6397372a982a1ec55120"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/85b3435da967696ed618ff745f32be3ff4a2b8e8",
- "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/7a8ff306445707539c1a6397372a982a1ec55120",
+ "reference": "7a8ff306445707539c1a6397372a982a1ec55120",
"shasum": ""
},
"require": {
- "php": "^7.3",
+ "php": ">=7.3",
"sebastian/diff": "^4.0",
"sebastian/exporter": "^4.0"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
@@ -3528,27 +3776,80 @@
"compare",
"equality"
],
- "time": "2020-02-07T06:08:51+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-09-30T06:47:25+00:00"
+ },
+ {
+ "name": "sebastian/complexity",
+ "version": "2.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/complexity.git",
+ "reference": "ba8cc2da0c0bfbc813d03b56406734030c7f1eff"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/ba8cc2da0c0bfbc813d03b56406734030c7f1eff",
+ "reference": "ba8cc2da0c0bfbc813d03b56406734030c7f1eff",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.7",
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for calculating the complexity of PHP code units",
+ "homepage": "https://github.com/sebastianbergmann/complexity",
+ "time": "2020-09-28T06:05:03+00:00"
},
{
"name": "sebastian/diff",
- "version": "4.0.1",
+ "version": "4.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a"
+ "reference": "ffc949a1a2aae270ea064453d7535b82e4c32092"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3e523c576f29dacecff309f35e4cc5a5c168e78a",
- "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ffc949a1a2aae270ea064453d7535b82e4c32092",
+ "reference": "ffc949a1a2aae270ea064453d7535b82e4c32092",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.0",
+ "phpunit/phpunit": "^9.3",
"symfony/process": "^4.2 || ^5"
},
"type": "library",
@@ -3584,27 +3885,27 @@
"unidiff",
"unified diff"
],
- "time": "2020-05-08T05:01:12+00:00"
+ "time": "2020-09-28T05:32:55+00:00"
},
{
"name": "sebastian/environment",
- "version": "5.1.0",
+ "version": "5.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c"
+ "reference": "388b6ced16caa751030f6a69e588299fa09200ac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c753f04d68cd489b6973cf9b4e505e191af3b05c",
- "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac",
+ "reference": "388b6ced16caa751030f6a69e588299fa09200ac",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-posix": "*"
@@ -3612,7 +3913,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -3637,29 +3938,29 @@
"environment",
"hhvm"
],
- "time": "2020-04-14T13:36:52+00:00"
+ "time": "2020-09-28T05:52:38+00:00"
},
{
"name": "sebastian/exporter",
- "version": "4.0.0",
+ "version": "4.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "80c26562e964016538f832f305b2286e1ec29566"
+ "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/80c26562e964016538f832f305b2286e1ec29566",
- "reference": "80c26562e964016538f832f305b2286e1ec29566",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
+ "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
"shasum": ""
},
"require": {
- "php": "^7.3",
+ "php": ">=7.3",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-mbstring": "*",
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
@@ -3704,30 +4005,30 @@
"export",
"exporter"
],
- "time": "2020-02-07T06:10:52+00:00"
+ "time": "2020-09-28T05:24:23+00:00"
},
{
"name": "sebastian/global-state",
- "version": "4.0.0",
+ "version": "5.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72"
+ "reference": "ea779cb749a478b22a2564ac41cd7bda79c78dc7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bdb1e7c79e592b8c82cb1699be3c8743119b8a72",
- "reference": "bdb1e7c79e592b8c82cb1699be3c8743119b8a72",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ea779cb749a478b22a2564ac41cd7bda79c78dc7",
+ "reference": "ea779cb749a478b22a2564ac41cd7bda79c78dc7",
"shasum": ""
},
"require": {
- "php": "^7.3",
+ "php": ">=7.3",
"sebastian/object-reflector": "^2.0",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
"ext-dom": "*",
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"suggest": {
"ext-uopz": "*"
@@ -3735,7 +4036,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-master": "5.0-dev"
}
},
"autoload": {
@@ -3758,29 +4059,76 @@
"keywords": [
"global state"
],
- "time": "2020-02-07T06:11:37+00:00"
+ "time": "2020-09-28T05:54:06+00:00"
+ },
+ {
+ "name": "sebastian/lines-of-code",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/lines-of-code.git",
+ "reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/6514b8f21906b8b46f520d1fbd17a4523fa59a54",
+ "reference": "6514b8f21906b8b46f520d1fbd17a4523fa59a54",
+ "shasum": ""
+ },
+ "require": {
+ "nikic/php-parser": "^4.6",
+ "php": ">=7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^9.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "lead"
+ }
+ ],
+ "description": "Library for counting the lines of code in PHP source code",
+ "homepage": "https://github.com/sebastianbergmann/lines-of-code",
+ "time": "2020-09-28T06:07:27+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "4.0.0",
+ "version": "4.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "e67516b175550abad905dc952f43285957ef4363"
+ "reference": "f6f5957013d84725427d361507e13513702888a4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67516b175550abad905dc952f43285957ef4363",
- "reference": "e67516b175550abad905dc952f43285957ef4363",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f6f5957013d84725427d361507e13513702888a4",
+ "reference": "f6f5957013d84725427d361507e13513702888a4",
"shasum": ""
},
"require": {
- "php": "^7.3",
+ "php": ">=7.3",
"sebastian/object-reflector": "^2.0",
"sebastian/recursion-context": "^4.0"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
@@ -3805,27 +4153,27 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2020-02-07T06:12:23+00:00"
+ "time": "2020-09-28T05:55:06+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "2.0.0",
+ "version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7"
+ "reference": "d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/f4fd0835cabb0d4a6546d9fe291e5740037aa1e7",
- "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5",
+ "reference": "d9d0ab3b12acb1768bc1e0a89b23c90d2043cbe5",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
@@ -3850,27 +4198,27 @@
],
"description": "Allows reflection of object attributes, including inherited and non-public ones",
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
- "time": "2020-02-07T06:19:40+00:00"
+ "time": "2020-09-28T05:56:16+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "4.0.0",
+ "version": "4.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "cdd86616411fc3062368b720b0425de10bd3d579"
+ "reference": "ed8c9cd355089134bc9cba421b5cfdd58f0eaef7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cdd86616411fc3062368b720b0425de10bd3d579",
- "reference": "cdd86616411fc3062368b720b0425de10bd3d579",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/ed8c9cd355089134bc9cba421b5cfdd58f0eaef7",
+ "reference": "ed8c9cd355089134bc9cba421b5cfdd58f0eaef7",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
@@ -3903,24 +4251,24 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2020-02-07T06:18:20+00:00"
+ "time": "2020-09-28T05:17:32+00:00"
},
{
"name": "sebastian/resource-operations",
- "version": "3.0.0",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98"
+ "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98",
- "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98",
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
+ "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
@@ -3948,32 +4296,32 @@
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "time": "2020-02-07T06:13:02+00:00"
+ "time": "2020-09-28T06:45:17+00:00"
},
{
"name": "sebastian/type",
- "version": "2.0.0",
+ "version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1"
+ "reference": "fa592377f3923946cb90bf1f6a71ba2e5f229909"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/9e8f42f740afdea51f5f4e8cec2035580e797ee1",
- "reference": "9e8f42f740afdea51f5f4e8cec2035580e797ee1",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fa592377f3923946cb90bf1f6a71ba2e5f229909",
+ "reference": "fa592377f3923946cb90bf1f6a71ba2e5f229909",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.0"
+ "phpunit/phpunit": "^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "2.3-dev"
}
},
"autoload": {
@@ -3994,24 +4342,30 @@
],
"description": "Collection of value objects that represent the types of the PHP type system",
"homepage": "https://github.com/sebastianbergmann/type",
- "time": "2020-02-07T06:13:43+00:00"
+ "funding": [
+ {
+ "url": "https://github.com/sebastianbergmann",
+ "type": "github"
+ }
+ ],
+ "time": "2020-10-06T08:41:03+00:00"
},
{
"name": "sebastian/version",
- "version": "3.0.0",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
- "reference": "0411bde656dce64202b39c2f4473993a9081d39e"
+ "reference": "c6c1022351a901512170118436c764e473f6de8c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/0411bde656dce64202b39c2f4473993a9081d39e",
- "reference": "0411bde656dce64202b39c2f4473993a9081d39e",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
+ "reference": "c6c1022351a901512170118436c764e473f6de8c",
"shasum": ""
},
"require": {
- "php": "^7.3"
+ "php": ">=7.3"
},
"type": "library",
"extra": {
@@ -4037,102 +4391,75 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
- "time": "2020-01-21T06:36:37+00:00"
+ "time": "2020-09-28T06:39:44+00:00"
},
{
- "name": "simpletest/simpletest",
- "version": "v1.2.0",
+ "name": "staabm/annotate-pull-request-from-checkstyle",
+ "version": "1.4.0",
"source": {
"type": "git",
- "url": "https://github.com/simpletest/simpletest.git",
- "reference": "4fb6006517a1428785a0ea704fbedcc675421ec4"
+ "url": "https://github.com/staabm/annotate-pull-request-from-checkstyle.git",
+ "reference": "88a16cf5fae6d31ae38a4518ec1bf10e71137e04"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/simpletest/simpletest/zipball/4fb6006517a1428785a0ea704fbedcc675421ec4",
- "reference": "4fb6006517a1428785a0ea704fbedcc675421ec4",
+ "url": "https://api.github.com/repos/staabm/annotate-pull-request-from-checkstyle/zipball/88a16cf5fae6d31ae38a4518ec1bf10e71137e04",
+ "reference": "88a16cf5fae6d31ae38a4518ec1bf10e71137e04",
"shasum": ""
},
"require": {
- "php": "^7.1"
+ "ext-simplexml": "*",
+ "php": "^7.0 || ^8.0"
},
- "type": "library",
- "autoload": {
- "classmap": [
- "."
- ]
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "^2.16.1"
},
+ "bin": [
+ "cs2pr"
+ ],
+ "type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
- "LGPL-2.0+"
+ "MIT"
],
"authors": [
{
- "name": "Marcus Baker",
- "email": "marcus@lastcraft.com",
- "role": "Original project lead"
- },
- {
- "name": "Jason Sweat",
- "role": "Original developer"
- },
- {
- "name": "Travis Swicegood",
- "role": "Original developer"
- },
- {
- "name": "Perrick Penet",
- "role": "Original developer"
- },
- {
- "name": "Edward Z. Yang",
- "role": "Original developer"
- },
- {
- "name": "Lachlan Donald",
- "email": "lachlan@ljd.cc"
- },
- {
- "name": "Lars Vierbergen",
- "email": "vierbergenlars@gmail.com"
- },
- {
- "name": "Jens A. Koch"
+ "name": "Markus Staab"
}
],
- "description": "Unit testing, mock objects and web testing framework for PHP built around test cases.",
- "homepage": "http://simpletest.org/",
- "keywords": [
- "SimpleTest",
- "code-coverage",
- "selenium",
- "testing",
- "unit-test"
+ "funding": [
+ {
+ "url": "https://github.com/staabm",
+ "type": "github"
+ }
],
- "time": "2019-09-17T15:08:22+00:00"
+ "time": "2020-09-26T11:36:44+00:00"
},
{
"name": "symfony/console",
- "version": "v5.0.8",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935"
+ "reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/5fa1caadc8cdaa17bcfb25219f3b53fe294a9935",
- "reference": "5fa1caadc8cdaa17bcfb25219f3b53fe294a9935",
+ "url": "https://api.github.com/repos/symfony/console/zipball/ae789a8a2ad189ce7e8216942cdb9b77319f5eb8",
+ "reference": "ae789a8a2ad189ce7e8216942cdb9b77319f5eb8",
"shasum": ""
},
"require": {
- "php": "^7.2.5",
+ "php": ">=7.2.5",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php73": "^1.8",
- "symfony/service-contracts": "^1.1|^2"
+ "symfony/polyfill-php80": "^1.15",
+ "symfony/service-contracts": "^1.1|^2",
+ "symfony/string": "^5.1"
},
"conflict": {
"symfony/dependency-injection": "<4.4",
+ "symfony/dotenv": "<5.1",
"symfony/event-dispatcher": "<4.4",
"symfony/lock": "<4.4",
"symfony/process": "<4.4"
@@ -4158,7 +4485,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -4185,29 +4512,43 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2020-03-30T11:42:42+00:00"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-10-07T15:23:00+00:00"
},
{
"name": "symfony/css-selector",
- "version": "v5.0.8",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "5f8d5271303dad260692ba73dfa21777d38e124e"
+ "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/5f8d5271303dad260692ba73dfa21777d38e124e",
- "reference": "5f8d5271303dad260692ba73dfa21777d38e124e",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/e544e24472d4c97b2d11ade7caacd446727c6bf9",
+ "reference": "e544e24472d4c97b2d11ade7caacd446727c6bf9",
"shasum": ""
},
"require": {
- "php": "^7.2.5"
+ "php": ">=7.2.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -4238,25 +4579,41 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2020-03-27T16:56:45+00:00"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-05-20T17:43:50+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v5.0.8",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc"
+ "reference": "d5de97d6af175a9e8131c546db054ca32842dd0f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/24f40d95385774ed5c71dbf014edd047e2f2f3dc",
- "reference": "24f40d95385774ed5c71dbf014edd047e2f2f3dc",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d5de97d6af175a9e8131c546db054ca32842dd0f",
+ "reference": "d5de97d6af175a9e8131c546db054ca32842dd0f",
"shasum": ""
},
"require": {
- "php": "^7.2.5",
- "symfony/event-dispatcher-contracts": "^2"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1",
+ "symfony/event-dispatcher-contracts": "^2",
+ "symfony/polyfill-php80": "^1.15"
},
"conflict": {
"symfony/dependency-injection": "<4.4"
@@ -4269,6 +4626,7 @@
"psr/log": "~1.0",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
+ "symfony/error-handler": "^4.4|^5.0",
"symfony/expression-language": "^4.4|^5.0",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/service-contracts": "^1.1|^2",
@@ -4281,7 +4639,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -4308,24 +4666,38 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2020-03-27T16:56:45+00:00"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-09-18T14:27:32+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
- "version": "v2.0.1",
+ "version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
- "reference": "af23c2584d4577d54661c434446fb8fbed6025dd"
+ "reference": "0ba7d54483095a198fa51781bc608d17e84dffa2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd",
- "reference": "af23c2584d4577d54661c434446fb8fbed6025dd",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ba7d54483095a198fa51781bc608d17e84dffa2",
+ "reference": "0ba7d54483095a198fa51781bc608d17e84dffa2",
"shasum": ""
},
"require": {
- "php": "^7.2.5",
+ "php": ">=7.2.5",
"psr/event-dispatcher": "^1"
},
"suggest": {
@@ -4334,7 +4706,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "2.2-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
}
},
"autoload": {
@@ -4366,30 +4742,30 @@
"interoperability",
"standards"
],
- "time": "2019-11-18T17:27:11+00:00"
+ "time": "2020-09-07T11:33:47+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v5.0.8",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91"
+ "reference": "1a8697545a8d87b9f2f6b1d32414199cc5e20aae"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/7cd0dafc4353a0f62e307df90b48466379c8cc91",
- "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/1a8697545a8d87b9f2f6b1d32414199cc5e20aae",
+ "reference": "1a8697545a8d87b9f2f6b1d32414199cc5e20aae",
"shasum": ""
},
"require": {
- "php": "^7.2.5",
+ "php": ">=7.2.5",
"symfony/polyfill-ctype": "~1.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -4416,29 +4792,43 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2020-04-12T14:40:17+00:00"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-09-27T14:02:37+00:00"
},
{
"name": "symfony/finder",
- "version": "v5.0.8",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d"
+ "reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/600a52c29afc0d1caa74acbec8d3095ca7e9910d",
- "reference": "600a52c29afc0d1caa74acbec8d3095ca7e9910d",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8",
+ "reference": "2c3ba7ad6884e6c4451ce2340e2dc23f6fa3e0d8",
"shasum": ""
},
"require": {
- "php": "^7.2.5"
+ "php": ">=7.2.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -4465,29 +4855,45 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2020-03-27T16:56:45+00:00"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-09-02T16:23:27+00:00"
},
{
"name": "symfony/options-resolver",
- "version": "v5.0.8",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
- "reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1"
+ "reference": "4c7e155bf7d93ea4ba3824d5a14476694a5278dd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/options-resolver/zipball/3707e3caeff2b797c0bfaadd5eba723dd44e6bf1",
- "reference": "3707e3caeff2b797c0bfaadd5eba723dd44e6bf1",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4c7e155bf7d93ea4ba3824d5a14476694a5278dd",
+ "reference": "4c7e155bf7d93ea4ba3824d5a14476694a5278dd",
"shasum": ""
},
"require": {
- "php": "^7.2.5"
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1",
+ "symfony/polyfill-php80": "^1.15"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -4519,37 +4925,55 @@
"configuration",
"options"
],
- "time": "2020-04-06T10:40:56+00:00"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-09-27T03:44:28+00:00"
},
{
- "name": "symfony/polyfill-mbstring",
- "version": "v1.17.0",
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "v1.18.1",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
- "reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b740103edbdcc39602239ee8860f0f45a8eb9aa5",
+ "reference": "b740103edbdcc39602239ee8860f0f45a8eb9aa5",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
- "ext-mbstring": "For best performance"
+ "ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.17-dev"
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
+ "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
},
"files": [
"bootstrap.php"
@@ -4569,29 +4993,97 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill for the Mbstring extension",
+ "description": "Symfony polyfill for intl's grapheme_* functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
- "mbstring",
+ "grapheme",
+ "intl",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2020-07-14T12:35:20+00:00"
+ },
+ {
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "v1.18.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
+ "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "intl",
+ "normalizer",
"polyfill",
"portable",
"shim"
],
- "time": "2020-05-12T16:47:27+00:00"
+ "time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-php70",
- "version": "v1.17.0",
+ "version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
- "reference": "82225c2d7d23d7e70515496d249c0152679b468e"
+ "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/82225c2d7d23d7e70515496d249c0152679b468e",
- "reference": "82225c2d7d23d7e70515496d249c0152679b468e",
+ "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
+ "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
"shasum": ""
},
"require": {
@@ -4601,7 +5093,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.17-dev"
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -4637,20 +5133,20 @@
"portable",
"shim"
],
- "time": "2020-05-12T16:47:27+00:00"
+ "time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-php72",
- "version": "v1.17.0",
+ "version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
- "reference": "f048e612a3905f34931127360bdd2def19a5e582"
+ "reference": "639447d008615574653fb3bc60d1986d7172eaae"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582",
- "reference": "f048e612a3905f34931127360bdd2def19a5e582",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
+ "reference": "639447d008615574653fb3bc60d1986d7172eaae",
"shasum": ""
},
"require": {
@@ -4659,7 +5155,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.17-dev"
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -4692,20 +5192,20 @@
"portable",
"shim"
],
- "time": "2020-05-12T16:47:27+00:00"
+ "time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-php73",
- "version": "v1.17.0",
+ "version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc"
+ "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc",
- "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
+ "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
"shasum": ""
},
"require": {
@@ -4714,7 +5214,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.17-dev"
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@@ -4750,29 +5254,96 @@
"portable",
"shim"
],
- "time": "2020-05-12T16:47:27+00:00"
+ "time": "2020-07-14T12:35:20+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "v1.18.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
+ "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0.8"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/process",
- "version": "v5.0.8",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "3179f68dff5bad14d38c4114a1dab98030801fd7"
+ "reference": "d3a2e64866169586502f0cd9cab69135ad12cee9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/3179f68dff5bad14d38c4114a1dab98030801fd7",
- "reference": "3179f68dff5bad14d38c4114a1dab98030801fd7",
+ "url": "https://api.github.com/repos/symfony/process/zipball/d3a2e64866169586502f0cd9cab69135ad12cee9",
+ "reference": "d3a2e64866169586502f0cd9cab69135ad12cee9",
"shasum": ""
},
"require": {
- "php": "^7.2.5"
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.15"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -4799,24 +5370,38 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2020-04-15T15:59:10+00:00"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-09-02T16:23:27+00:00"
},
{
"name": "symfony/service-contracts",
- "version": "v2.0.1",
+ "version": "v2.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
- "reference": "144c5e51266b281231e947b51223ba14acf1a749"
+ "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749",
- "reference": "144c5e51266b281231e947b51223ba14acf1a749",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1",
+ "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1",
"shasum": ""
},
"require": {
- "php": "^7.2.5",
+ "php": ">=7.2.5",
"psr/container": "^1.0"
},
"suggest": {
@@ -4825,7 +5410,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-master": "2.2-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
}
},
"autoload": {
@@ -4857,30 +5446,30 @@
"interoperability",
"standards"
],
- "time": "2019-11-18T17:27:11+00:00"
+ "time": "2020-09-07T11:33:47+00:00"
},
{
"name": "symfony/stopwatch",
- "version": "v5.0.8",
+ "version": "v5.1.7",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
- "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73"
+ "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/a1d86d30d4522423afc998f32404efa34fcf5a73",
- "reference": "a1d86d30d4522423afc998f32404efa34fcf5a73",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0f7c58cf81dbb5dd67d423a89d577524a2ec0323",
+ "reference": "0f7c58cf81dbb5dd67d423a89d577524a2ec0323",
"shasum": ""
},
"require": {
- "php": "^7.2.5",
+ "php": ">=7.2.5",
"symfony/service-contracts": "^1.0|^2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-master": "5.1-dev"
}
},
"autoload": {
@@ -4907,27 +5496,126 @@
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
- "time": "2020-03-27T16:56:45+00:00"
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-05-20T17:43:50+00:00"
+ },
+ {
+ "name": "symfony/string",
+ "version": "v5.1.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/string.git",
+ "reference": "4a9afe9d07bac506f75bcee8ed3ce76da5a9343e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/string/zipball/4a9afe9d07bac506f75bcee8ed3ce76da5a9343e",
+ "reference": "4a9afe9d07bac506f75bcee8ed3ce76da5a9343e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-intl-grapheme": "~1.0",
+ "symfony/polyfill-intl-normalizer": "~1.0",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "~1.15"
+ },
+ "require-dev": {
+ "symfony/error-handler": "^4.4|^5.0",
+ "symfony/http-client": "^4.4|^5.0",
+ "symfony/translation-contracts": "^1.1|^2",
+ "symfony/var-exporter": "^4.4|^5.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\String\\": ""
+ },
+ "files": [
+ "Resources/functions.php"
+ ],
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony String component",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "grapheme",
+ "i18n",
+ "string",
+ "unicode",
+ "utf-8",
+ "utf8"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-09-15T12:23:47+00:00"
},
{
"name": "theseer/tokenizer",
- "version": "1.1.3",
+ "version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/theseer/tokenizer.git",
- "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9"
+ "reference": "75a63c33a8577608444246075ea0af0d052e452a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
- "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
+ "reference": "75a63c33a8577608444246075ea0af0d052e452a",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-tokenizer": "*",
"ext-xmlwriter": "*",
- "php": "^7.0"
+ "php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
@@ -4947,7 +5635,7 @@
}
],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
- "time": "2019-06-13T22:48:21+00:00"
+ "time": "2020-07-12T23:59:07+00:00"
},
{
"name": "vimeo/psalm",
@@ -5047,23 +5735,24 @@
},
{
"name": "webmozart/assert",
- "version": "1.8.0",
+ "version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
- "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
+ "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
- "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
+ "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0",
+ "php": "^5.3.3 || ^7.0 || ^8.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
+ "phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<3.9.1"
},
"require-dev": {
@@ -5091,7 +5780,7 @@
"check",
"validate"
],
- "time": "2020-04-18T12:12:48+00:00"
+ "time": "2020-07-08T17:02:28+00:00"
},
{
"name": "webmozart/glob",
@@ -5193,8 +5882,12 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
- "php": ">=7.1",
- "ext-pgsql": "*"
+ "php": ">=7.2",
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "ext-pgsql": "*",
+ "ext-xml": "*"
},
- "platform-dev": []
+ "platform-dev": [],
+ "plugin-api-version": "1.1.0"
}
diff --git a/config.inc.php-dist b/config.inc.php-dist
index 76e089af..1991083b 100644
--- a/config.inc.php-dist
+++ b/config.inc.php-dist
@@ -1,80 +1,46 @@
<?php
-// Allows to load yaml config. Matching keys will override config defined in this file
+
+/**
+ * PHPPgAdmin 6.0.0
+ */
+
use Symfony\Component\Yaml\Yaml;
$conf = [
/**
* Change this parameter ONLY if you mean to serve phpPgAdmin from a subfolder
* e.g for `https://www.server.com/phppga` this parameter should be `/phppga`
- * (leading slash, no trailing slash)
- *
+ * (leading slash, no trailing slash).
+ *
* If you mean to serve phpPgAdmin6 in the document root (e.g `https://www.server.com`)
* this parameter must be an empty string
*/
- 'subfolder' => '',
-
- /**
- * enable this to calculate schema and table sizes. This will have a performance impact
- * e.g. $conf['display_sizes'] = true
- *
- * you can also enable it specifically for tables and or schemas:
- * $conf['display_sizes'] = ['schemas'=>false,'tables'=>true];
- */
- 'display_sizes' => false,
+ 'subfolder' => '',
- /**
- * Set to true if you want to enable debugging output
- */
- 'debugmode' => false,
+ /**
+ * enable this to calculate schema and table sizes. This will have a performance impact
+ * e.g. $conf['display_sizes'] = true.
+ *
+ * you can also enable it specifically for tables and or schemas:
+ * $conf['display_sizes'] = ['schemas'=>false,'tables'=>true];
+ */
+ 'display_sizes' => false,
/**
- * Don't touch this value. It's used to inform the config structure has a breaking change
- *
+ * Set to true if you want to enable debugging output.
*/
- 'version'=> 61
+ 'debugmode' => false,
+ /**
+ * Don't touch this value. It's used to inform the config structure has a breaking change.
+ */
+ 'version' => 61,
];
-$conf['register_debuggers'] = function () {
- // If debugmode is active, and $conf['register_debuggers']
- // is a function (or a callable), it will be invoked before
- // instancing the app's container
- define('THIS_WAS_PRODUCTION', false);
- // e.g. register Whoops as exception handler
- if (THIS_WAS_PRODUCTION
- && class_exists('Whoops\Run')) {
- $whoops = new Whoops\Run();
- $whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
- $whoops->register();
- }
-
- // Using PHP-Console
- // PHP_CONSOLE doesn't work on PHP 7.4 yet
- // https://github.com/barbushin/php-console
- // (Only in Chrome)
- if (THIS_WAS_PRODUCTION &&
- version_compare(PHP_VERSION, 7.4, '<') &&
- class_exists('PhpConsole\Handler')) {
- $phpConsoleHandler = \PhpConsole\Handler::getInstance();
- $connector = $phpConsoleHandler->getConnector();
- $connector->setPassword('yohoho123', true);
- $connector->enableSslOnlyMode();
- $phpConsoleHandler->start();
- }
-
- // Example with Kint
- if (THIS_WAS_PRODUCTION &&
- class_exists('Kint')) {
- \Kint::$enabled_mode = true;
- \Kint\Renderer\RichRenderer::$folder = false;
- function ddd(...$v)
- {
- \Kint::dump(...$v);
- exit;
- }
-
- \Kint::$aliases[] = 'ddd';
- }
+// Two debug library examples. Pick one of course.
+$conf['register_debuggers'] = static function (): void {
+ //require_once __DIR__ . '/.configs/debug.kint.php';
+ //require_once __DIR__ . '/.configs/debug.var_dumper.php';
};
// optionally, set a path for your error log, relative to this project root
@@ -86,36 +52,40 @@ $server_index = 0;
/**
* $conf['servers'] is an array that holds (at least) one server block.
+ *
* @see https://github.com/HuasoFoundries/phpPgAdmin6/wiki/Config:-servers
- *
*/
$conf['servers'][$server_index] = [
// Display name for the server on the login screen
- 'desc' => 'PostgreSQL',
+ 'desc' => 'PostgreSQL',
// Hostname or IP address for server. Use '' for UNIX domain socket.
// use 'localhost' for TCP/IP connection on this computer
- 'host' => '',
+ 'host' => '',
// Database port on server (5432 is the PostgreSQL default)
- 'port' => 5432,
+ 'port' => 5432,
// Database SSL mode
// Possible options: disable, allow, prefer, require
// To require SSL on older servers use option: legacy
// To ignore the SSL mode, use option: unspecified
- 'sslmode' => 'allow',
+ 'sslmode' => 'allow',
// Change the default database only if you cannot connect to template1.
// For a PostgreSQL 8.1+ server, you can set this to 'postgres'.
- 'defaultdb' => 'template1',
+ 'defaultdb' => 'template1',
// Specify the path to the database dump utilities for this server.
// You can set these to '' if no dumper is available.
- 'pg_dump_path' => '/usr/bin/pg_dump',
- 'pg_dumpall_path' => '/usr/bin/pg_dumpall'
+ 'pg_dump_path' => '/usr/bin/pg_dump',
+ 'pg_dumpall_path' => '/usr/bin/pg_dumpall',
];
+// Server group 0 will show up with an alias
+$conf['srv_groups'][0]['desc'] = 'dev1 and prod2';
+// Add here servers indexes belonging to the group '0' seperated by comma
+$conf['srv_groups'][0]['servers'] = '1,3';
// Default language. E.g.: 'english', 'polish', etc. See lang/ directory
// for all possibilities. If you specify 'auto' (the default) it will use
@@ -188,30 +158,33 @@ $conf['ajax_refresh'] = 3;
// If there's a config.yml in the root folder, parse it and merge its contents with $conf array
// see config.example.yml
-$yamlConfigPath = implode(DIRECTORY_SEPARATOR, [__DIR__, 'config.yml']);
+$yamlConfigPath = \implode(\DIRECTORY_SEPARATOR, [__DIR__, 'config.yml']);
+
if (\is_readable($yamlConfigPath) && \class_exists('Symfony\Component\Yaml\Yaml')) {
try {
- $yamlConfig = Symfony\Component\Yaml\Yaml::parseFile($yamlConfigPath);
+ $yamlConfig = Yaml::parseFile($yamlConfigPath);
// Servers and srv_groups must be merged beforehand
$servers = $conf['servers'] ?? [];
+
foreach ($yamlConfig['servers'] ?? [] as $index => $srv) {
$servers[] = $srv;
}
$srv_groups = $conf['srv_groups'] ?? [];
+
foreach ($yamlConfig['srv_groups'] ?? [] as $index => $srv_group) {
$srv_groups[] = $srv;
}
- $yamlConfig['srv_groups'] = array_merge([
+ $yamlConfig['srv_groups'] = \array_merge([
$conf['srv_groups'] ?? [],
$yamlConfig['srv_groups'] ?? [],
]);
$conf = \array_merge($conf, $yamlConfig);
- $conf['servers'] = $servers ?? [];
+ $conf['servers'] = $servers ?? [];
$conf['srv_groups'] = $srv_groups ?? [];
} catch (\Exception $e) {
die($e->getMessage());
\error_log($e->getTraceAsString());
}
-} \ No newline at end of file
+}
diff --git a/mk_linters.mk b/mk_linters.mk
index 03373b14..6f3ea7d6 100644
--- a/mk_linters.mk
+++ b/mk_linters.mk
@@ -41,89 +41,162 @@ enable_xdebug:
xd_swi $(new_status) ;\
fi
-phpmd:
- @if [ "$(HAS_PHPMD)" == "" ]; then \
- echo -e "$(GREEN)phpmd$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
- echo -e "Install it with $(GREEN)phive install phpmd$(WHITE)" ;\
- else \
- phpmd src test .phpmd.xml | sed "s/.*\///" ;\
- fi ;\
- echo ""
-
-
-
-
-
-psalm:
- @${MAKE} disable_xdebug --no-print-directory
- @if [ ! -f "vendor/bin/psalm" ]; then \
- echo -e "$(GREEN)psalm$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
- echo -e "Install it with $(GREEN)composer require --dev vimeo/psalm$(WHITE)" ;\
- exit 0 ;\
+abort_suggesting_composer:
+ @if [ "0" != "$(XDSWI_STATUS)" ]; then \
+ $(YELLOW)Warn: $(GREEN)xdebug$(WHITE) is enabled. Just saying... ;\
fi
-
- @mkdir -p .build/psalm ;\
- vendor/bin/psalm --show-info=false --long-progress --threads=2 --config=psalm.xml | tee temp/psalm.output.txt
- @${MAKE} enable_xdebug new_status=$(XDSWI_STATUS) --no-print-directory ;\
- echo ""
-
-phpstan:
- @${MAKE} disable_xdebug --no-print-directory
- @if [ ! -f "vendor/bin/phpstan" ]; then \
- echo -e "$(GREEN)phpstan$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
- echo -e "Install it with $(GREEN)composer require --dev phpstan/phpstan$(WHITE)" ;\
- exit 0 ;\
+ @if [ ! -f "$(executable)" ]; then \
+ echo -e "$(GREEN)$(package_name)$(WHITE) $(RED)NOT FOUND$(WHITE) on $(CYAN)$(executable)$(WHITE). " ;\
+ echo -e "Install it with $(GREEN)composer require --dev $(package_name)$(WHITE)" ;\
+ echo ;\
+ exit 1 ;\
fi
-
- @mkdir -p .build/phpstan ;\
- ./vendor/bin/phpstan analyse --memory-limit=2G --configuration phpstan.neon | tee temp/phpstan.output.txt
- @${MAKE} enable_xdebug new_status=$(XDSWI_STATUS) --no-print-directory ;\
- echo ""
-lint:
- @if [ -f "vendor/bin/parallel-lint" ]; then \
- mkdir -p .build/parallel ;\
- ${MAKE} disable_xdebug --no-print-directory ;\
- vendor/bin/parallel-lint --ignore-fails --exclude vendor src ;\
- ${MAKE} enable_xdebug new_status=$(XDSWI_STATUS) --no-print-directory;\
- else \
- echo -e "$(GREEN)parallel-lint$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
- echo -e "Install it with $(GREEN)composer require --dev php-parallel-lint/php-parallel-lint$(WHITE)" ;\
+check_executable_or_exit_with_phive:
+ @if [ ! -f "$(executable)" ]; then \
+ echo -e "$(GREEN)$(package_name)$(WHITE) $(RED)NOT FOUND$(WHITE) on $(CYAN)$(executable)$(WHITE). " ;\
+ echo -e "Install it with $(GREEN)phive install $(package_name)$(WHITE)" ;\
+ echo ;\
+ exit 1 ;\
+ fi
+ @if [ "0" != "$(XDSWI_STATUS)" ]; then \
+ $(YELLOW)Warn: $(GREEN)xdebug$(WHITE) is enabled. Just saying... ;\
fi
- @find ./src -name \*.php -print0 | xargs -0 -n 1 php -l
- @echo ""
+
update_baselines:
@${MAKE} disable_xdebug --no-print-directory ;\
- find .build/phpstan -mtime +5 -type f -name "*.php" -exec rm -rf {} \;
+ find .build/phpstan -mtime +5 -type f -name "*.php" -exec rm -rf {} \;
@vendor/bin/phpstan analyze --configuration phpstan.neon --generate-baseline ;\
find .build/psalm -mtime +5 -type f -exec rm -rf {} \;
@vendor/bin/psalm --config=psalm.xml --update-baseline --ignore-baseline --set-baseline=psalm-baseline.xml ;\
${MAKE} enable_xdebug new_status=$(XDSWI_STATUS) --no-print-directory
+.PHONY:abort_suggesting_composer check_executable_or_exit_with_phive update_baselines
+
+phpmd: package_name:=phpmd
+phpmd: executable:= $(shell command -v phpmd 2> /dev/null)
+phpmd:
+ @${MAKE} check_executable_or_exit_with_phive executable=$(executable) package_name=$(package_name) --no-print-directory
+ @phpmd src text .phpmd.xml --exclude=src/help/*,src/translations/*
-fixers: lint csfixer dependency-analysis phpmd psalm phpstan
+phpmd_checkstyle:
+ @${MAKE} phpmd > temp/phpmd.report.json ;\
+ echo -e "$(GREEN)Finished PHPMD$(WHITE): waiting 1s"
+ @sleep 1 ;\
+ php tools/phpmd_checkstyle.php ;\
+ echo -e "$(GREEN)Formatted PHPMD$(WHITE): as checkStyle"
+ cat temp/phpmd.checkstyle.xml | vendor/bin/cs2pr
+csfixer: package_name:=friendsofphp/php-cs-fixer
+csfixer: executable:=vendor/bin/php-cs-fixer
+csfixer:
+ifeq (,$(reportformat))
+ $(eval reportformat='txt')
+endif
+ @${MAKE} abort_suggesting_composer executable=$(executable) package_name=$(package_name) --no-print-directory
+ @mkdir -p .build/phpcs && touch .build/phpcs/csfixer.cache ;\
+ vendor/bin/php-cs-fixer fix --config=.php_cs.php --cache-file=.build/phpcs/csfixer.cache --format=$(reportformat) $(dry_run) --diff
+
+csfixer_checkstyle:
+ @${MAKE} csfixer reportformat=checkstyle dry_run='--dry-run' --no-print-directory > temp/csfixer.checkstyle.xml ;\
+ cat temp/csfixer.checkstyle.xml | vendor/bin/cs2pr ;\
+ echo ""
+
+csfixer_dry:
+ @${MAKE} csfixer dry_run='--dry-run' --no-print-directory
+
+
+phpcs: package_name=phpcs
+phpcs: executable:= $(shell command -v phpcs 2> /dev/null)
+phpcs:
+ifeq (,$(reportformat))
+ $(eval reportformat='diff')
+endif
+ @${MAKE} check_executable_or_exit_with_phive executable=$(executable) package_name=$(package_name) --no-print-directory
+ @mkdir -p .build/phpcs && touch .build/phpcs/php-cs.cache ;\
+ phpcs --standard=.phpcs.xml --parallel=2 --cache=.build/phpcs/php-cs.cache --report=$(reportformat) src/*
-.PHONY: dependency-analysis
-dependency-analysis: vendor ## Runs a dependency analysis with maglnet/composer-require-checker
- tools/composer-require-checker check --config-file=$(shell pwd)/composer-require-checker.json
+
+phpcs_checkstyle:
+ @${MAKE} phpcs reportformat=checkstyle --no-print-directory > temp/phpcs.checkstyle.xml ;\
+ echo -e "Finished $(GREEN)phpcs$(WHITE): waiting 1s"
+ @sleep 1 ;\
+ cat temp/phpcs.checkstyle.xml | vendor/bin/cs2pr
+
+
+psalm:
+ $(eval executable:=vendor/bin/psalm)
+ $(eval package_name:=vimeo/psalm)
+ @${MAKE} abort_suggesting_composer executable=$(executable) package_name=$(package_name) --no-print-directory
+ @mkdir -p .build/psalm ;\
+ echo -e "Running:" ;\
+ echo -e "$(GREEN)vendor/bin/psalm$(WHITE) --show-info=false --long-progress --threads=2 --config=psalm.xml "
+ @vendor/bin/psalm --show-info=false --long-progress --threads=2 --config=psalm.xml
+
+
+
+phpstan:
+ $(eval executable:=vendor/bin/phpstan)
+ $(eval package_name:=phpstan/phpstan)
+ @${MAKE} abort_suggesting_composer executable=$(executable) package_name=$(package_name) --no-print-directory
+ @mkdir -p .build/phpstan ;\
+ echo -e "Running:" ;\
+ echo -e "$(GREEN)vendor/bin/phpstan$(WHITE) analyse --memory-limit=2G --configuration phpstan.neon "
+
+ @vendor/bin/phpstan analyse --memory-limit=2G --configuration phpstan.neon
+
+phpstan_checkstyle:
+ @${MAKE} phpstan error-format=checkstyle > temp/phpstan.checkstyle.xml ;\
+ cat temp/phpstan.checkstyle.xml | vendor/bin/cs2pr ;\
+ echo ""
+
+lint:
+ $(eval executable:=vendor/bin/parallel-lint )
+ $(eval package_name:=php-parallel-lint/php-parallel-lint )
+ @${MAKE} abort_suggesting_composer executable=$(executable) package_name=$(package_name) --no-print-directory
+ mkdir -p .build/parallel ;\
+ $(executable) --ignore-fails --exclude vendor src
+
+
+fixers: dependency_analysis lint csfixer_dry psalm phpstan phpcs
+
install_dev_deps:
@if [ "$(HAS_PHIVE)" == "" ]; then \
- echo -e "$(GREEN)phive$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
- echo -e "Visit $(GREEN)https://github.com/phar-io/phive$(WHITE) and follow install procedure" ;\
- else \
- phive install phpmd ;\
+ echo -e "$(GREEN)phive$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
+ echo -e "Visit $(GREEN)https://github.com/phar-io/phive$(WHITE) and follow install procedure" ;\
+ else \
+ phive install phpmd ;\
phive install phpcpd ;\
phive install phpcs ;\
+ phive install composer-unused ;\
phive install composer-require-checker ;\
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b tools ;\
- fi ;\
- echo ""
+ fi ;\
+ echo ""
+
+
+.PHONY: dependency_analysis
+dependency_analysis: vendor ## Runs a dependency analysis with maglnet/composer-require-checker
+ $(eval executable:=tools/composer-require-checker)
+ $(eval package_name:=composer-require-checker )
+ @${MAKE} check_executable_or_exit_with_phive executable=$(executable) package_name=$(package_name) --no-print-directory
+ @$(executable) check --config-file=$(shell pwd)/composer-require-checker.json
+ tools/composer-unused --excludePackage=adodb/adodb-php
+
+
reviewdog:
+ $(eval executable:=tools/reviewdog)
+ $(eval package_name:=reviewdog )
+ @if [ ! -f "$(executable)" ]; then \
+ echo -e "$(GREEN)$(package_name)$(WHITE) $(RED)NOT FOUND$(WHITE) on $(CYAN)$(executable)$(WHITE). " ;\
+ echo -e "Install it with " ;\
+ echo -e "curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b tools " ;\
+ exit 1 ;\
+ fi
@tools/reviewdog -diff="git diff develop" \ No newline at end of file
diff --git a/package.json b/package.json
index e64c96ea..bbd8cd29 100644
--- a/package.json
+++ b/package.json
@@ -6,10 +6,11 @@
"author": "ffflabs <amenadiel@gmail.com>",
"license": "MIT",
"scripts": {
- "build": "npm run compile_less && workbox injectManifest workbox-config.js",
+ "build": "npm run compile_less && workbox injectManifest workbox-config.js && yarn disable_development_mode",
+ "disable_development_mode":"sed -i 's/development_assets=true/development_assets=false/' assets/templates/components/common_head.twig ",
"compile_less": "lessc assets/themes/global.less assets/themes/global.css",
"eslint": "eslint --fix --ext js --ignore-path .eslintignore assets",
- "prettier": "node_modules/.bin/prettier -c --config .prettierrc.js assets/{js,themes,templates}/*"
+ "prettier": "prettier -c --config .prettierrc assets/{js,themes}/*"
},
"devDependencies": {
"@types/jquery": "^3.5.1",
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index 562e18f0..14526e88 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -1,33 +1,492 @@
parameters:
ignoreErrors:
+ -
+ message: "#^Call to method setFetchMode\\(\\) on an unknown class the\\.$#"
+ count: 2
+ path: src/classes/Connection.php
+
+ -
+ message: "#^Call to method connect\\(\\) on an unknown class the\\.$#"
+ count: 2
+ path: src/classes/Connection.php
+
+ -
+ message: "#^PHPDoc tag @property has invalid value \\(\\)\\: Unexpected token \"\\\\n \", expected type at offset 540$#"
+ count: 1
+ path: src/classes/ContainerUtils.php
+
+ -
+ message: "#^Method PHPPgAdmin\\\\ContainerUtils\\:\\:getRedirectUrl\\(\\) invoked with 1 parameter, 0 required\\.$#"
+ count: 1
+ path: src/classes/ContainerUtils.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\ContainerUtils\\:\\:\\$debug\\.$#"
+ count: 1
+ path: src/classes/ContainerUtils.php
+
+ -
+ message: "#^PHPDoc tag @var contains unresolvable type\\.$#"
+ count: 1
+ path: src/classes/Misc.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Misc\\:\\:halt\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/classes/Misc.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\AggregatesController\\:\\:doCreate\\(\\) \\(void\\) is used\\.$#"
+ count: 4
+ path: src/controllers/AggregatesController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\AlldbController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/AlldbController.php
+
+ -
+ message: "#^PHPDoc tag @param references unknown parameter\\: \\$no_db_connection$#"
+ count: 1
+ path: src/controllers/BaseController.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Controller\\\\BaseController\\:\\:\\$postgresqlMinVer\\.$#"
+ count: 1
+ path: src/controllers/BaseController.php
-# -
-# message: "#^Offset '[a-zA-Z0-9_]+' does not exist on array[.*].$#"
-# path: src/*
-
- message: "#^PHPDoc tag @param references unknown parameter\\: \\$[a-zA-Z0-9_]+$#"
- path: src/*
+ message: "#^Call to an undefined method PHPPgAdmin\\\\Controller\\\\ConstraintsController\\:\\:doTree\\(\\)\\.$#"
+ count: 1
+ path: src/controllers/ConstraintsController.php
+
-
- message: "#^Access to an undefined property Psr\\\\[a-zA-Z0-9_]+\\\\[a-zA-Z0-9_]+\\:\\:\\$[a-zA-Z0-9_]+\\.$#"
- path: src/*
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\ConstraintsController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 7
+ path: src/controllers/ConstraintsController.php
-
- message: "#^Access to an undefined property PHPPgAdmin\\\\[a-zA-Z0-9_]+\\\\[a-zA-Z0-9_]+\\:\\:\\$[a-zA-Z0-9_]+\\.$#"
- path: src/*
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\ConstraintsController\\:\\:formPrimaryOrUniqueKey\\(\\) \\(void\\) is used\\.$#"
+ count: 2
+ path: src/controllers/ConstraintsController.php
+
-
- message: "#^Result of method PHPPgAdmin\\\\[a-zA-Z0-9_]+\\\\[a-zA-Z0-9_]+\\:\\:[a-zA-Z0-9_]+\\(\\) \\(void\\) is used\\.$#"
- path: src/*
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\ConstraintsController\\:\\:formAddForeignKey\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/ConstraintsController.php
- -
- message: "#^Call to static method br2ln\\(\\) on trait PHPPgAdmin\\Traits\\HelperTrait\\.#"
- path: src/*
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\DatabaseController\\:\\:currentLocks\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/DatabaseController.php
-
- message: "#^Constructor of class [a-zA-Z0-9_]+\\\\[a-zA-Z0-9_]+\\\\[a-zA-Z0-9_]+ has an unused parameter \\$[a-zA-Z0-9_]+\\.$#"
- path: src/*
- #- '#Property [^\s] has no typehint specified#'
- #- '#Call to an undefined method [a-zA-Z0-9\\_]+::expects\(\)#'
- #- '#Access to an undefined property PHPPgAdmin::\$[a-zA-Z0-9_]+#'
- #- '#Call to an undefined method PHPUnit_Framework_MockObject_MockObject::[a-zA-Z0-9_]+\(\)#'
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\DatabaseController\\:\\:currentProcesses\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/DatabaseController.php
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\DatabaseController\\:\\:doFind\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/DatabaseController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\DatabaseController\\:\\:doAdmin\\(\\) \\(void\\) is used\\.$#"
+ count: 2
+ path: src/controllers/DatabaseController.php
+
+ -
+ message: "#^PHPDoc tag @param references unknown parameter\\: \\$confirm$#"
+ count: 1
+ path: src/controllers/DatabaseController.php
+
+ -
+ message: "#^PHPDoc tag @param references unknown parameter\\: \\$msg$#"
+ count: 1
+ path: src/controllers/DatabaseController.php
+
+ -
+ message: "#^Cannot unset offset 'vars' on array\\('content' \\=\\> mixed, 'attr' \\=\\> array\\('href' \\=\\> array\\('url' \\=\\> mixed, 'urlvars' \\=\\> array\\('subject' \\=\\> mixed, 'action' \\=\\> 'confeditautovac', 'schema' \\=\\> mixed, 'table' \\=\\> mixed\\)\\)\\)\\)\\.$#"
+ count: 1
+ path: src/controllers/DatabaseController.php
+
+ -
+ message: "#^Cannot unset offset 'vars' on array\\('content' \\=\\> mixed, 'attr' \\=\\> array\\('href' \\=\\> array\\('url' \\=\\> mixed, 'urlvars' \\=\\> array\\('subject' \\=\\> mixed, 'action' \\=\\> 'confdelautovac', 'schema' \\=\\> mixed, 'table' \\=\\> mixed\\)\\)\\)\\)\\.$#"
+ count: 1
+ path: src/controllers/DatabaseController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\DataexportController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 2
+ path: src/controllers/DataexportController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\DisplayController\\:\\:doBrowseFK\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/DisplayController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\BaseController\\:\\:halt\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/DisplayController.php
+
+ -
+ message: "#^Variable \\$subject in isset\\(\\) always exists and is not nullable\\.$#"
+ count: 1
+ path: src/controllers/DisplayController.php
+
+ -
+ message: "#^Access to property \\$name on an unknown class the\\.$#"
+ count: 2
+ path: src/controllers/DisplayController.php
+
+ -
+ message: "#^Access to property \\$type on an unknown class the\\.$#"
+ count: 1
+ path: src/controllers/DisplayController.php
+
+ -
+ message: "#^Parameter \\#1 \\(void\\) of echo cannot be converted to string\\.$#"
+ count: 1
+ path: src/controllers/DisplayController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Database\\\\Postgres\\:\\:printField\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/DisplayController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\DisplayController\\:\\:formEditRow\\(\\) \\(void\\) is used\\.$#"
+ count: 2
+ path: src/controllers/DisplayController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\FulltextController\\:\\:doCreateConfig\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/FulltextController.php
+
+ -
+ message: "#^Variable \\$mapping might not be defined\\.$#"
+ count: 1
+ path: src/controllers/FulltextController.php
+
+ -
+ message: "#^Method PHPPgAdmin\\\\Controller\\\\FunctionsController\\:\\:showDefinition\\(\\) invoked with 0 parameters, 2 required\\.$#"
+ count: 1
+ path: src/controllers/FunctionsController.php
+
+ -
+ message: "#^Undefined variable\\: \\$f$#"
+ count: 1
+ path: src/controllers/FunctionsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\FunctionsController\\:\\:_printNavLinks\\(\\) \\(void\\) is used\\.$#"
+ count: 4
+ path: src/controllers/FunctionsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\FunctionsController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/FunctionsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\HistoryController\\:\\:doDownloadHistory\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/HistoryController.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Controller\\\\InfoController\\:\\:\\$shownull\\.$#"
+ count: 21
+ path: src/controllers/InfoController.php
+
+ -
+ message: "#^Comparison operation \"\\<\" between 0 and \\(array\\|float\\|int\\) results in an error\\.$#"
+ count: 5
+ path: src/controllers/InfoController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\MaterializedviewpropertiesController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 2
+ path: src/controllers/MaterializedviewpropertiesController.php
+
+ -
+ message: "#^Cannot call method alterMatView\\(\\) on PHPPgAdmin\\\\Database\\\\Postgres\\|void\\.$#"
+ count: 1
+ path: src/controllers/MaterializedviewpropertiesController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\MaterializedviewsController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 2
+ path: src/controllers/MaterializedviewsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\MaterializedviewsController\\:\\:doWizardCreate\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/MaterializedviewsController.php
+
+ -
+ message: "#^Parameter \\#1 \\(void\\) of echo cannot be converted to string\\.$#"
+ count: 1
+ path: src/controllers/MaterializedviewsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Database\\\\Postgres\\:\\:printField\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/MaterializedviewsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\BaseController\\:\\:halt\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/MaterializedviewsController.php
+
+ -
+ message: "#^PHPDoc tag @param references unknown parameter\\: \\$msg$#"
+ count: 1
+ path: src/controllers/SchemasController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\SchemasController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/SchemasController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\SequencesController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/SequencesController.php
+
+ -
+ message: "#^Access to property \\$name on an unknown class the\\.$#"
+ count: 1
+ path: src/controllers/SqlController.php
+
+ -
+ message: "#^Access to property \\$type on an unknown class the\\.$#"
+ count: 1
+ path: src/controllers/SqlController.php
+
+ -
+ message: "#^Parameter \\#2 \\(void\\) of echo cannot be converted to string\\.$#"
+ count: 1
+ path: src/controllers/TablesController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Database\\\\Postgres\\:\\:printField\\(\\) \\(void\\) is used\\.$#"
+ count: 3
+ path: src/controllers/TablesController.php
+
+ -
+ message: "#^Parameter \\#1 \\(void\\) of echo cannot be converted to string\\.$#"
+ count: 2
+ path: src/controllers/TablesController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\TablesController\\:\\:formInsertRow\\(\\) \\(void\\) is used\\.$#"
+ count: 3
+ path: src/controllers/TablesController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\TablesController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 2
+ path: src/controllers/TablesController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\TablesController\\:\\:doAdmin\\(\\) \\(void\\) is used\\.$#"
+ count: 2
+ path: src/controllers/TablesController.php
+
+ -
+ message: "#^PHPDoc tag @param references unknown parameter\\: \\$confirm$#"
+ count: 1
+ path: src/controllers/TablesController.php
+
+ -
+ message: "#^PHPDoc tag @param references unknown parameter\\: \\$msg$#"
+ count: 1
+ path: src/controllers/TablesController.php
+
+ -
+ message: "#^Cannot unset offset 'vars' on array\\('content' \\=\\> mixed, 'attr' \\=\\> array\\('href' \\=\\> array\\('url' \\=\\> mixed, 'urlvars' \\=\\> array\\('subject' \\=\\> mixed, 'action' \\=\\> 'confeditautovac', 'schema' \\=\\> mixed, 'table' \\=\\> mixed\\)\\)\\)\\)\\.$#"
+ count: 1
+ path: src/controllers/TablesController.php
+
+ -
+ message: "#^Cannot unset offset 'vars' on array\\('content' \\=\\> mixed, 'attr' \\=\\> array\\('href' \\=\\> array\\('url' \\=\\> mixed, 'urlvars' \\=\\> array\\('subject' \\=\\> mixed, 'action' \\=\\> 'confdelautovac', 'schema' \\=\\> mixed, 'table' \\=\\> mixed\\)\\)\\)\\)\\.$#"
+ count: 1
+ path: src/controllers/TablesController.php
+
+ -
+ message: "#^Variable \\$icon might not be defined\\.$#"
+ count: 1
+ path: src/controllers/TblpropertiesController.php
+
+ -
+ message: "#^Variable \\$type might not be defined\\.$#"
+ count: 1
+ path: src/controllers/TblpropertiesController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\ViewsController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 2
+ path: src/controllers/ViewsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\ViewsController\\:\\:doWizardCreate\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/ViewsController.php
+
+ -
+ message: "#^Parameter \\#1 \\(void\\) of echo cannot be converted to string\\.$#"
+ count: 1
+ path: src/controllers/ViewsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Database\\\\Postgres\\:\\:printField\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/ViewsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\BaseController\\:\\:halt\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/ViewsController.php
+
+ -
+ message: "#^Call to method recordCount\\(\\) on an unknown class RecordSet\\.$#"
+ count: 1
+ path: src/database/ADOdbBase.php
+
+ -
+ message: "#^Access to property \\$fields on an unknown class RecordSet\\.$#"
+ count: 1
+ path: src/database/ADOdbBase.php
+
+ -
+ message: "#^Access to an undefined property ADODB_postgres9\\:\\:\\$platform\\.$#"
+ count: 1
+ path: src/database/ADOdbBase.php
+
+ -
+ message: "#^Method PHPPgAdmin\\\\Database\\\\Postgres\\:\\:_alterTable\\(\\) invoked with 8 parameters, 6\\-7 required\\.$#"
+ count: 1
+ path: src/database/Postgres.php
+
+ -
+ message: "#^PHPDoc tag @param references unknown parameter\\: \\$owner$#"
+ count: 1
+ path: src/database/Postgres.php
+
+ -
+ message: "#^PHPDoc tag @param references unknown parameter\\: \\$fields$#"
+ count: 1
+ path: src/database/Postgres.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\ActionUrlDecorator\\:\\:\\$base\\.$#"
+ count: 2
+ path: src/decorators/ActionUrlDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\ActionUrlDecorator\\:\\:\\$queryVars\\.$#"
+ count: 1
+ path: src/decorators/ActionUrlDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\ArrayMergeDecorator\\:\\:\\$m\\.$#"
+ count: 2
+ path: src/decorators/ArrayMergeDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\BranchUrlDecorator\\:\\:\\$base\\.$#"
+ count: 2
+ path: src/decorators/BranchUrlDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\BranchUrlDecorator\\:\\:\\$queryVars\\.$#"
+ count: 1
+ path: src/decorators/BranchUrlDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\CallbackDecorator\\:\\:\\$fn\\.$#"
+ count: 2
+ path: src/decorators/CallbackDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\CallbackDecorator\\:\\:\\$p\\.$#"
+ count: 2
+ path: src/decorators/CallbackDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\ConcatDecorator\\:\\:\\$c\\.$#"
+ count: 2
+ path: src/decorators/ConcatDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\Decorator\\:\\:\\$val\\.$#"
+ count: 2
+ path: src/decorators/Decorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\FieldDecorator\\:\\:\\$f\\.$#"
+ count: 3
+ path: src/decorators/FieldDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\FieldDecorator\\:\\:\\$d\\.$#"
+ count: 2
+ path: src/decorators/FieldDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\IfEmptyDecorator\\:\\:\\$val\\.$#"
+ count: 2
+ path: src/decorators/IfEmptyDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\IfEmptyDecorator\\:\\:\\$empty\\.$#"
+ count: 2
+ path: src/decorators/IfEmptyDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\IfEmptyDecorator\\:\\:\\$full\\.$#"
+ count: 1
+ path: src/decorators/IfEmptyDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\RedirectUrlDecorator\\:\\:\\$base\\.$#"
+ count: 2
+ path: src/decorators/RedirectUrlDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\RedirectUrlDecorator\\:\\:\\$queryVars\\.$#"
+ count: 1
+ path: src/decorators/RedirectUrlDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\ReplaceDecorator\\:\\:\\$s\\.$#"
+ count: 2
+ path: src/decorators/ReplaceDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\ReplaceDecorator\\:\\:\\$p\\.$#"
+ count: 2
+ path: src/decorators/ReplaceDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\UrlDecorator\\:\\:\\$base\\.$#"
+ count: 2
+ path: src/decorators/UrlDecorator.php
+
+ -
+ message: "#^Access to an undefined property PHPPgAdmin\\\\Decorators\\\\UrlDecorator\\:\\:\\$queryVars\\.$#"
+ count: 1
+ path: src/decorators/UrlDecorator.php
+
+ -
+ message: "#^Constructor of class PHPPgAdmin\\\\XHtml\\\\XHtmlOption has an unused parameter \\$value\\.$#"
+ count: 1
+ path: src/xhtml/XHtmlOption.php
+
+ -
+ message: "#^Constructor of class PHPPgAdmin\\\\XHtml\\\\XHtmlSimpleElement has an unused parameter \\$element\\.$#"
+ count: 1
+ path: src/xhtml/XHtmlSimpleElement.php
diff --git a/phpstan.neon b/phpstan.neon
index ca5b831a..661486af 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -9,9 +9,9 @@ parameters:
tmpDir: ./.build/phpstan
# The level 8 is the highest level
- level: 3
-
- autoload_files:
+ level: 2
+
+ scanFiles:
- vendor/adodb/adodb-php/adodb.inc.php
- .configs/debug.kint.php
- src/lib.inc.php
@@ -28,7 +28,3 @@ parameters:
- src/router.php
treatPhpDocTypesAsCertain: false
-
-
-
-
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index 189d773b..030d4cf4 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -1,36 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
-<files psalm-version="3.9.3@2e4154d76e24d1b4e59e6cc2bebef7790cb9e550">
- <file src="src/classes/ADONewConnection.php">
- <UndefinedClass occurrences="1">
- <code>\ADONewConnection</code>
+<files psalm-version="3.9.5@0cfe565d0afbcd31eadcc281b9017b5692911661">
+ <file src=".configs/debug.var_dumper.php">
+ <UndefinedClass occurrences="4">
+ <code>VarCloner</code>
+ <code>CliDumper</code>
+ <code>HtmlDumper</code>
+ <code>ServerDumper</code>
</UndefinedClass>
</file>
- <file src="src/classes/ADOdbException.php">
+ <file src="src/classes/ADORecordSet.php">
+ <InvalidReturnStatement occurrences="1">
+ <code>parent::fetchField()</code>
+ </InvalidReturnStatement>
+ <InvalidReturnType occurrences="1">
+ <code>\ADOFieldObject</code>
+ </InvalidReturnType>
+ <UndefinedDocblockClass occurrences="1">
+ <code>parent::fetchField()</code>
+ </UndefinedDocblockClass>
+ </file>
+ <file src="src/classes/Connection.php">
+ <NullableReturnStatement occurrences="2">
+ <code>null</code>
+ <code>null</code>
+ </NullableReturnStatement>
<UndefinedDocblockClass occurrences="2">
- <code>number</code>
- <code>number</code>
+ <code>$this-&gt;conn</code>
+ <code>$this-&gt;conn</code>
</UndefinedDocblockClass>
</file>
<file src="src/classes/ContainerUtils.php">
- <UndefinedInterfaceMethod occurrences="8">
- <code>$container</code>
- <code>$container</code>
- <code>$container</code>
- <code>$container</code>
- <code>$container</code>
- <code>$container</code>
- <code>$container</code>
- <code>offsetSet</code>
- </UndefinedInterfaceMethod>
+ <UndefinedPropertyAssignment occurrences="6">
+ <code>$container-&gt;BASE_PATH</code>
+ <code>$container-&gt;subFolder</code>
+ <code>$container-&gt;debug</code>
+ <code>$container-&gt;THEME_PATH</code>
+ <code>$container-&gt;IN_TEST</code>
+ <code>$container-&gt;subFolder</code>
+ </UndefinedPropertyAssignment>
</file>
<file src="src/classes/Misc.php">
- <NullableReturnStatement occurrences="2">
- <code>$this-&gt;_server_info</code>
- <code>$this-&gt;halt($this-&gt;lang['strinvalidserverparam'])</code>
+ <InvalidNullableReturnType occurrences="1">
+ <code>string</code>
+ </InvalidNullableReturnType>
+ <NullableReturnStatement occurrences="1">
+ <code>$this-&gt;_server_id</code>
</NullableReturnStatement>
- <UndefinedMethod occurrences="1">
- <code>setSchema</code>
- </UndefinedMethod>
</file>
<file src="src/controllers/AggregatesController.php">
<NullReference occurrences="1">
@@ -49,6 +64,11 @@
<code>$this-&gt;postgresqlMinVer</code>
</UndefinedThisPropertyAssignment>
</file>
+ <file src="src/controllers/CastsController.php">
+ <InvalidArgument occurrences="1">
+ <code>$casts</code>
+ </InvalidArgument>
+ </file>
<file src="src/controllers/ColpropertiesController.php">
<NullArgument occurrences="1">
<code>null</code>
@@ -86,15 +106,8 @@
<InvalidArgument occurrences="1">
<code>$resultset-&gt;recordCount()</code>
</InvalidArgument>
- <InvalidArrayOffset occurrences="9">
- <code>$_gets['schema']</code>
+ <InvalidArrayOffset occurrences="2">
<code>$_gets['subject']</code>
- <code>$_gets['query']</code>
- <code>$_gets['count']</code>
- <code>$_gets['return']</code>
- <code>$_gets['search_path']</code>
- <code>$_gets['table']</code>
- <code>$_gets['nohistory']</code>
<code>$fields['schema']</code>
</InvalidArrayOffset>
<NullReference occurrences="5">
@@ -104,12 +117,6 @@
<code>$_REQUEST</code>
<code>$_POST</code>
</NullReference>
- <ReservedWord occurrences="1">
- <code>object</code>
- </ReservedWord>
- <UndefinedClass occurrences="1">
- <code>$resultset-&gt;fields</code>
- </UndefinedClass>
<UndefinedDocblockClass occurrences="7">
<code>$resultset-&gt;recordCount()</code>
<code>$resultset-&gt;recordCount()</code>
@@ -128,6 +135,9 @@
</NullReference>
</file>
<file src="src/controllers/FulltextController.php">
+ <InvalidArgument occurrences="1">
+ <code>$items</code>
+ </InvalidArgument>
<NullReference occurrences="6">
<code>$_POST</code>
<code>$_POST</code>
@@ -136,8 +146,29 @@
<code>$_POST</code>
<code>$_POST</code>
</NullReference>
+ <UndefinedDocblockClass occurrences="4">
+ <code>$ftscfg-&gt;recordCount()</code>
+ <code>$ftsdict-&gt;recordCount()</code>
+ <code>$ftsdicts-&gt;recordCount()</code>
+ <code>$ftsdicts-&gt;recordCount()</code>
+ </UndefinedDocblockClass>
</file>
<file src="src/controllers/FunctionsController.php">
+ <InvalidArgument occurrences="13">
+ <code>$_POST['formFunction']</code>
+ <code>$_POST['formObjectFile']</code>
+ <code>$_POST['formLinkSymbol']</code>
+ <code>$_POST['formLinkSymbol']</code>
+ <code>$_POST['formDefinition']</code>
+ <code>$_POST['formComment']</code>
+ <code>$_POST['formObjectFile']</code>
+ <code>$_POST['formLinkSymbol']</code>
+ <code>$_POST['formLinkSymbol']</code>
+ <code>$_POST['formDefinition']</code>
+ <code>$_POST['formComment']</code>
+ <code>$_POST['formCost']</code>
+ <code>$_POST['formRows']</code>
+ </InvalidArgument>
<InvalidNullableReturnType occurrences="1">
<code>string</code>
</InvalidNullableReturnType>
@@ -160,6 +191,18 @@
</NullReference>
</file>
<file src="src/controllers/IndexesController.php">
+ <InvalidArgument occurrences="10">
+ <code>$formIndexName</code>
+ <code>$formWhere</code>
+ <code>$this-&gt;getPostParam('formIndexName', '')</code>
+ <code>$this-&gt;getPostParam('formIndexType')</code>
+ <code>$this-&gt;getPostParam('formUnique')</code>
+ <code>$formWhere</code>
+ <code>$formSpc</code>
+ <code>$this-&gt;getPostParam('formConcur')</code>
+ <code>$this-&gt;getPostParam('index')</code>
+ <code>$this-&gt;getPostParam('cascade')</code>
+ </InvalidArgument>
<NullReference occurrences="4">
<code>$_REQUEST</code>
<code>$_REQUEST</code>
@@ -216,11 +259,33 @@
</NullReference>
</file>
<file src="src/controllers/SequencesController.php">
+ <InvalidArgument occurrences="1">
+ <code>$sequences</code>
+ </InvalidArgument>
<NullReference occurrences="3">
<code>$_POST</code>
<code>$_POST</code>
<code>$_POST</code>
</NullReference>
+ <UndefinedDocblockClass occurrences="3">
+ <code>$sequence-&gt;recordCount()</code>
+ <code>$sequence-&gt;recordCount()</code>
+ <code>$sequence-&gt;recordCount()</code>
+ </UndefinedDocblockClass>
+ </file>
+ <file src="src/controllers/SqlController.php">
+ <InvalidArgument occurrences="1">
+ <code>$rs-&gt;recordCount()</code>
+ </InvalidArgument>
+ <UndefinedDocblockClass occurrences="7">
+ <code>$data-&gt;conn-&gt;Execute($this-&gt;query)</code>
+ <code>$rs-&gt;recordCount()</code>
+ <code>$rs-&gt;fetchField($k)</code>
+ <code>$finfo-&gt;name</code>
+ <code>$rs-&gt;fetchField($k)</code>
+ <code>$finfo-&gt;type</code>
+ <code>$rs-&gt;recordCount()</code>
+ </UndefinedDocblockClass>
</file>
<file src="src/controllers/SqleditController.php">
<NullReference occurrences="2">
@@ -254,8 +319,14 @@
</file>
<file src="src/controllers/TreeController.php">
<InvalidReturnStatement occurrences="1">
- <code>$parent</code>
+ <code>$this-&gt;printTreeJSON($treedata, $attrs, $print)</code>
</InvalidReturnStatement>
+ <InvalidReturnType occurrences="1">
+ <code>\Slim\Http\Response|string</code>
+ </InvalidReturnType>
+ <MoreSpecificImplementedParamType occurrences="1">
+ <code>$_treedata</code>
+ </MoreSpecificImplementedParamType>
</file>
<file src="src/controllers/TriggersController.php">
<NullReference occurrences="1">
@@ -263,14 +334,21 @@
</NullReference>
</file>
<file src="src/controllers/TypesController.php">
- <InvalidArrayOffset occurrences="1">
- <code>$navlinks['enum']</code>
- </InvalidArrayOffset>
+ <InvalidArgument occurrences="2">
+ <code>$types</code>
+ <code>$vals</code>
+ </InvalidArgument>
<NullReference occurrences="3">
<code>$_REQUEST</code>
<code>$_REQUEST</code>
<code>$_POST</code>
</NullReference>
+ <UndefinedDocblockClass occurrences="4">
+ <code>$typedata-&gt;recordCount()</code>
+ <code>$vals-&gt;getArray()</code>
+ <code>$vals</code>
+ <code>$vals</code>
+ </UndefinedDocblockClass>
</file>
<file src="src/controllers/UsersController.php">
<NullReference occurrences="2">
@@ -291,99 +369,38 @@
</NullReference>
</file>
<file src="src/database/ADOdbBase.php">
- <InvalidReturnStatement occurrences="2">
+ <InvalidReturnStatement occurrences="5">
<code>$e-&gt;getCode()</code>
+ <code>$this-&gt;conn-&gt;Execute($sql)</code>
<code>$e-&gt;getCode()</code>
+ <code>$this-&gt;conn-&gt;ErrorNo()</code>
+ <code>$this-&gt;conn-&gt;ErrorMsg()</code>
</InvalidReturnStatement>
- <MissingDependency occurrences="1">
- <code>\PHPPgAdmin\ADONewConnection</code>
- </MissingDependency>
- </file>
- <file src="src/database/Connection.php">
- <InvalidReturnStatement occurrences="1">
- <code>-3</code>
- </InvalidReturnStatement>
- <NullableReturnStatement occurrences="1">
- <code>null</code>
- </NullableReturnStatement>
- <UndefinedDocblockClass occurrences="1">
- <code>$this-&gt;conn</code>
+ <InvalidReturnType occurrences="4">
+ <code>int|\PHPPgAdmin\ADORecordSet</code>
+ <code>int|\PHPPgAdmin\ADORecordSet</code>
+ <code>int</code>
+ <code>string</code>
+ </InvalidReturnType>
+ <UndefinedDocblockClass occurrences="9">
+ <code>$this-&gt;conn-&gt;Execute($sql)</code>
+ <code>$this-&gt;conn-&gt;Execute($sql)</code>
+ <code>$this-&gt;conn-&gt;ErrorNo()</code>
+ <code>$this-&gt;conn-&gt;ErrorMsg()</code>
+ <code>$this-&gt;conn-&gt;Execute($sql)</code>
+ <code>$rs</code>
+ <code>$this-&gt;conn-&gt;Execute($sql)</code>
+ <code>$this-&gt;conn-&gt;Execute($sql)</code>
+ <code>$this-&gt;conn-&gt;Execute($setClause . $whereClause)</code>
</UndefinedDocblockClass>
</file>
<file src="src/database/Postgres.php">
<LoopInvalidation occurrences="1">
<code>$i</code>
</LoopInvalidation>
- <UndefinedDocblockClass occurrences="1">
- <code>$rs-&gt;recordCount()</code>
- </UndefinedDocblockClass>
- </file>
- <file src="src/database/Postgres74.php">
- <MoreSpecificImplementedParamType occurrences="1">
- <code>$default</code>
- </MoreSpecificImplementedParamType>
- </file>
- <file src="src/database/Postgres80.php">
- <MoreSpecificImplementedParamType occurrences="1">
- <code>$cycledvalue</code>
- </MoreSpecificImplementedParamType>
- <NullArgument occurrences="1">
- <code>null</code>
- </NullArgument>
- </file>
- <file src="src/database/Postgres81.php">
- <InvalidArgument occurrences="1">
- <code>$toid</code>
- </InvalidArgument>
- <InvalidCast occurrences="2">
- <code>$toid</code>
- <code>$toid</code>
- </InvalidCast>
- <UndefinedDocblockClass occurrences="2">
- <code>$rs-&gt;fields('oid')</code>
- <code>$rs-&gt;recordCount()</code>
- </UndefinedDocblockClass>
- </file>
- <file src="src/database/Postgres82.php">
- <ConflictingReferenceConstraint occurrences="1">
- <code>else {</code>
- </ConflictingReferenceConstraint>
- <LessSpecificImplementedReturnType occurrences="1">
- <code>array</code>
- </LessSpecificImplementedReturnType>
- <MoreSpecificImplementedParamType occurrences="1">
- <code>$operator_oid</code>
- </MoreSpecificImplementedParamType>
- <NullArgument occurrences="1">
- <code>null</code>
- </NullArgument>
- </file>
- <file src="src/database/Postgres83.php">
- <InvalidArgument occurrences="1">
- <code>$toid</code>
- </InvalidArgument>
- <InvalidCast occurrences="2">
- <code>$toid</code>
- <code>$toid</code>
- </InvalidCast>
- <MoreSpecificImplementedParamType occurrences="1">
- <code>$cycledvalue</code>
- </MoreSpecificImplementedParamType>
- <UndefinedDocblockClass occurrences="2">
- <code>$rs-&gt;fields('oid')</code>
- <code>$rs-&gt;recordCount()</code>
- </UndefinedDocblockClass>
</file>
<file src="src/database/databasetraits/FtsTrait.php">
- <InvalidArrayOffset occurrences="12">
- <code>$parser['schema']</code>
- <code>$parser['parser']</code>
- <code>$parser['schema']</code>
- <code>$parser['parser']</code>
- <code>$template['schema']</code>
- <code>$template['name']</code>
- <code>$template['schema']</code>
- <code>$template['name']</code>
+ <InvalidArrayOffset occurrences="4">
<code>$template['schema']</code>
<code>$template['name']</code>
<code>$template['schema']</code>
@@ -394,77 +411,37 @@
<ConflictingReferenceConstraint occurrences="1">
<code>else {</code>
</ConflictingReferenceConstraint>
+ <InvalidReturnType occurrences="1">
+ <code>\PHPPgAdmin\ADORecordSet</code>
+ </InvalidReturnType>
<NullArgument occurrences="1">
<code>null</code>
</NullArgument>
</file>
- <file src="src/database/databasetraits/IndexTrait.php">
- <UndefinedDocblockClass occurrences="1">
- <code>$v-&gt;recordCount()</code>
- </UndefinedDocblockClass>
- </file>
- <file src="src/database/databasetraits/RoleTrait.php">
- <UndefinedDocblockClass occurrences="3">
- <code>number</code>
- <code>number</code>
- <code>number</code>
- </UndefinedDocblockClass>
- </file>
- <file src="src/database/databasetraits/RowTrait.php">
- <UndefinedDocblockClass occurrences="1">
- <code>$rs-&gt;recordCount()</code>
- </UndefinedDocblockClass>
+ <file src="src/database/databasetraits/SchemaTrait.php">
+ <InvalidReturnType occurrences="1">
+ <code>int</code>
+ </InvalidReturnType>
</file>
<file src="src/database/databasetraits/SequenceTrait.php">
- <InvalidArgument occurrences="6">
- <code>$increment</code>
- <code>$minvalue</code>
- <code>$maxvalue</code>
- <code>$restartvalue</code>
- <code>$cachevalue</code>
- <code>$startvalue</code>
- </InvalidArgument>
- <UndefinedDocblockClass occurrences="18">
- <code>number</code>
+ <UndefinedDocblockClass occurrences="2">
<code>$seq-&gt;recordCount()</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
- <code>number</code>
+ <code>$data-&gt;recordCount()</code>
</UndefinedDocblockClass>
</file>
<file src="src/database/databasetraits/TableTrait.php">
- <InvalidArgument occurrences="2">
- <code>$privs</code>
+ <InvalidArgument occurrences="1">
<code>$privs</code>
</InvalidArgument>
- <UndefinedDocblockClass occurrences="8">
- <code>$t-&gt;recordCount()</code>
- <code>$atts-&gt;recordCount()</code>
- <code>$cons-&gt;recordCount()</code>
- <code>$rs-&gt;recordCount()</code>
- <code>$indexes-&gt;recordCount()</code>
- <code>$triggers-&gt;recordCount()</code>
- <code>$rules-&gt;recordCount()</code>
- <code>$data-&gt;recordCount()</code>
- </UndefinedDocblockClass>
+ <InvalidReturnType occurrences="2">
+ <code>\PHPPgAdmin\ADORecordSet</code>
+ <code>bool</code>
+ </InvalidReturnType>
</file>
- <file src="src/database/databasetraits/ViewTrait.php">
- <UndefinedDocblockClass occurrences="1">
- <code>$data-&gt;recordCount()</code>
- </UndefinedDocblockClass>
+ <file src="src/database/databasetraits/TriggerTrait.php">
+ <InvalidReturnType occurrences="1">
+ <code>int</code>
+ </InvalidReturnType>
</file>
<file src="src/decorators/ActionUrlDecorator.php">
<UndefinedThisPropertyAssignment occurrences="4">
@@ -578,26 +555,9 @@
<code>$this-&gt;base</code>
</UndefinedThisPropertyFetch>
</file>
- <file src="src/lib.inc.php">
- <EmptyArrayAccess occurrences="2">
- <code>$conf['debugmode']</code>
- <code>$conf['register_debuggers']</code>
- </EmptyArrayAccess>
- </file>
- <file src="src/middleware/PopulateRequestResponse.php">
- <UndefinedConstant occurrences="2">
- <code>SUBFOLDER</code>
- <code>SUBFOLDER</code>
- </UndefinedConstant>
- <UndefinedInterfaceMethod occurrences="4">
- <code>getParam</code>
- <code>getParam</code>
- <code>getParam</code>
- <code>getParams</code>
- </UndefinedInterfaceMethod>
- </file>
<file src="src/router.php">
- <InvalidScope occurrences="6">
+ <InvalidScope occurrences="7">
+ <code>$this</code>
<code>$this</code>
<code>$this</code>
<code>$this</code>
@@ -622,25 +582,10 @@
<UndefinedDocblockClass occurrences="1">
<code>$set-&gt;recordCount()</code>
</UndefinedDocblockClass>
- <UndefinedThisPropertyFetch occurrences="2">
- <code>$this-&gt;container</code>
- <code>$this-&gt;container</code>
- </UndefinedThisPropertyFetch>
- </file>
- <file src="src/traits/InsertEditRowTrait.php">
- <UndefinedConstant occurrences="2">
- <code>SUBFOLDER</code>
- <code>SUBFOLDER</code>
- </UndefinedConstant>
- </file>
- <file src="src/traits/MiscTrait.php">
- <UndefinedMethod occurrences="1">
- <code>isSuperUser</code>
- </UndefinedMethod>
</file>
<file src="src/traits/ViewsMatviewsTrait.php">
<EmptyArrayAccess occurrences="1">
- <code>$formLink[$i]</code>
+ <code>$formLink[$i]['operator']</code>
</EmptyArrayAccess>
<NullReference occurrences="1">
<code>$_POST</code>
@@ -651,17 +596,4 @@
<code>else {</code>
</ConflictingReferenceConstraint>
</file>
- <file src="src/xhtml/HTMLNavbarController.php">
- <InvalidArgument occurrences="1">
- <code>$alltabs</code>
- </InvalidArgument>
- <InvalidReturnType occurrences="1">
- <code>? string</code>
- </InvalidReturnType>
- </file>
- <file src="src/xhtml/HTMLTableController.php">
- <UndefinedConstant occurrences="1">
- <code>SUBFOLDER</code>
- </UndefinedConstant>
- </file>
</files>
diff --git a/psalm.xml b/psalm.xml
index 2ed15e95..d3db633d 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -2,12 +2,17 @@
<psalm totallyTyped="false" errorLevel="3" resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoloader="src/lib.inc.php"
xmlns="https://getpsalm.org/schema/config" cacheDirectory=".build/psalm" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" errorBaseline="psalm-baseline.xml">
+<psalm
+ totallyTyped="false"
+ errorLevel="3"
+ resolveFromConfigFile="true"
+ autoloader="src/lib.inc.php"
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
<directory name="temp" />
- <directory name="tests" />
+ <directory name="src/translations" />
<directory name=".build" />
</ignoreFiles>
</projectFiles>
diff --git a/rector.php b/rector.php
new file mode 100644
index 00000000..b8f25bcb
--- /dev/null
+++ b/rector.php
@@ -0,0 +1,48 @@
+<?php
+
+declare(strict_types=1);
+
+use Rector\Core\Configuration\Option;
+use Rector\Php70\Rector\StaticCall\StaticCallOnNonStaticToInstanceCallRector;
+use Rector\Set\ValueObject\SetList;
+use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
+
+return static function (ContainerConfigurator $containerConfigurator): void {
+ $parameters = $containerConfigurator->parameters();
+
+ $parameters->set(Option::AUTO_IMPORT_NAMES, true);
+
+ $parameters->set(Option::SETS, [
+ SetList::ACTION_INJECTION_TO_CONSTRUCTOR_INJECTION,
+ SetList::ARRAY_STR_FUNCTIONS_TO_STATIC_CALL,
+ SetList::CODE_QUALITY,
+ SetList::PHP_53,
+ SetList::PHP_54,
+ SetList::PHP_56,
+ SetList::PHP_70,
+ SetList::PHP_71,
+ SetList::PHP_72,
+ SetList::PHPSTAN,
+ SetList::PHPUNIT_CODE_QUALITY,
+ SetList::SOLID,
+ ]);
+ $parameters->set(Option::SKIP, [
+ Rector\SOLID\Rector\Property\AddFalseDefaultToBoolPropertyRector::class => [
+ // single file
+ __DIR__ . '/src/classes/Connection.php',
+ // or directory
+ __DIR__ . '/src/database/databasetraits/HasTrait.php'
+
+ ]
+ ]);
+ $parameters->set(Option::PHP_VERSION_FEATURES, '7.2');
+ $parameters->set(Option::ENABLE_CACHE, true);
+ $parameters->set(Option::CACHE_DIR, __DIR__ . '/.build/rector');
+ $parameters->set(Option::PATHS, [
+ __DIR__ . '/src',
+ //__DIR__ . '/tests'
+ ]);
+ $parameters->set(Option::EXCLUDE_RECTORS, [
+ StaticCallOnNonStaticToInstanceCallRector::class,
+ ]);
+}; \ No newline at end of file
diff --git a/src/classes/ADONewConnection.php b/src/classes/ADONewConnection.php
index 8f998c3b..5ee2b239 100644
--- a/src/classes/ADONewConnection.php
+++ b/src/classes/ADONewConnection.php
@@ -7,11 +7,6 @@
namespace PHPPgAdmin;
/**
- * @file
- * Extends \ADODB_postgres9 to let correct inference on PHPDoc params
- */
-
-/**
* Extends \ADODB_postgres9 to let correct inference on PHPDoc params.
*/
class ADONewConnection extends \ADODB_postgres9
diff --git a/src/classes/ADORecordSet.php b/src/classes/ADORecordSet.php
index 74c3f989..2d0e9ec0 100644
--- a/src/classes/ADORecordSet.php
+++ b/src/classes/ADORecordSet.php
@@ -7,11 +7,6 @@
namespace PHPPgAdmin;
/**
- * @file
- * Extends ADORecordSet to let correct inference on PHPDoc params
- */
-
-/**
* Extends ADORecordSet to let correct inference on PHPDoc params.
*/
class ADORecordSet extends \ADORecordSet implements \Countable
diff --git a/src/classes/ADOdbException.php b/src/classes/ADOdbException.php
index dde45a8b..8211297c 100644
--- a/src/classes/ADOdbException.php
+++ b/src/classes/ADOdbException.php
@@ -31,20 +31,42 @@ class ADOdbException extends \Exception
public $fn;
+ /**
+ * Undocumented variable.
+ *
+ * @var string
+ */
public $sql = '';
+ /**
+ * Undocumented variable.
+ *
+ * @var string
+ */
public $params = '';
+ /**
+ * Undocumented variable.
+ *
+ * @var string
+ */
public $host = '';
public $database = '';
/**
+ * Undocumented variable.
+ *
+ * @var string
+ */
+ public $msg = '';
+
+ /**
* Default Error Handler. This will be called with the following params.
*
* @param string $dbms the RDBMS you are connecting to
* @param string $fn the name of the calling function (in uppercase)
- * @param int $errno the native error number from the database
+ * @param int $errno the native error number from the database
* @param string $errmsg the native error msg from the database
* @param string $p1 $fn specific parameter - see below
* @param string $p2 parameter 2
@@ -95,7 +117,7 @@ class ADOdbException extends \Exception
*
* @param string $dbms the RDBMS you are connecting to
* @param string $fn the name of the calling function (in uppercase)
- * @param int $errno the native error number from the database
+ * @param int $errno the native error number from the database
* @param string $errmsg the native error msg from the database
* @param string $p1 $fn specific parameter - see below
* @param string $p2 parameter 2
@@ -121,49 +143,18 @@ class ADOdbException extends \Exception
'spacer' => ' ',
'line' => $backtrace[0]['line'],
];
-
- $errmsg = \htmlentities(\PHPPgAdmin\Traits\HelperTrait::br2ln($errmsg), \ENT_NOQUOTES);
- $p1 = \htmlentities(\PHPPgAdmin\Traits\HelperTrait::br2ln($p1), \ENT_NOQUOTES);
- $p2 = \htmlentities(\PHPPgAdmin\Traits\HelperTrait::br2ln($p2), \ENT_NOQUOTES);
-
- switch ($fn) {
- case 'EXECUTE':
- $sql = \str_replace(
- [
- 'SELECT',
- 'WHERE',
- 'GROUP BY',
- 'FROM',
- 'HAVING',
- 'LIMIT',
- ],
- ["\nSELECT", "\nWHERE", "\nGROUP BY", "\nFROM", "\nHAVING", "\nLIMIT"],
- $p1
- );
-
- $inputparams = $p2;
-
- $error_msg = '<p><b>strsqlerror</b><br />' . \nl2br($errmsg) . '</p> <p><b>SQL:</b><br />' . \nl2br($sql) . '</p> ';
-
- echo '<table class="error" cellpadding="5"><tr><td>' . \nl2br($error_msg) . '</td></tr></table><br />' . "\n";
-
- break;
- case 'PCONNECT':
- case 'CONNECT':
- // do nothing;
- break;
-
- default:
- $s = "{$dbms} error: [{$errno}: {$errmsg}] in {$fn}({$p1}, {$p2})\n";
- echo "<table class=\"error\" cellpadding=\"5\"><tr><td>{$s}</td></tr></table><br />\n";
-
- break;
- }
+ $errmsg = \htmlentities(\PHPPgAdmin\ContainerUtils::br2ln($errmsg), \ENT_NOQUOTES);
+ $p1 = \htmlentities(\PHPPgAdmin\ContainerUtils::br2ln($p1), \ENT_NOQUOTES);
+ $p2 = \htmlentities(\PHPPgAdmin\ContainerUtils::br2ln($p2), \ENT_NOQUOTES);
$tag = \implode('', $btarray0);
//\PC::debug(['errno' => $errno, 'fn' => $fn, 'errmsg' => $errmsg], $tag);
- throw new self($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection);
+ $adoException = new self($dbms, $fn, $errno, $errmsg, $p1, $p2, $thisConnection);
+ echo "<table class=\"error\" cellpadding=\"5\"><tr><td>{$adoException->msg}</td></tr></table><br />\n";
+
+ // adodb_backtrace($adoException->getTrace());
+ throw $adoException;
}
}
diff --git a/src/classes/Connection.php b/src/classes/Connection.php
index d0eec0bf..81809416 100644
--- a/src/classes/Connection.php
+++ b/src/classes/Connection.php
@@ -49,19 +49,23 @@ class Connection
*/
private $pgVersion;
+ /**
+ * @var string
+ */
+ private $_captured_error;
+
private $adodb_driver = 'postgres9';
- // or pdo
// The backend platform. Set to UNKNOWN by default.
private $_connection_result;
/**
* Creates a new connection. Will actually make a database connection.
*
- * @param array $server_info
- * @param string $database database name
- * @param \Slim\Container $container
- * @param int $fetchMode Defaults to associative. Override for different behaviour
+ * @param array $server_info
+ * @param string $database database name
+ * @param \PHPPgAdmin\ContainerUtils $container
+ * @param int $fetchMode Defaults to associative. Override for different behaviour
*/
public function __construct($server_info, $database, $container, $fetchMode = ADODB_FETCH_ASSOC)
{
@@ -75,37 +79,14 @@ class Connection
$this->container = $container;
- // ADODB_Postgres9 Approach
- //$driver='postgres9';
- $this->conn = \ADONewConnection($this->adodb_driver);
- $this->conn->setFetchMode($fetchMode);
-
- // PDO Approach
-
- /*try {
- $this->_connection_result = $this->conn->connect($pghost, $user, $password, $database);
- $this->prtrace(['_connection_result' => $this->_connection_result, 'conn' => $this->conn]);
- } catch (\PHPPgAdmin\ADOdbException $e) {
- $this->prtrace(['message' => $e->getMessage(), 'trace' => $e->getTraceAsString()]);
- */
- try {
- $this->_connection_result = 'pdo' === $this->adodb_driver ?
+ $this->conn = 'pdo' === $this->adodb_driver ?
$this->getPDOConnection($host, $port, $sslmode, $database, $user, $password, $fetchMode) :
$this->getPG9Connection($host, $port, $sslmode, $database, $user, $password, $fetchMode);
- //$this->prtrace($this->conn);
- } catch (\Exception $e) {
- //dump($dsnString, $this->adodb_driver);
- $this->prtrace($e->getMessage(), \array_slice($e->getTrace(), 0, 10));
- }
- }
-
- public function getConnectionResult()
- {
- return $this->_connection_result;
+ //$this->prtrace($this->conn);
}
- public function getVersion()
+ public function getVersion(): string
{
return $this->pgVersion;
}
@@ -124,6 +105,7 @@ class Connection
return null;
}
$serverInfo = $this->conn->ServerInfo();
+ $this->dump($serverInfo);
$this->pgVersion = $serverInfo['version'];
$description = "PostgreSQL {$this->pgVersion}";
@@ -191,8 +173,10 @@ class Connection
} elseif ('legacy' === $sslmode) {
$pghost .= ' requiressl=1';
}
+ \ob_start();
+ $this->_connection_result = $this->conn->connect($pghost, $user, $password, $database);
- $this->conn->connect($pghost, $user, $password, $database);
+ $this->_captured_error = \ob_get_clean();
return $this->conn;
}
@@ -212,5 +196,12 @@ class Connection
$this->conn->connect($dsnString, $user, $password);
return $this->conn;
+ ): \ADODB_pdo {
+ $this->conn = ADONewConnection('pdo');
+ $this->conn->setFetchMode($fetchMode);
+ $dsnString = \sprintf('pgsql:host=%s;port=%d;dbname=%s;sslmode=%s;application_name=PHPPgAdmin6', $host, $port, $database, $sslmode);
+ $this->conn->connect($dsnString, $user, $password);
+
+ return $this->conn;
}
}
diff --git a/src/classes/ContainerHandlers.php b/src/classes/ContainerHandlers.php
new file mode 100644
index 00000000..fc5e716c
--- /dev/null
+++ b/src/classes/ContainerHandlers.php
@@ -0,0 +1,146 @@
+<?php
+
+/**
+ * PHPPgAdmin 6.0.0
+ */
+
+namespace PHPPgAdmin;
+
+/**
+ * Auxiliary class to handle injection of dependencies to avoid
+ * declaring them in the container class.
+ */
+class ContainerHandlers
+{
+ /**
+ * @var \PHPPgAdmin\ContainerUtils
+ * */
+ private $container;
+
+ /**
+ * @param \PHPPgAdmin\ContainerUtils $container
+ */
+ public function __construct(\PHPPgAdmin\ContainerUtils $container)
+ {
+ $this->container = $container;
+ }
+
+ public function storeMainRequestParams(): self
+ {
+ $this->container['action'] = $_REQUEST['action'] ?? '';
+ // This should be deprecated once we're sure no php scripts are required directly
+ $this->container->offsetSet('server', $_REQUEST['server'] ?? null);
+ $this->container->offsetSet('database', $_REQUEST['database'] ?? null);
+ $this->container->offsetSet('schema', $_REQUEST['schema'] ?? null);
+
+ return $this;
+ }
+
+ /**
+ * Sets the views.
+ *
+ * @return self ( description_of_the_return_value )
+ */
+ public function setViews(): self
+ {
+ $container = $this->container;
+
+ /**
+ * @return \PHPPgAdmin\ViewManager
+ */
+ $container['view'] = static function (\PHPPgAdmin\ContainerUtils $c): \PHPPgAdmin\ViewManager {
+ $misc = $c->misc;
+ $view = new ViewManager(BASE_PATH . '/assets/templates', [
+ 'cache' => BASE_PATH . '/temp/twigcache',
+ 'auto_reload' => $c->get('settings')['debug'],
+ 'debug' => $c->get('settings')['debug'],
+ ], $c);
+
+ $misc->setView($view);
+
+ return $view;
+ };
+
+ return $this;
+ }
+
+ /**
+ * Sets the instance of Misc class.
+ *
+ * @return self ( description_of_the_return_value )
+ */
+ public function setMisc(): self
+ {
+ $container = $this->container;
+ /**
+ * @return \PHPPgAdmin\Misc
+ */
+ $container['misc'] = static function (\PHPPgAdmin\ContainerUtils $c): \PHPPgAdmin\Misc {
+ $misc = new \PHPPgAdmin\Misc($c);
+
+ $conf = $c->get('conf');
+
+ // 4. Check for theme by server/db/user
+ $_server_info = $misc->getServerInfo();
+
+ /* starting with PostgreSQL 9.0, we can set the application name */
+ if (isset($_server_info['pgVersion']) && 9 <= $_server_info['pgVersion']) {
+ \putenv('PGAPPNAME=' . $c->get('settings')['appName'] . '_' . $c->get('settings')['appVersion']);
+ }
+
+ return $misc;
+ };
+
+ return $this;
+ }
+
+ public function setExtra(): self
+ {
+ $container = $this->container;
+ $container['flash'] = static function (): \Slim\Flash\Messages {
+ return new \Slim\Flash\Messages();
+ };
+
+ $container['lang'] = static function (\PHPPgAdmin\ContainerUtils $c): array {
+ $translations = new \PHPPgAdmin\Translations($c);
+
+ return $translations->lang;
+ };
+
+ return $this;
+ }
+
+ public function setHaltHandler(): self
+ {
+ $this->container['haltHandler'] = static function (\PHPPgAdmin\ContainerUtils $c) {
+ return static function ($request, $response, $exits, $status = 500) {
+ $title = 'PHPPgAdmin Error';
+
+ $html = '<p>The application could not run because of the following error:</p>';
+
+ $output = \sprintf(
+ "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" .
+ '<title>%s</title><style>' .
+ 'body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}' .
+ 'h3{margin:0;font-size:28px;font-weight:normal;line-height:30px;}' .
+ 'span{display:inline-block;font-size:16px;}' .
+ '</style></head><body><h3>%s</h3><p>%s</p><span>%s</span></body></html>',
+ $title,
+ $title,
+ $html,
+ \implode('<br>', $exits)
+ );
+
+ $body = $response->getBody(); //new \Slim\Http\Body(fopen('php://temp', 'r+'));
+ $body->write($output);
+
+ return $response
+ ->withStatus($status)
+ ->withHeader('Content-type', 'text/html')
+ ->withBody($body);
+ };
+ };
+
+ return $this;
+ }
+}
diff --git a/src/classes/ContainerUtils.php b/src/classes/ContainerUtils.php
index 10498c57..dffc30e0 100644
--- a/src/classes/ContainerUtils.php
+++ b/src/classes/ContainerUtils.php
@@ -6,170 +6,144 @@
namespace PHPPgAdmin;
-use Slim\App;
-use Slim\Container;
-use requestInstance;
-
-\defined('BASE_PATH') || \define('BASE_PATH', \dirname(__DIR__, 2));
-\defined('THEME_PATH') || \define('THEME_PATH', BASE_PATH . '/assets/themes');
-
-\defined('DEBUGMODE') || \define('DEBUGMODE', false);
-\defined('IN_TEST') || \define('IN_TEST', false);
+use Psr\Container\ContainerInterface;
+use Slim\Collection;
+use Slim\DefaultServicesProvider;
/**
- * A class that adds convenience methods to the container.
+ * @property array $deploy_info
+ * @property \Slim\Flash\Messages $flash
+ * @property \GuzzleHttp\Client $fcIntranetClient
+ * @property \PHPPgAdmin\Misc $misc
+ * @property \PHPPgAdmin\ViewManager $view
+ * @property \Slim\Http\Request $request
+ * @property \Slim\Http\Response $response
+ * @property string $BASE_PATH
+ * @property string $THEME_PATH
+ * @property string $subFolder
+ * @property bool $DEBUGMODE
+ * @property bool $IN_TEST
+ * @property string $server
+ * @property string $database
+ * @property string $schema
+ * @property
*/
-class ContainerUtils
+class ContainerUtils extends \Slim\Container implements ContainerInterface
{
use \PHPPgAdmin\Traits\HelperTrait;
- /**
- * @var string
- */
- const BASE_PATH = BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = PHPPGA_SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = DEBUGMODE;
-
- /**
- * @var string
- */
- const THEME_PATH = THEME_PATH;
/**
- * @var \Slim\Container
+ * @var null|self
*/
- protected $container;
+ private static $instance;
/**
- * @var App
+ * $appInstance.
+ *
+ * @var null|\Slim\App
*/
- protected $_app;
+ private static $appInstance;
/**
+ * Default settings.
+ *
* @var array
*/
- protected $conf;
+ private $defaultSettings = [
+ 'httpVersion' => '1.1',
+ 'responseChunkSize' => 4096,
+ 'outputBuffering' => 'append',
+ 'determineRouteBeforeAppMiddleware' => false,
+ 'displayErrorDetails' => false,
+ 'addContentLengthHeader' => true,
+ 'routerCacheFile' => false,
+ ];
/**
- * @var self
+ * Undocumented variable.
+ *
+ * @var array
*/
- protected static $_instance;
+ private static $envConfig = [
+ 'BASE_PATH' => '',
+ 'subFolder' => '',
+ 'DEBUGMODE' => false,
+ 'THEME_PATH' => '',
+ ];
/**
- * Constructor of the ContainerUtils class.
+ * @param array $values the parameters or objects
*/
- public function __construct()
+ final public function __construct(array $values = [])
{
- $composerinfo = \json_decode(\file_get_contents(BASE_PATH . '/composer.json'));
- $appVersion = $composerinfo->extra->version;
-
- $phpMinVer = (\str_replace(['<', '>', '='], '', $composerinfo->require->php));
- //$this->prtrace($appVersion);
- //$this->dump($composerinfo);
- $settings = [
- 'determineRouteBeforeAppMiddleware' => true,
- 'base_path' => self::BASE_PATH,
- 'subfolder' => self::SUBFOLDER,
- 'debug' => self::DEBUGMODE,
-
- // Configuration file version. If this is greater than that in config.inc.php, then
- // the app will refuse to run. This and $conf['version'] should be incremented whenever
- // backwards incompatible changes are made to config.inc.php-dist.
- 'base_version' => 61,
- // Application version
- 'appVersion' => 'v' . $appVersion,
- // Application name
- 'appName' => 'phpPgAdmin6',
-
- // PostgreSQL and PHP minimum version
- 'postgresqlMinVer' => '9.3',
- 'phpMinVer' => $phpMinVer,
- 'displayErrorDetails' => self::DEBUGMODE,
- 'addContentLengthHeader' => false,
- ];
-
- if (!self::DEBUGMODE && !IN_TEST) {
- $settings['routerCacheFile'] = self::BASE_PATH . '/temp/route.cache.php';
- }
- $config = [
- 'msg' => '',
- 'appThemes' => [
- 'default' => 'Default',
- 'cappuccino' => 'Cappuccino',
- 'gotar' => 'Blue/Green',
- 'bootstrap' => 'Bootstrap3',
- ],
- 'settings' => $settings,
- ];
+ parent::__construct($values);
- $this->_app = new App($config);
+ $userSettings = $values['settings'] ?? [];
+ $this->registerDefaultServices($userSettings);
- // Fetch DI Container
- $container = $this->_app->getContainer();
- $container['utils'] = $this;
- $container['version'] = 'v' . $appVersion;
- $container['errors'] = [];
- $container['requestobj'] = $container['request'];
- $container['responseobj'] = $container['response'];
-
- $this->container = $container;
+ self::$instance = $this;
}
/**
- * Gets the container instance.
+ * Gets the subfolder.
*
- * @throws \Exception (description)
+ * @param string $path The path
*
- * @return \Slim\Container the container instance
+ * @return string the subfolder
*/
- public static function getContainerInstance()
+ public function getSubfolder(string $path = ''): string
{
- $_instance = self::getInstance();
-
- if (!$container = $_instance->container) {
- throw new \Exception('Could not get a container');
- }
-
- return $container;
+ return \implode(\DIRECTORY_SEPARATOR, [$this->subFolder, $path]);
}
- /**
- * Gets the instance.
- */
- public static function getInstance(): self
+ public static function getAppInstance(array $config = []): \Slim\App
{
- if (!$_instance = self::$_instance) {
- self::$_instance = new self();
- $_instance = self::$_instance;
+ $config = \array_merge(self::getDefaultConfig($config['debugmode'] ?? false), $config);
+
+ $container = self::getContainerInstance($config);
+
+ if (!self::$appInstance) {
+ self::$appInstance = new \Slim\App($container);
}
- return $_instance;
+ return self::$appInstance;
}
- /**
- * Creates a container.
- *
- * @param array $conf The conf
- *
- * @return \Slim\App ( description_of_the_return_value )
- */
- public static function createApp($conf)
+ public static function getContainerInstance(array $config = []): self
{
- $_instance = self::getInstance();
+ self::$envConfig = [
+ 'msg' => '',
+ 'appThemes' => [
+ 'default' => 'Default',
+ 'cappuccino' => 'Cappuccino',
+ 'gotar' => 'Blue/Green',
+ 'bootstrap' => 'Bootstrap3',
+ ],
+ 'BASE_PATH' => $config['BASE_PATH'] ?? \dirname(__DIR__, 2),
+ 'subFolder' => $config['subfolder'] ?? '',
+ 'debug' => $config['debugmode'] ?? false,
+ 'THEME_PATH' => $config['theme_path'] ?? \dirname(__DIR__, 2) . '/assets/themes',
+ 'IN_TEST' => $config['IN_TEST'] ?? false,
+ 'webdbLastTab' => [],
+ ];
- $_instance
- ->withConf($conf)
- ->setExtra()
- ->setMisc()
- ->setViews();
+ self::$envConfig = \array_merge(self::$envConfig, $config);
+ if (!self::$instance) {
+ self::$instance = new static(self::$envConfig);
+
+ self::$instance
+ ->withConf(self::$envConfig);
+
+ $handlers = new ContainerHandlers(self::$instance);
+ $handlers->setExtra()
+ ->setMisc()
+ ->setViews()
+ ->storeMainRequestParams()
+ ->setHaltHandler();
+ }
//ddd($container->subfolder);
- return $_instance->_app;
+ return self::$instance;
}
/**
@@ -179,14 +153,15 @@ class ContainerUtils
*/
public function getRedirectUrl()
{
- $query_string = requestInstance()->getUri()->getQuery();
+ $container = self::getContainerInstance();
+ $query_string = $container->request->getUri()->getQuery();
// if server_id isn't set, then you will be redirected to intro
- if (null === requestInstance()->getQueryParam('server')) {
- $destinationurl = self::SUBFOLDER . '/src/views/intro';
+ if (null === $container->request->getQueryParam('server')) {
+ $destinationurl = self::$envConfig['subFolder'] . '/src/views/intro';
} else {
// otherwise, you'll be redirected to the login page for that server;
- $destinationurl = self::SUBFOLDER . '/src/views/login' . ($query_string ? '?' . $query_string : '');
+ $destinationurl = self::$envConfig['subFolder'] . '/src/views/login' . ($query_string ? '?' . $query_string : '');
}
return $destinationurl;
@@ -204,9 +179,10 @@ class ContainerUtils
if ('' === $key) {
$key = self::getBackTrace();
}
+ $container = self::getContainerInstance();
// $this->dump(__METHOD__ . ': addMessage ' . $key . ' ' . json_encode($content));
- if ($this->container->flash) {
- $this->container->flash->addMessage($key, $content);
+ if ($container->flash) {
+ $container->flash->addMessage($key, $content);
}
}
@@ -220,11 +196,12 @@ class ContainerUtils
*/
public function getDestinationWithLastTab($subject)
{
- $_server_info = $this->container->misc->getServerInfo();
+ $container = self::getContainerInstance();
+ $_server_info = $container->misc->getServerInfo();
$this->addFlash($subject, 'getDestinationWithLastTab');
//$this->prtrace('$_server_info', $_server_info);
// If username isn't set in server_info, you should login
- $url = $this->container->misc->getLastTabURL($subject) ?? ['url' => 'alldb', 'urlvars' => ['subject' => 'server']];
+ $url = $container->misc->getLastTabURL($subject) ?? ['url' => 'alldb', 'urlvars' => ['subject' => 'server']];
$destinationurl = $this->getRedirectUrl();
if (!isset($_server_info['username'])) {
@@ -261,12 +238,39 @@ class ContainerUtils
*/
public function addError(string $errormsg): \Slim\Container
{
- //dump($errormsg);
- $errors = $this->container->get('errors');
+ $container = self::getContainerInstance();
+ $errors = $container->get('errors');
$errors[] = $errormsg;
- $this->container->offsetSet('errors', $errors);
+ $container->offsetSet('errors', $errors);
+
+ return $container;
+ }
+
+ /**
+ * Returns a string with html <br> variant replaced with a new line.
+ *
+ * @param string $msg message to parse (<br> separated)
+ *
+ * @return string parsed message (linebreak separated)
+ */
+ public static function br2ln($msg)
+ {
+ return \str_replace(['<br>', '<br/>', '<br />'], \PHP_EOL, $msg);
+ }
- return $this->container;
+ public static function getDefaultConfig(bool $debug = false): array
+ {
+ return [
+ 'settings' => [
+ 'displayErrorDetails' => $debug,
+ 'determineRouteBeforeAppMiddleware' => true,
+ 'base_path' => \dirname(__DIR__, 2),
+ 'debug' => $debug,
+ 'phpMinVer' => '7.2', // PHP minimum version
+ 'addContentLengthHeader' => false,
+ 'appName' => 'PHPPgAdmin6',
+ ],
+ ];
}
/**
@@ -277,6 +281,12 @@ class ContainerUtils
$container = self::getContainerInstance();
$conf['plugins'] = [];
+ $container->BASE_PATH = $conf['BASE_PATH'];
+ $container->subFolder = $conf['subfolder'];
+ $container->debug = $conf['debugmode'];
+ $container->THEME_PATH = $conf['theme_path'];
+ $container->IN_TEST = $conf['IN_TEST'];
+ $container['errors'] = [];
$container['conf'] = static function (\Slim\Container $c) use ($conf): array {
$display_sizes = $conf['display_sizes'];
@@ -308,82 +318,34 @@ class ContainerUtils
return $conf;
};
- $container->subfolder = self::SUBFOLDER;
- return $this;
- }
-
- /**
- * Sets the views.
- *
- * @return self ( description_of_the_return_value )
- */
- private function setViews()
- {
- $container = self::getContainerInstance();
-
- /**
- * @return \PHPPgAdmin\ViewManager
- */
- $container['view'] = static function (\Slim\Container $c): \PHPPgAdmin\ViewManager {
- $misc = $c->misc;
- $view = new ViewManager(BASE_PATH . '/assets/templates', [
- 'cache' => BASE_PATH . '/temp/twigcache',
- 'auto_reload' => $c->get('settings')['debug'],
- 'debug' => $c->get('settings')['debug'],
- ], $c);
-
- $misc->setView($view);
-
- return $view;
- };
+ $container->subFolder = $conf['subfolder'];
return $this;
}
/**
- * Sets the instance of Misc class.
+ * This function registers the default services that Slim needs to work.
+ *
+ * All services are shared, they are registered such that the
+ * same instance is returned on subsequent calls.
*
- * @return self ( description_of_the_return_value )
+ * @param array $userSettings Associative array of application settings
*/
- private function setMisc()
+ private function registerDefaultServices($userSettings): void
{
- $container = self::getContainerInstance();
+ $defaultSettings = $this->defaultSettings;
+
/**
- * @return \PHPPgAdmin\Misc
+ * This service MUST return an array or an instance of ArrayAccess.
+ *
+ * @return array|ArrayAccess
*/
- $container['misc'] = static function (\Slim\Container $c): \PHPPgAdmin\Misc {
- $misc = new \PHPPgAdmin\Misc($c);
-
- $conf = $c->get('conf');
-
- // 4. Check for theme by server/db/user
- $_server_info = $misc->getServerInfo();
-
- /* starting with PostgreSQL 9.0, we can set the application name */
- if (isset($_server_info['pgVersion']) && 9 <= $_server_info['pgVersion']) {
- \putenv('PGAPPNAME=' . $c->get('settings')['appName'] . '_' . $c->get('settings')['appVersion']);
- }
-
- return $misc;
- };
-
- return $this;
- }
-
- private function setExtra()
- {
- $container = self::getContainerInstance();
- $container['flash'] = static function (): \Slim\Flash\Messages {
- return new \Slim\Flash\Messages();
- };
-
- $container['lang'] = static function (\Slim\Container $c): array {
- $translations = new \PHPPgAdmin\Translations($c);
-
- return $translations->lang;
+ $this['settings'] = static function () use ($userSettings, $defaultSettings): \Slim\Collection {
+ return new Collection(\array_merge($defaultSettings, $userSettings));
};
- return $this;
+ $defaultProvider = new DefaultServicesProvider();
+ $defaultProvider->register($this);
}
}
diff --git a/src/classes/Misc.php b/src/classes/Misc.php
index 0cd3b75d..841a0ace 100644
--- a/src/classes/Misc.php
+++ b/src/classes/Misc.php
@@ -26,19 +26,6 @@ class Misc
use \PHPPgAdmin\Traits\MiscTrait;
/**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
-
- /**
* @var array
*/
public $appLangFiles = [];
@@ -81,12 +68,12 @@ class Misc
public $postgresqlMinVer;
/**
- * @var \Slim\Views\Twig
+ * @var \PHPPgAdmin\ViewManager
*/
public $view;
/**
- * @var \Slim\Container
+ * @var \PHPPgAdmin\ContainerUtils
*/
protected $container;
@@ -101,11 +88,6 @@ class Misc
private $_no_db_connection = false;
/**
- * @var bool
- */
- private $_reload_browser = false;
-
- /**
* @var null|Postgres
*/
private $_data;
@@ -131,9 +113,9 @@ class Misc
private $_error_msg = '';
/**
- * @param \Slim\Container $container The container
+ * @param \PHPPgAdmin\ContainerUtils $container The container
*/
- public function __construct(\Slim\Container $container)
+ public function __construct(\PHPPgAdmin\ContainerUtils $container)
{
$this->container = $container;
@@ -153,17 +135,17 @@ class Misc
// Check for config file version mismatch
if (!isset($this->conf['version']) || $base_version > $this->conf['version']) {
- $container->get('utils')->addError($this->lang['strbadconfig']);
+ $container->addError($this->lang['strbadconfig']);
}
// Check database support is properly compiled in
if (!\function_exists('pg_connect')) {
- $container->get('utils')->addError($this->lang['strnotloaded']);
+ $container->addError($this->lang['strnotloaded']);
}
// Check the version of PHP
if (\version_compare(\PHP_VERSION, $this->phpMinVer, '<')) {
- $container->get('utils')->addError(\sprintf('Version of PHP not supported. Please upgrade to version %s or later.', $this->phpMinVer));
+ $container->addError(\sprintf('Version of PHP not supported. Please upgrade to version %s or later.', $this->phpMinVer));
}
//$this->dumpAndDie($this);
@@ -210,7 +192,7 @@ class Misc
*/
public function serverToSha()
{
- $request_server = \requestInstance()->getParam('server');
+ $request_server = $this->container->request->getParam('server');
if (null === $request_server) {
return null;
@@ -250,39 +232,17 @@ class Misc
/**
* Sets the view instance property of this class.
*
- * @param \Slim\Views\Twig $view view instance
+ * @param \PHPPgAdmin\ViewManager $view view instance
*
* @return \PHPPgAdmin\Misc this class instance
*/
- public function setView(\Slim\Views\Twig $view)
+ public function setView(\PHPPgAdmin\ViewManager $view)
{
$this->view = $view;
return $this;
}
- /**
- * Internally sets the reload browser property.
- *
- * @param bool $flag sets internal $_reload_browser var which will be passed to the footer methods
- *
- * @return \PHPPgAdmin\Misc this class instance
- */
- public function setReloadBrowser($flag)
- {
- $this->_reload_browser = (bool) $flag;
-
- return $this;
- }
-
- /**
- * @return bool
- */
- public function getReloadBrowser()
- {
- return $this->_reload_browser;
- }
-
public function getContainer()
{
return $this->container;
@@ -344,9 +304,9 @@ class Misc
*
* @internal mixed $plaform placeholder that will receive the value of the platform
*
- * @return null|\PHPPgAdmin\Database\Postgres the database accessor instance
+ * @return null|\PHPPgAdmin\Database\Postgres|void the database accessor instance
*/
- public function getDatabaseAccessor($database = '', $server_id = null): ?\PHPPgAdmin\Database\Postgres
+ public function getDatabaseAccessor($database = '', $server_id = null)
{
$lang = $this->lang;
@@ -356,7 +316,7 @@ class Misc
$server_info = $this->getServerInfo($this->_server_id);
- if ($this->_no_db_connection || !isset($server_info['username'])) {
+ if ($this->getNoDBConnection() || !isset($server_info['username'])) {
return null;
}
@@ -372,7 +332,7 @@ class Misc
}
if (!$_connection) {
- $this->container->utils->addError($lang['strloginfailed']);
+ $this->container->addError($lang['strloginfailed']);
$this->setErrorMsg($lang['strloginfailed']);
return null;
@@ -382,14 +342,17 @@ class Misc
// The description of the server is returned in $platform.
$_type = $_connection->getDriver($platform);
- if (null === $_type) {
+ if (null === $_type ?? null) {
$errormsg = \sprintf($lang['strpostgresqlversionnotsupported'], $this->postgresqlMinVer);
- $this->container->utils->addError($errormsg);
+ $this->container->addError($errormsg);
$this->setErrorMsg($errormsg);
return null;
}
- $_type = '\PHPPgAdmin\Database\\' . $_type;
+ /**
+ * @var \class-string<\PHPPgAdmin\Database\Postgres>
+ */
+ $_type = '\\PHPPgAdmin\\Database\\' . $_type;
$this->setServerInfo('platform', $platform, $this->_server_id);
$this->setServerInfo('pgVersion', $_connection->getVersion(), $this->_server_id);
@@ -410,19 +373,18 @@ class Misc
}
}
- if (
- false === $this->_no_db_connection &&
- null !== $this->getDatabase() &&
- isset($_REQUEST['schema'])
+ if (false !== $this->getNoDBConnection() ||
+ null === $this->getDatabase() ||
+ !isset($_REQUEST['schema'])
) {
- $status = $this->_data->setSchema($_REQUEST['schema']);
+ return $this->_data;
+ }
- if (0 !== $status) {
- $this->container->utils->addError($this->lang['strbadschema']);
- $this->setErrorMsg($this->lang['strbadschema']);
+ $status = $this->_data->setSchema($_REQUEST['schema']);
- return null;
- }
+ if (0 !== $status) {
+ $this->container->addError($this->lang['strbadschema']);
+ $this->setErrorMsg($this->lang['strbadschema']);
}
return $this->_data;
@@ -434,9 +396,9 @@ class Misc
* @param string $database
* @param string $server_id
*
- * @return \PHPPgAdmin\Connection
+ * @return null|\PHPPgAdmin\Connection
*/
- public function getConnection(string $database = '', $server_id = null): \PHPPgAdmin\Connection
+ public function getConnection(string $database = '', $server_id = null): ?\PHPPgAdmin\Connection
{
$lang = $this->lang;
@@ -458,8 +420,7 @@ class Misc
'administrator' => 'administrator',
];
- if (
- isset($server_info['username']) &&
+ if (isset($server_info['username']) &&
\array_key_exists(\mb_strtolower($server_info['username']), $bad_usernames)
) {
$msg = $lang['strlogindisallowed'];
@@ -467,8 +428,7 @@ class Misc
throw new \Exception($msg);
}
- if (
- !isset($server_info['password']) ||
+ if (!isset($server_info['password']) ||
'' === $server_info['password']
) {
$msg = $lang['strlogindisallowed'];
@@ -520,8 +480,7 @@ class Misc
$server_string = $info['host'] . ':' . $info['port'] . ':' . $info['sslmode'];
$server_sha = \sha1($server_string);
- if (
- $this->_server_id === $server_string ||
+ if ($this->_server_id === $server_string ||
$this->_server_id === $server_sha
) {
if (isset($info['username'])) {
@@ -529,7 +488,7 @@ class Misc
} elseif (isset($_SESSION['sharedUsername'])) {
$info['username'] = $_SESSION['sharedUsername'];
$info['password'] = $_SESSION['sharedPassword'];
- $this->setReloadBrowser(true);
+ $this->container->get('view')->setReloadBrowser(true);
$this->setServerInfo(null, $info, $this->_server_id);
}
$this->_server_info = $info;
@@ -563,7 +522,7 @@ class Misc
public function setServerInfo($key, $value, $server_id = null): void
{
if (null === $server_id) {
- $server_id = requestInstance()->getParam('server');
+ $server_id = $this->container->request->getParam('server');
}
if (null === $key) {
@@ -589,8 +548,7 @@ class Misc
$server_info = $this->getServerInfo($this->_server_id);
- if (
- null !== $this->_server_id &&
+ if (null !== $this->_server_id &&
isset($server_info['useonlydefaultdb']) &&
true === $server_info['useonlydefaultdb'] &&
isset($server_info['defaultdb'])
diff --git a/src/classes/ViewManager.php b/src/classes/ViewManager.php
index 246448b8..1e79f53d 100644
--- a/src/classes/ViewManager.php
+++ b/src/classes/ViewManager.php
@@ -6,8 +6,6 @@
namespace PHPPgAdmin;
-use Psr\Http\Message\ResponseInterface;
-
/**
* @file
* Class to hold various commonly used functions
@@ -25,24 +23,6 @@ class ViewManager extends \Slim\Views\Twig
use \PHPPgAdmin\Traits\HelperTrait;
/**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
-
- /**
- * @var string
- */
- const THEME_PATH = ContainerUtils::THEME_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
-
- /**
* @var array
*/
public $appLangFiles = [];
@@ -95,10 +75,17 @@ class ViewManager extends \Slim\Views\Twig
public $misc;
/**
- * @var \Slim\Container
+ * @var \PHPPgAdmin\ContainerUtils
*/
protected $container;
+ /**
+ * Undocumented variable.
+ *
+ * @var array
+ */
+ private static $themeFolders = [];
+
private $_connection;
/**
@@ -135,12 +122,11 @@ class ViewManager extends \Slim\Views\Twig
private static $instance;
/**
- * @param \Slim\Container $container The container
- * @param mixed $path
- * @param mixed $settings
- * @param \Slim\Container $c
+ * @param mixed $path
+ * @param mixed $settings
+ * @param \PHPPgAdmin\ContainerUtils $c
*/
- public function __construct($path, $settings, \Slim\Container $c)
+ public function __construct($path, $settings, \PHPPgAdmin\ContainerUtils $c)
{
$this->lang = $c->get('lang');
$this->conf = $c->get('conf');
@@ -155,7 +141,7 @@ class ViewManager extends \Slim\Views\Twig
$this->addExtension(new \Slim\Views\TwigExtension($c['router'], $basePath));
- $this->offsetSet('subfolder', self::SUBFOLDER);
+ $this->offsetSet('subfolder', \containerInstance()->subFolder);
$this->offsetSet('theme', $this->misc->getConf('theme'));
$this->offsetSet('Favicon', $this->icon('Favicon'));
$this->offsetSet('Introduction', $this->icon('Introduction'));
@@ -167,15 +153,46 @@ class ViewManager extends \Slim\Views\Twig
$_theme = $this->getTheme($this->conf, $this->misc->getServerInfo());
- if (isset($_SESSION) && !isset($_SESSION['ppaTheme'])) {
+ // If a theme comes in the request, overwrite whatever theme was set to cookie and settion store
+ if ($_request_theme = $this->getRequestTheme()) {
+ $this->setCookieTheme($_request_theme);
+ $this->setSessionTheme($_request_theme);
+ $_theme = $_request_theme;
+ }
+
+ if (!$this->getSessionTheme() || !$this->getCookieTheme()) {
+ // If there's no session theme, or cookie theme,
+ // store the latest one we determined from request, session,cookie, conf or default
/* save the selected theme in cookie for a year */
\setcookie('ppaTheme', $_theme, \time() + 31536000, '/');
$_SESSION['ppaTheme'] = $_theme;
- $this->misc->setConf('theme', $_theme);
}
+ $this->misc->setConf('theme', $_theme);
}
- public function maybeRenderIframes(ResponseInterface $response, string $subject, string $query_string): ResponseInterface
+ /**
+ * Internally sets the reload browser property.
+ *
+ * @param bool $flag sets internal $_reload_browser var which will be passed to the footer methods
+ *
+ * @return \PHPPgAdmin\ViewManager this class instance
+ */
+ public function setReloadBrowser($flag): self
+ {
+ $this->_reload_browser = (bool) $flag;
+
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function getReloadBrowser(): bool
+ {
+ return $this->_reload_browser;
+ }
+
+ public function maybeRenderIframes(\Slim\Http\Response $response, string $subject, string $query_string): \Slim\Http\Response
{
$c = $this->getContainer();
@@ -212,29 +229,35 @@ class ViewManager extends \Slim\Views\Twig
$_theme = 'default';
// List of themes
$themefolders = $this->getThemeFolders();
+
// Check if theme is in $_REQUEST, $_SESSION or $_COOKIE
// 1.- First priority: $_REQUEST, this happens when you use the selector
if (\array_key_exists('theme', $_REQUEST) &&
- \array_key_exists($_REQUEST['theme'], $themefolders)) {
+ \array_key_exists($_REQUEST['theme'], $themefolders)
+ ) {
$_theme = $_REQUEST['theme'];
} elseif ( // otherwise, see if there's a theme associated with this particular server
null !== $_server_info &&
\array_key_exists('theme', $_server_info) &&
\is_string($_server_info['theme']) &&
- \array_key_exists($_COOKIE['ppaTheme'], $themefolders)) {
+ \array_key_exists($_COOKIE['ppaTheme'], $themefolders)
+ ) {
$_theme = $_server_info['theme'];
} elseif (isset($_SESSION) && \array_key_exists('ppaTheme', $_SESSION) &&
- \array_key_exists($_SESSION['ppaTheme'], $themefolders)) {
+ \array_key_exists($_SESSION['ppaTheme'], $themefolders)
+ ) {
// otherwise check $_SESSION
$_theme = $_SESSION['ppaTheme'];
} elseif (\array_key_exists('ppaTheme', $_COOKIE) &&
- \array_key_exists($_COOKIE['ppaTheme'], $themefolders)) {
+ \array_key_exists($_COOKIE['ppaTheme'], $themefolders)
+ ) {
// oterwise check $_COOKIE
$_theme = $_COOKIE['ppaTheme'];
} elseif ( // see if there's a valid theme set in config file
\array_key_exists('theme', $conf) &&
\is_string($conf['theme']) &&
- \array_key_exists($conf['theme'], $themefolders)) {
+ \array_key_exists($conf['theme'], $themefolders)
+ ) {
$_theme = $conf['theme'];
}
@@ -310,10 +333,10 @@ class ViewManager extends \Slim\Views\Twig
public function getHelpLink($help)
{
return \htmlspecialchars(
- $this->getSubfolder('help?help=') .
- \urlencode($help) .
- '&server=' .
- \urlencode($this->misc->getServerId())
+ $this->container->getSubfolder('help?help=') .
+ \urlencode($help) .
+ '&server=' .
+ \urlencode($this->misc->getServerId())
);
}
@@ -328,35 +351,75 @@ class ViewManager extends \Slim\Views\Twig
$theme = $this->conf['theme'];
$path = 'assets/images/themes';
- $default_icon = \sprintf('%s/%s/default/DisconnectedServer.png', self::SUBFOLDER, $path);
+ $default_icon = \sprintf('%s/%s/default/DisconnectedServer.png', \containerInstance()->subFolder, $path);
- if (\is_readable(\sprintf('%s/%s/%s/%s.png', self::BASE_PATH, $path, $theme, $icon))) {
- return \sprintf('%s/%s/%s/%s.png', self::SUBFOLDER, $path, $theme, $icon);
+ if (\is_readable(\sprintf('%s/%s/%s/%s.png', \containerInstance()->BASE_PATH, $path, $theme, $icon))) {
+ return \sprintf('%s/%s/%s/%s.png', \containerInstance()->subFolder, $path, $theme, $icon);
}
- if (\is_readable(\sprintf('%s/%s/%s/%s.gif', self::BASE_PATH, $path, $theme, $icon))) {
- return \sprintf('%s/%s/%s/%s.gif', self::SUBFOLDER, $path, $theme, $icon);
+ if (\is_readable(\sprintf('%s/%s/%s/%s.gif', \containerInstance()->BASE_PATH, $path, $theme, $icon))) {
+ return \sprintf('%s/%s/%s/%s.gif', \containerInstance()->subFolder, $path, $theme, $icon);
}
- if (\is_readable(\sprintf('%s/%s/%s/%s.ico', self::BASE_PATH, $path, $theme, $icon))) {
- return \sprintf('%s/%s/%s/%s.ico', self::SUBFOLDER, $path, $theme, $icon);
+ if (\is_readable(\sprintf('%s/%s/%s/%s.ico', \containerInstance()->BASE_PATH, $path, $theme, $icon))) {
+ return \sprintf('%s/%s/%s/%s.ico', \containerInstance()->subFolder, $path, $theme, $icon);
}
- if (\is_readable(\sprintf('%s/%s/default/%s.png', self::BASE_PATH, $path, $icon))) {
- return \sprintf('%s/%s/default/%s.png', self::SUBFOLDER, $path, $icon);
+ if (\is_readable(\sprintf('%s/%s/default/%s.png', \containerInstance()->BASE_PATH, $path, $icon))) {
+ return \sprintf('%s/%s/default/%s.png', \containerInstance()->subFolder, $path, $icon);
}
- if (\is_readable(\sprintf('%s/%s/default/%s.gif', self::BASE_PATH, $path, $icon))) {
- return \sprintf('%s/%s/default/%s.gif', self::SUBFOLDER, $path, $icon);
+ if (\is_readable(\sprintf('%s/%s/default/%s.gif', \containerInstance()->BASE_PATH, $path, $icon))) {
+ return \sprintf('%s/%s/default/%s.gif', \containerInstance()->subFolder, $path, $icon);
}
- if (\is_readable(\sprintf('%s/%s/default/%s.ico', self::BASE_PATH, $path, $icon))) {
- return \sprintf('%s/%s/default/%s.ico', self::SUBFOLDER, $path, $icon);
+ if (\is_readable(\sprintf('%s/%s/default/%s.ico', \containerInstance()->BASE_PATH, $path, $icon))) {
+ return \sprintf('%s/%s/default/%s.ico', \containerInstance()->subFolder, $path, $icon);
}
return $default_icon;
}
+ private function getCookieTheme(): ?string
+ {
+ $cookie_theme = $_COOKIE['ppaTheme'] ?? null;
+
+ return $this->isThemeAvailable($cookie_theme) ? $cookie_theme : null;
+ }
+
+ private function getSessionTheme(): ?string
+ {
+ $session_theme = $_SESSION['ppaTheme'] ?? null;
+
+ return $this->isThemeAvailable($session_theme) ? $session_theme : null;
+ }
+
+ private function getRequestTheme(): ?string
+ {
+ $request_theme = $_REQUEST['theme'] ?? null;
+
+ return $this->isThemeAvailable($request_theme) ? $request_theme : null;
+ }
+
+ private function isThemeAvailable(?string $_theme = null): bool
+ {
+ return \array_key_exists($_theme, $this->getThemeFolders());
+ }
+
+ private function setCookieTheme(string $_theme): void
+ {
+ if ($this->isThemeAvailable($_theme)) {
+ \setcookie('ppaTheme', $_theme, \time() + 31536000, '/');
+ }
+ }
+
+ private function setSessionTheme(string $_theme): void
+ {
+ if ($this->isThemeAvailable($_theme)) {
+ $_SESSION['ppaTheme'] = $_theme;
+ }
+ }
+
/**
* Undocumented function.
*
@@ -371,7 +434,7 @@ class ViewManager extends \Slim\Views\Twig
return '\PHPPgAdmin\Controller\\' . \ucfirst($subject) . 'Controller';
}
- private function getContainer(): \Slim\Container
+ private function getContainer(): \PHPPgAdmin\ContainerUtils
{
return $this->container;
}
@@ -384,8 +447,11 @@ class ViewManager extends \Slim\Views\Twig
*/
private function getThemeFolders(): array
{
+ if (!empty(self::$themeFolders)) {
+ return self::$themeFolders;
+ }
// no THEME_PATH (how?) then return empty array
- if (!$gestor = \opendir(self::THEME_PATH)) {
+ if (!$gestor = \opendir(containerInstance()->THEME_PATH)) {
\closedir($gestor);
return [];
@@ -398,16 +464,18 @@ class ViewManager extends \Slim\Views\Twig
continue;
}
- $folderpath = \sprintf('%s%s%s', self::THEME_PATH, \DIRECTORY_SEPARATOR, $foldername);
+ $folderpath = \sprintf('%s%s%s', \containerInstance()->THEME_PATH, \DIRECTORY_SEPARATOR, $foldername);
$stylesheet = \sprintf('%s%s%s', $folderpath, \DIRECTORY_SEPARATOR, 'global.css');
// if $folderpath if indeed a folder and contains a global.css file, then it's a theme
if (\is_dir($folderpath) &&
- \is_file($stylesheet)) {
+ \is_file($stylesheet)
+ ) {
$themefolders[$foldername] = $folderpath;
}
}
\closedir($gestor);
+ self::$themeFolders = $themefolders;
return $themefolders;
}
diff --git a/src/controllers/AggregatesController.php b/src/controllers/AggregatesController.php
index 2fa97293..c8be5ca6 100644
--- a/src/controllers/AggregatesController.php
+++ b/src/controllers/AggregatesController.php
@@ -240,7 +240,7 @@ class AggregatesController extends BaseController
);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['straggrcreated']);
} else {
$this->doCreate($this->lang['straggrcreatedbad']);
@@ -276,7 +276,7 @@ class AggregatesController extends BaseController
$this->printTitle($this->lang['strcreateaggregate'], 'pg.aggregate.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/aggregates" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/aggregates" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$this->data->_maxNameLen}\" value=\"",
@@ -359,7 +359,7 @@ class AggregatesController extends BaseController
$this->printTitle($this->lang['stralter'], 'pg.aggregate.alter');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/aggregates" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/aggregates" method="post">' . \PHP_EOL;
$aggrdata = $this->data->getAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype']);
if (0 < $aggrdata->recordCount()) {
@@ -408,7 +408,7 @@ class AggregatesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropaggregate'], \htmlspecialchars($_REQUEST['aggrname'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/aggregates" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/aggregates" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="aggrname" value="', \htmlspecialchars($_REQUEST['aggrname']), '" />' . \PHP_EOL;
@@ -421,7 +421,7 @@ class AggregatesController extends BaseController
$status = $this->data->dropAggregate($_POST['aggrname'], $_POST['aggrtype'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['straggregatedropped']);
} else {
$this->doDefault($this->lang['straggregatedroppedbad']);
diff --git a/src/controllers/AlldbController.php b/src/controllers/AlldbController.php
index 9e184d3b..f4fa9d3b 100644
--- a/src/controllers/AlldbController.php
+++ b/src/controllers/AlldbController.php
@@ -103,7 +103,7 @@ class AlldbController extends BaseController
$databases = $data->getDatabases();
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$href = $this->misc->getHREF();
$redirecturl = $this->container->getDestinationWithLastTab('database');
@@ -112,7 +112,7 @@ class AlldbController extends BaseController
'database' => [
'title' => $this->lang['strdatabase'],
'field' => Decorator::field('datname'),
- 'url' => self::SUBFOLDER . $redirecturl . '&amp;',
+ 'url' => \containerInstance()->subFolder . $redirecturl . '&amp;',
'vars' => ['database' => 'datname'],
],
'owner' => [
@@ -267,7 +267,7 @@ class AlldbController extends BaseController
$this->printTrail('database');
$this->printTitle($this->lang['stralter'], 'pg.database.alter');
- echo '<form action="' . self::SUBFOLDER . '/src/views/alldb" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/alldb" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">';
@@ -315,7 +315,7 @@ class AlldbController extends BaseController
$this->coalesceArr($_POST, 'dbcomment', '');
if (0 === $data->alterDatabase($_POST['oldname'], $_POST['newname'], $_POST['owner'], $_POST['dbcomment'])) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strdatabasealtered']);
} else {
$this->doDefault($this->lang['strdatabasealteredbad']);
@@ -340,7 +340,7 @@ class AlldbController extends BaseController
$this->printTrail('database');
$this->printTitle($this->lang['strdrop'], 'pg.database.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/alldb" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/alldb" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
foreach ($_REQUEST['ma'] as $v) {
@@ -369,9 +369,18 @@ class AlldbController extends BaseController
$status = $data->dropDatabase($d);
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($d, \ENT_QUOTES, 'UTF-8'), $this->lang['strdatabasedropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($d, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strdatabasedropped']
+ );
} else {
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($d, \ENT_QUOTES, 'UTF-8'), $this->lang['strdatabasedroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($d, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strdatabasedroppedbad']
+ ));
return;
}
@@ -427,7 +436,7 @@ class AlldbController extends BaseController
$tablespaces = $data->getTablespaces();
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/alldb" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/alldb" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><input name=\"formName\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -553,7 +562,7 @@ class AlldbController extends BaseController
);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strdatabasecreated']);
} else {
$this->doCreate($this->lang['strdatabasecreatedbad']);
diff --git a/src/controllers/BaseController.php b/src/controllers/BaseController.php
index e56c3561..2bdb2cd9 100644
--- a/src/controllers/BaseController.php
+++ b/src/controllers/BaseController.php
@@ -6,28 +6,14 @@
namespace PHPPgAdmin\Controller;
-use PHPPgAdmin\ContainerUtils;
use PHPPgAdmin\XHtml;
-\ini_set('display_errors', ContainerUtils::DEBUGMODE);
/**
* Base controller class.
*/
class BaseController
{
use \PHPPgAdmin\Traits\HelperTrait;
- /**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
public $appLangFiles = [];
@@ -77,13 +63,15 @@ class BaseController
public $phpMinVer;
- protected $script;
-
/**
* @var \PHPPgAdmin\ContainerUtils
*/
+ * @var \PHPPgAdmin\ContainerUtils
+ */
protected $container;
+ protected $script;
+
protected $data;
protected $database;
@@ -128,7 +116,7 @@ class BaseController
* Constructs the base controller (common for almost all controllers).
*
* @param \PHPPgAdmin\ContainerUtils $container the $app container
- * @param bool $no_db_connection [optional] if true, sets $this->misc->setNoDBConnection(true);
+ * @param bool $no_db_connection [optional] if true, sets $this->misc->setNoDBConnection(true);
*/
public function __construct(\PHPPgAdmin\ContainerUtils $container)
{
@@ -168,16 +156,17 @@ private function renderInitialPageIfNotLogged() {
if (null === $this->misc->getServerId()) {
$servers_controller = new \PHPPgAdmin\Controller\ServersController($this->container);
- return $servers_controller->render();
- }
- $_server_info = $this->misc->getServerInfo();
- // Redirect to the login form if not logged in
- if (!isset($_server_info['username'])) {
- $msg = \sprintf($this->lang['strlogoutmsg'], $_server_info['desc']??'');
+ $servers_controller->render();
+ } else {
+ $_server_info = $this->misc->getServerInfo();
+ // Redirect to the login form if not logged in
+ if (!isset($_server_info['username'])) {
+ $msg = \sprintf($this->lang['strlogoutmsg'], $_server_info['desc']);
- $servers_controller = new \PHPPgAdmin\Controller\ServersController($this->container);
+ $servers_controller = new \PHPPgAdmin\Controller\ServersController($container);
- return $servers_controller->render();
+ $servers_controller->render();
+ }
}
}
}
@@ -259,7 +248,7 @@ private function renderInitialPageIfNotLogged() {
*
* @param array $tabs The tabs
*
- * @return \PHPPgAdmin\ArrayRecordSet filtered tabs in the form of an ArrayRecordSet
+ * @return \PHPPgAdmin\ADORecordSet|\PHPPgAdmin\ArrayRecordSet filtered tabs in the form of an ArrayRecordSet
*/
public function adjustTabsForTree(&$tabs)
{
@@ -271,10 +260,10 @@ private function renderInitialPageIfNotLogged() {
/**
* Produce JSON data for the browser tree.
*
- * @param \PHPPgAdmin\ArrayRecordSet $_treedata a set of records to populate the tree
- * @param array $attrs Attributes for tree items
- * @param string $section The section where the branch is linked in the tree
- * @param bool $print either to return or echo the result
+ * @param \PHPPgAdmin\ADORecordSet|\PHPPgAdmin\ArrayRecordSet $_treedata a set of records to populate the tree
+ * @param array $attrs Attributes for tree items
+ * @param string $section The section where the branch is linked in the tree
+ * @param bool $print either to return or echo the result
*
* @return \Slim\Http\Response|string the json rendered tree
*/
@@ -463,17 +452,28 @@ private function renderInitialPageIfNotLogged() {
}
/**
- * @param string $key
+ * @param string $key
* @param null|array|float|int|string $default
*
* @return null|array|float|int|string
*/
- public function getQueryParamstring($key, $default = null)
+ public function getQueryStrinParam($key, $default = null)
{
return \requestInstance()->getQueryParam($key, $default);
}
/**
+ * @return array
+ */
+ public function getAllParams(): array
+ {
+ return \array_merge(
+ \requestInstance()->getQueryParams() ?? [],
+ \requestInstance()->getParsedBody() ?? []
+ );
+ }
+
+ /**
* Print out a message.
*
* @param string $msg The message
@@ -484,7 +484,7 @@ private function renderInitialPageIfNotLogged() {
public function printMsg($msg, $do_print = true)
{
$html = '';
- $msg = \htmlspecialchars(\PHPPgAdmin\Traits\HelperTrait::br2ln($msg));
+ $msg = \htmlspecialchars(\PHPPgAdmin\ContainerUtils::br2ln($msg));
if ('' !== $msg) {
$html .= '<p class="message">' . \nl2br($msg) . '</p>' . \PHP_EOL;
diff --git a/src/controllers/ColpropertiesController.php b/src/controllers/ColpropertiesController.php
index 2bd3bc4d..915e10d6 100644
--- a/src/controllers/ColpropertiesController.php
+++ b/src/controllers/ColpropertiesController.php
@@ -89,7 +89,6 @@ class ColpropertiesController extends BaseController
if (!empty($_REQUEST['column'])) {
// Get table
$tdata = $data->getTable($this->tableName);
- //\Kint::dump($tdata);
// Get columns
$attrs = $data->getTableAttributes($this->tableName, $_REQUEST['column']);
@@ -238,8 +237,8 @@ class ColpropertiesController extends BaseController
$this->printTitle($this->lang['stralter'], 'pg.column.alter');
$this->printMsg($msg);
- echo '<script src="' . self::SUBFOLDER . '/assets/js/tables.js" type="text/javascript"></script>';
- echo '<form action="' . self::SUBFOLDER . '/src/views/colproperties" method="post">' . \PHP_EOL;
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/tables.js" type="text/javascript"></script>';
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/colproperties" method="post">' . \PHP_EOL;
// Output table header
echo '<table>' . \PHP_EOL;
@@ -293,6 +292,7 @@ class ColpropertiesController extends BaseController
// Column type
$escaped_predef_types = []; // the JS escaped array elements
+
if ($data->hasAlterColumnType()) {
// Fetch all available types
$types = $data->getTypes(true, false, true);
@@ -386,7 +386,7 @@ class ColpropertiesController extends BaseController
if (0 === $status) {
if ($_REQUEST['column'] !== $_REQUEST['field']) {
$_REQUEST['column'] = $_REQUEST['field'];
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doDefault($sql . "<br/>{$this->lang['strcolumnaltered']}");
} else {
diff --git a/src/controllers/ConstraintsController.php b/src/controllers/ConstraintsController.php
index edbbaf4a..f3c016cb 100644
--- a/src/controllers/ConstraintsController.php
+++ b/src/controllers/ConstraintsController.php
@@ -26,7 +26,7 @@ class ConstraintsController extends BaseController
$this->printHeader(
$this->lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $this->lang['strconstraints'],
- '<script src="' . self::SUBFOLDER . '/assets/js/indexes.js" type="text/javascript"></script>',
+ '<script src="' . \containerInstance()->subFolder . '/assets/js/indexes.js" type="text/javascript"></script>',
true,
'header_select2.twig'
);
@@ -540,7 +540,7 @@ class ConstraintsController extends BaseController
$this->printTitle($this->lang['straddcheck'], 'pg.constraint.check');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/constraints" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/constraints" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<th class=\"data required\">{$this->lang['strdefinition']}</th></tr>" . \PHP_EOL;
diff --git a/src/controllers/DatabaseController.php b/src/controllers/DatabaseController.php
index f6cc5ec3..4da3d561 100644
--- a/src/controllers/DatabaseController.php
+++ b/src/controllers/DatabaseController.php
@@ -41,7 +41,7 @@ class DatabaseController extends BaseController
$scripts = '';
// normal flow
if ('locks' === $this->action || 'processes' === $this->action) {
- $scripts .= '<script src="' . self::SUBFOLDER . '/assets/js/database.js" type="text/javascript"></script>';
+ $scripts .= '<script src="' . \containerInstance()->subFolder . '/assets/js/database.js" type="text/javascript"></script>';
$refreshTime = $this->conf['ajax_refresh'] * 1500;
@@ -184,7 +184,7 @@ class DatabaseController extends BaseController
$this->printTabs('database', 'find');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/database" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/database" method="post">' . \PHP_EOL;
echo '<p><input name="term" value="', \htmlspecialchars($_REQUEST['term']),
"\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" />" . \PHP_EOL;
// Output list of filters. This is complex due to all the 'has' and 'conf' feature possibilities
@@ -546,7 +546,7 @@ class DatabaseController extends BaseController
$this->printTrail('database');
$this->printTabs('database', 'sql');
echo "<p>{$this->lang['strentersql']}</p>" . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/sql" method="post" enctype="multipart/form-data" id="sqlform">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/sql" method="post" enctype="multipart/form-data" id="sqlform">' . \PHP_EOL;
echo "<p>{$this->lang['strsql']}<br />" . \PHP_EOL;
echo '<textarea style="width:95%;" rows="15" cols="50" name="query" id="query">',
\htmlspecialchars($_SESSION['sqlquery']), '</textarea></p>' . \PHP_EOL;
@@ -643,7 +643,7 @@ class DatabaseController extends BaseController
switch ($curr) {
case 'SCHEMA':
$destination = $this->container->getDestinationWithLastTab('schema');
- echo '<li><a href="' . self::SUBFOLDER . "{$destination}";
+ echo '<li><a href="' . \containerInstance()->subFolder . "{$destination}";
echo $this->misc->printVal($rs->fields['name']), '">';
echo $this->_highlight($this->misc->printVal($rs->fields['name']), $_REQUEST['term']);
echo '</a></li>' . \PHP_EOL;
@@ -653,7 +653,7 @@ class DatabaseController extends BaseController
echo '<li>';
echo "<a href=\"tables?subject=schema&{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
$destination = $this->container->getDestinationWithLastTab('table');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;table=',
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;table=',
\urlencode($rs->fields['name']), '">', $this->_highlight($this->misc->printVal($rs->fields['name']), $_REQUEST['term']), '</a></li>' . \PHP_EOL;
break;
@@ -661,7 +661,7 @@ class DatabaseController extends BaseController
echo '<li>';
echo "<a href=\"views?subject=schema&{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
$destination = $this->container->getDestinationWithLastTab('view');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;view=',
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;view=',
\urlencode($rs->fields['name']), '">', $this->_highlight($this->misc->printVal($rs->fields['name']), $_REQUEST['term']), '</a></li>' . \PHP_EOL;
break;
@@ -675,7 +675,7 @@ class DatabaseController extends BaseController
case 'COLUMNTABLE':
echo '<li>';
$destination = $this->container->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
echo "<a href=\"tblproperties?subject=table&{$this->misc->href}&table=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
echo "<a href=\"colproperties?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;table=',
\urlencode($rs->fields['relname']), '&amp;column=', \urlencode($rs->fields['name']), '">',
@@ -685,7 +685,7 @@ class DatabaseController extends BaseController
case 'COLUMNVIEW':
echo '<li>';
$destination = $this->container->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
echo "<a href=\"viewproperties?subject=view&{$this->misc->href}&view=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
echo "<a href=\"colproperties?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;view=',
\urlencode($rs->fields['relname']), '&amp;column=', \urlencode($rs->fields['name']), '">',
@@ -695,18 +695,18 @@ class DatabaseController extends BaseController
case 'INDEX':
echo '<li>';
$destination = $this->container->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
$destination = $this->container->getDestinationWithLastTab('table');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&table=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&table=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
echo "<a href=\"indexes?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;table=', \urlencode($rs->fields['relname']), '">', $this->_highlight($this->misc->printVal($rs->fields['name']), $_REQUEST['term']), '</a></li>' . \PHP_EOL;
break;
case 'CONSTRAINTTABLE':
echo '<li>';
$destination = $this->container->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
$destination = $this->container->getDestinationWithLastTab('table');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&table=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&table=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
echo "<a href=\"constraints?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;table=',
\urlencode($rs->fields['relname']), '">', $this->_highlight($this->misc->printVal($rs->fields['name']), $_REQUEST['term']), '</a></li>' . \PHP_EOL;
@@ -721,9 +721,9 @@ class DatabaseController extends BaseController
case 'TRIGGER':
echo '<li>';
$destination = $this->container->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
$destination = $this->container->getDestinationWithLastTab('table');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&table=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&table=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
echo "<a href=\"triggers?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;table=', \urlencode($rs->fields['relname']), '">',
$this->_highlight($this->misc->printVal($rs->fields['name']), $_REQUEST['term']), '</a></li>' . \PHP_EOL;
@@ -731,9 +731,9 @@ class DatabaseController extends BaseController
case 'RULETABLE':
echo '<li>';
$destination = $this->container->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
$destination = $this->container->getDestinationWithLastTab('table');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&table=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&table=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
echo "<a href=\"rules?subject=table&{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;reltype=table&amp;table=',
\urlencode($rs->fields['relname']), '">', $this->_highlight($this->misc->printVal($rs->fields['name']), $_REQUEST['term']), '</a></li>' . \PHP_EOL;
@@ -741,9 +741,9 @@ class DatabaseController extends BaseController
case 'RULEVIEW':
echo '<li>';
$destination = $this->container->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
$destination = $this->container->getDestinationWithLastTab('view');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&view=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&view=", \urlencode($rs->fields['relname']), '&amp;schema=', \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['relname']), '</a>.';
echo "<a href=\"rules?subject=view&{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;reltype=view&amp;view=',
\urlencode($rs->fields['relname']), '">', $this->_highlight($this->misc->printVal($rs->fields['name']), $_REQUEST['term']), '</a></li>' . \PHP_EOL;
@@ -798,7 +798,7 @@ class DatabaseController extends BaseController
case 'OPCLASS':
echo '<li>';
$destination = $this->container->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ echo '<a href="' . \containerInstance()->subFolder . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
echo "<a href=\"opclasses?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">',
$this->_highlight($this->misc->printVal($rs->fields['name']), $_REQUEST['term']), '</a></li>' . \PHP_EOL;
diff --git a/src/controllers/DataexportController.php b/src/controllers/DataexportController.php
index 01fafcb0..e205d562 100644
--- a/src/controllers/DataexportController.php
+++ b/src/controllers/DataexportController.php
@@ -109,7 +109,7 @@ class DataexportController extends BaseController
$this->printMsg($msg);
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/dataexport" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/dataexport" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strformat']}:</th><td><select name=\"d_format\">" . \PHP_EOL;
// COPY and SQL require a table
@@ -243,7 +243,7 @@ class DataexportController extends BaseController
{
$response = $this
->container
- ->responseobj;
+ ->response;
// Make it do a download, if necessary
if ('download' !== $_REQUEST['output']) {
diff --git a/src/controllers/DataimportController.php b/src/controllers/DataimportController.php
index 8d917484..d56f42b4 100644
--- a/src/controllers/DataimportController.php
+++ b/src/controllers/DataimportController.php
@@ -242,6 +242,7 @@ class DataimportController extends BaseController
// Get first line of field names
$fields = \fgetcsv($fd, $csv_max_line, $csv_delimiter);
$row = 2; //We start on the line AFTER the field names
+
while ($line = \fgetcsv($fd, $csv_max_line, $csv_delimiter)) {
// Build value map
$t_fields = [];
diff --git a/src/controllers/DbexportController.php b/src/controllers/DbexportController.php
index 3e095a1e..95c72b07 100644
--- a/src/controllers/DbexportController.php
+++ b/src/controllers/DbexportController.php
@@ -23,7 +23,7 @@ class DbexportController extends BaseController
$response = $this
->container
- ->responseobj;
+ ->response;
// Include application functions
$f_schema = $f_object = '';
diff --git a/src/controllers/DisplayController.php b/src/controllers/DisplayController.php
index cf2fc06e..d95a99a1 100644
--- a/src/controllers/DisplayController.php
+++ b/src/controllers/DisplayController.php
@@ -26,7 +26,7 @@ class DisplayController extends BaseController
\set_time_limit(0);
- $scripts = '<script src="' . self::SUBFOLDER . '/assets/js/display.js" type="text/javascript"></script>';
+ $scripts = '<script src="' . \containerInstance()->subFolder . '/assets/js/display.js" type="text/javascript"></script>';
$scripts .= '<script type="text/javascript">' . \PHP_EOL;
$scripts .= "var Display = {\n";
@@ -52,6 +52,7 @@ class DisplayController extends BaseController
break;
case 'confeditrow':
+ // d($_REQUEST);
$this->formEditRow();
break;
@@ -187,6 +188,7 @@ class DisplayController extends BaseController
try {
$max_pages = 0;
+
// Retrieve page from query. $max_pages is returned by reference.
$resultset = $data->browseQuery(
$type,
@@ -194,7 +196,7 @@ class DisplayController extends BaseController
$query,
$sortkey,
$sortdir,
- $page,
+ (int) ($page ?? 1),
$this->conf['max_rows'],
$max_pages
);
@@ -228,7 +230,7 @@ class DisplayController extends BaseController
$_gets['sortkey'] = $sortkey;
$_gets['sortdir'] = $sortdir;
$_gets['strings'] = $strings;
-
+ // d($_gets);
if ($save_history && \is_object($resultset) && ('QUERY' === $type)) {
//{
$this->misc->saveScriptHistory($_REQUEST['query']);
@@ -472,7 +474,7 @@ class DisplayController extends BaseController
$data = $this->misc->getDatabaseAccessor();
[$actions, $key] = $this->_getKeyAndActions($resultset, $object, $data, $page, $_gets);
-
+ //d($actions['actionbuttons']);
$fkey_information = $this->getFKInfo();
// Show page navigation
$paginator = $this->_printPages($page, $max_pages, $_gets);
@@ -623,7 +625,7 @@ class DisplayController extends BaseController
$fksprops = $this->_getFKProps();
- echo '<form action="' . self::SUBFOLDER . '/src/views/display" method="post" id="ac_form">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/display" method="post" id="ac_form">' . \PHP_EOL;
$elements = 0;
$error = true;
@@ -712,16 +714,21 @@ class DisplayController extends BaseController
}
echo '<input type="hidden" name="action" value="editrow" />' . \PHP_EOL;
+ // d($_REQUEST);
+ // d($this->getAllParams());
echo $this->view->form;
+
+ $subject = $this->getRequestParam('subject', $_REQUEST['subject'] ?? null);
+ $return = $this->getRequestParam('return', $_REQUEST['return'] ?? null);
echo isset($_REQUEST['table']) ? \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL) : '';
- echo isset($_REQUEST['subject']) ? \sprintf('<input type="hidden" name="subject" value="%s" />%s', \htmlspecialchars($_REQUEST['subject']), \PHP_EOL) : '';
+ echo isset($subject) ? \sprintf('<input type="hidden" name="subject" value="%s" />%s', \htmlspecialchars($_REQUEST['subject']), \PHP_EOL) : '';
echo isset($_REQUEST['query']) ? \sprintf('<input type="hidden" name="query" value="%s" />%s', \htmlspecialchars($_REQUEST['query']), \PHP_EOL) : '';
echo isset($_REQUEST['count']) ? \sprintf('<input type="hidden" name="count" value="%s" />%s', \htmlspecialchars($_REQUEST['count']), \PHP_EOL) : '';
- echo isset($_REQUEST['return']) ? \sprintf('<input type="hidden" name="return" value="%s" />%s', \htmlspecialchars($_REQUEST['return']), \PHP_EOL) : '';
+ echo isset($return) ? \sprintf('<input type="hidden" name="return" value="%s" />%s', \htmlspecialchars($_REQUEST['return']), \PHP_EOL) : '';
echo '<input type="hidden" name="page" value="', \htmlspecialchars($_REQUEST['page']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="sortkey" value="', \htmlspecialchars($_REQUEST['sortkey']), '" />' . \PHP_EOL;
@@ -747,7 +754,7 @@ class DisplayController extends BaseController
echo '</p>' . \PHP_EOL;
echo '</form>' . \PHP_EOL;
- echo '<script src="' . self::SUBFOLDER . '/assets/js/insert_or_edit_row.js" type="text/javascript"></script>';
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/insert_or_edit_row.js" type="text/javascript"></script>';
}
/**
@@ -798,7 +805,7 @@ class DisplayController extends BaseController
$resultset = $data->browseRow($_REQUEST['table'], $_REQUEST['key']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/display" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/display" method="post">' . \PHP_EOL;
echo $this->view->form;
if (1 === $resultset->recordCount()) {
@@ -969,9 +976,10 @@ class DisplayController extends BaseController
// Fetch unique row identifier, if this is a table browse request.
if ($object) {
$key = $data->getRowIdentifier($object);
+ // d([$object=>$key]);
}
// -1 means no unique keys, other non iterable should be discarded as well
- if (-1 === $key || \is_iterable($key)) {
+ if (-1 === $key || !\is_iterable($key)) {
$key = [];
}
// Check that the key is actually in the result set. This can occur for select
diff --git a/src/controllers/DomainsController.php b/src/controllers/DomainsController.php
index 48815930..4be8c1cf 100644
--- a/src/controllers/DomainsController.php
+++ b/src/controllers/DomainsController.php
@@ -284,7 +284,7 @@ class DomainsController extends BaseController
}
// Display domain info
- echo '<form action="' . self::SUBFOLDER . '/src/views/domains" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/domains" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\" style=\"width: 70px\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">', $this->misc->printVal($domaindata->fields['domname']), '</td></tr>' . \PHP_EOL;
@@ -336,7 +336,7 @@ class DomainsController extends BaseController
$this->printTitle($this->lang['straddcheck'], 'pg.constraint.check');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/domains" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/domains" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<th class=\"data required\">{$this->lang['strdefinition']}</th></tr>" . \PHP_EOL;
@@ -393,7 +393,7 @@ class DomainsController extends BaseController
$this->misc->printVal($_REQUEST['constraint']),
$this->misc->printVal($_REQUEST['domain'])
), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/domains" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/domains" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="drop_con" />' . \PHP_EOL;
echo '<input type="hidden" name="domain" value="', \htmlspecialchars($_REQUEST['domain']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="constraint" value="', \htmlspecialchars($_REQUEST['constraint']), '" />' . \PHP_EOL;
@@ -560,7 +560,7 @@ class DomainsController extends BaseController
$this->printTitle($this->lang['strdrop'], 'pg.domain.drop');
echo '<p>', \sprintf($this->lang['strconfdropdomain'], $this->misc->printVal($_REQUEST['domain'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/domains" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/domains" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /><label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="domain" value="', \htmlspecialchars($_REQUEST['domain']), '" />' . \PHP_EOL;
@@ -606,7 +606,7 @@ class DomainsController extends BaseController
$this->printTitle($this->lang['strcreatedomain'], 'pg.domain.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/domains" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/domains" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\" style=\"width: 70px\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<td class=\"data1\"><input name=\"domname\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
diff --git a/src/controllers/FulltextController.php b/src/controllers/FulltextController.php
index 3760dd0f..0f13a5ac 100644
--- a/src/controllers/FulltextController.php
+++ b/src/controllers/FulltextController.php
@@ -308,7 +308,7 @@ class FulltextController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropftsconfig'], $this->misc->printVal($_REQUEST['ftscfg'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="dropconfig" />' . \PHP_EOL;
echo '<input type="hidden" name="database" value="', \htmlspecialchars($_REQUEST['database']), '" />' . \PHP_EOL;
@@ -321,7 +321,7 @@ class FulltextController extends BaseController
$status = $data->dropFtsConfiguration($_POST['ftscfg'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strftsconfigdropped']);
} else {
$this->doDefault($this->lang['strftsconfigdroppedbad']);
@@ -339,7 +339,7 @@ class FulltextController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropftsdict'], $this->misc->printVal($_REQUEST['ftsdict'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="dropdict" />' . \PHP_EOL;
echo '<input type="hidden" name="database" value="', \htmlspecialchars($_REQUEST['database']), '" />' . \PHP_EOL;
@@ -354,7 +354,7 @@ class FulltextController extends BaseController
$status = $data->dropFtsDictionary($_POST['ftsdict'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doViewDicts($this->lang['strftsdictdropped']);
} else {
$this->doViewDicts($this->lang['strftsdictdroppedbad']);
@@ -390,7 +390,7 @@ class FulltextController extends BaseController
$this->printTitle($this->lang['strftscreateconfig'], 'pg.ftscfg.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
// conf name
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
@@ -497,7 +497,7 @@ class FulltextController extends BaseController
$status = $data->createFtsConfiguration($_POST['formName'], $formParser, $formTemplate, $_POST['formComment']);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strftsconfigcreated']);
} else {
$this->doCreateConfig($this->lang['strftsconfigcreatedbad']);
@@ -531,7 +531,7 @@ class FulltextController extends BaseController
// Fetch all FTS parsers from the database
$ftsparsers = $data->getFtsParsers();
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>" . \PHP_EOL;
@@ -822,7 +822,7 @@ class FulltextController extends BaseController
$this->printTitle($this->lang['strftscreatedict'], 'pg.ftsdict.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><input name=\"formName\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -936,7 +936,7 @@ class FulltextController extends BaseController
);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doViewDicts($this->lang['strftsdictcreated']);
} else {
$this->doCreateDict($this->lang['strftsdictcreatedbad']);
@@ -966,7 +966,7 @@ class FulltextController extends BaseController
$this->coalesceArr($_POST, 'formName', $_REQUEST['ftsdict']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>" . \PHP_EOL;
@@ -1036,7 +1036,7 @@ class FulltextController extends BaseController
$this->printTrail('ftscfg'); // TODO: proper breadcrumbs
$this->printTitle($this->lang['strdrop'], 'pg.ftscfg.alter');
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
// Case of multiaction drop
if (isset($_REQUEST['ma'])) {
@@ -1096,7 +1096,7 @@ class FulltextController extends BaseController
$this->coalesceArr($_POST, 'ftscfg', $_REQUEST['ftscfg']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>" . \PHP_EOL;
@@ -1199,7 +1199,7 @@ class FulltextController extends BaseController
$mappings = $data->getFtsMappings($_POST['ftscfg']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>" . \PHP_EOL;
echo "\t\t<th class=\"data left required\">{$this->lang['strftsmapping']}</th>" . \PHP_EOL;
diff --git a/src/controllers/FunctionsController.php b/src/controllers/FunctionsController.php
index b5ef9820..bc740da2 100644
--- a/src/controllers/FunctionsController.php
+++ b/src/controllers/FunctionsController.php
@@ -117,7 +117,7 @@ class FunctionsController extends BaseController
'function' => [
'title' => $this->lang['strfunction'],
'field' => Decorator::field('proproto'),
- 'url' => self::SUBFOLDER . "/redirect/function?action=properties&amp;{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/function?action=properties&amp;{$this->misc->href}&amp;",
'vars' => ['function' => 'proproto', 'function_oid' => 'prooid'],
],
'returns' => [
@@ -270,7 +270,7 @@ class FunctionsController extends BaseController
// Jump them to the new function schema
$this->misc->setCurrentSchema($_POST['formFuncSchema']);
// Force a browser reload
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doProperties($this->lang['strfunctionupdated']);
} else {
@@ -331,7 +331,7 @@ class FunctionsController extends BaseController
$args = $fndata->fields['proarguments'];
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/functions" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/functions" method="post">' . \PHP_EOL;
echo '<table style="width: 95%">' . \PHP_EOL;
echo '<tr>' . \PHP_EOL;
echo "<th class=\"data required\">{$this->lang['strschema']}</th>" . \PHP_EOL;
@@ -643,7 +643,7 @@ class FunctionsController extends BaseController
$this->printTabs('function', 'definition');
$this->printTitle($this->lang['strdrop'], 'pg.function.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/functions" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/functions" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
@@ -676,10 +676,19 @@ class FunctionsController extends BaseController
$status = $data->dropFunction($s, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($_POST['function'][$k], \ENT_QUOTES, 'UTF-8'), $this->lang['strfunctiondropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($_POST['function'][$k], \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strfunctiondropped']
+ );
} else {
$data->endTransaction();
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($_POST['function'][$k], \ENT_QUOTES, 'UTF-8'), $this->lang['strfunctiondroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($_POST['function'][$k], \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strfunctiondroppedbad']
+ ));
return;
}
@@ -688,7 +697,7 @@ class FunctionsController extends BaseController
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$this->doDefault($this->lang['strfunctiondroppedbad']);
@@ -697,7 +706,7 @@ class FunctionsController extends BaseController
$status = $data->dropFunction($_POST['function_oid'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strfunctiondropped']);
} else {
$this->doDefault($this->lang['strfunctiondroppedbad']);
@@ -856,12 +865,12 @@ class FunctionsController extends BaseController
$szArgReturns .= '<option value=""></option>';
$szArgReturns .= '<option value="[]">[]</option>';
$szArgReturns .= '</select>';
- $subfolder = self::SUBFOLDER;
+ $subfolder = \containerInstance()->subFolder;
if (!empty($this->conf['theme'])) {
- $szImgPath = self::SUBFOLDER . "/assets/images/themes/{$this->conf['theme']}";
+ $szImgPath = \containerInstance()->subFolder . "/assets/images/themes/{$this->conf['theme']}";
} else {
- $szImgPath = self::SUBFOLDER . '/assets/images/themes/default';
+ $szImgPath = \containerInstance()->subFolder . '/assets/images/themes/default';
}
if (empty($msg)) {
@@ -874,7 +883,7 @@ class FunctionsController extends BaseController
$szJSAddTR .= "<img src=\"{$szImgPath}/AddArguments.png\" alt=\"Add Argument\" /></td>";
$szJSAddTR .= "<td class=\"data3\"><span style=\"font-size: 8pt\">{$this->lang['strargadd']}</span></td></tr></table></td>\n</tr>" . \PHP_EOL;
- echo '<script src="' . self::SUBFOLDER . "/assets/js/functions.js\" type=\"text/javascript\"></script>
+ echo '<script src="' . \containerInstance()->subFolder . "/assets/js/functions.js\" type=\"text/javascript\"></script>
<script type=\"text/javascript\">
//<![CDATA[
var g_types_select = '<select class=\"select2\" name=\"formArgType[]\">{$szTypes}</select>{$szArgReturns}';
@@ -891,7 +900,7 @@ class FunctionsController extends BaseController
//]]>
</script>
";
- echo '<form action="' . self::SUBFOLDER . '/src/views/functions" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/functions" method="post">' . \PHP_EOL;
echo '<table><tbody id="args_table">' . \PHP_EOL;
echo "<tr><th class=\"data required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<th class=\"data required\" colspan=\"2\">{$this->lang['strreturns']}</th>" . \PHP_EOL;
@@ -990,14 +999,14 @@ class FunctionsController extends BaseController
$szJS = '';
- echo '<script src="' . self::SUBFOLDER . '/assets/js/functions.js" type="text/javascript"></script>';
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/functions.js" type="text/javascript"></script>';
echo '<script type="text/javascript">' . $this->_buildJSData() . '</script>';
if (!empty($_POST['formArgName'])) {
$szJS = $this->_buildJSRows($this->_buildFunctionArguments($_POST));
} else {
- $subfolder = self::SUBFOLDER;
- $szJS = '<script type="text/javascript" src="' . self::SUBFOLDER . '/assets/js/functions.js">noArgsRebuild(addArg("' . $subfolder . '"));</script>';
+ $subfolder = \containerInstance()->subFolder;
+ $szJS = '<script type="text/javascript" src="' . \containerInstance()->subFolder . '/assets/js/functions.js">noArgsRebuild(addArg("' . $subfolder . '"));</script>';
}
$cost = (isset($_POST['formCost'])) ? $_POST['formCost'] : null;
@@ -1250,7 +1259,7 @@ class FunctionsController extends BaseController
$bArgIsArray = 'true';
}
$arrayProperArgs[] = [$szMode, $szArgName, $szArgType, $bArgIsArray];
- $subfolder = self::SUBFOLDER;
+ $subfolder = \containerInstance()->subFolder;
$szReturn .= '<script type="text/javascript">';
$szReturn .= "RebuildArgTR('{$szMode}','{$szArgName}','{$szArgType}',new Boolean({$bArgIsArray},{$subfolder}));";
$szReturn .= '</script>;';
diff --git a/src/controllers/GroupsController.php b/src/controllers/GroupsController.php
index f748d162..0f88d4b8 100644
--- a/src/controllers/GroupsController.php
+++ b/src/controllers/GroupsController.php
@@ -180,7 +180,7 @@ class GroupsController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropmember'], $this->misc->printVal($_REQUEST['user']), $this->misc->printVal($_REQUEST['group'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/groups" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/groups" method="post">' . \PHP_EOL;
echo $this->view->form;
echo '<input type="hidden" name="action" value="drop_member" />' . \PHP_EOL;
echo '<input type="hidden" name="group" value="', \htmlspecialchars($_REQUEST['group']), '" />' . \PHP_EOL;
@@ -248,7 +248,7 @@ class GroupsController extends BaseController
}
// Display form for adding a user to the group
- echo '<form action="' . self::SUBFOLDER . '/src/views/groups" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/groups" method="post">' . \PHP_EOL;
echo '<select name="user">';
while (!$users->EOF) {
@@ -292,7 +292,7 @@ class GroupsController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropgroup'], $this->misc->printVal($_REQUEST['group'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/groups" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/groups" method="post">' . \PHP_EOL;
echo $this->view->form;
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="group" value="', \htmlspecialchars($_REQUEST['group']), '" />' . \PHP_EOL;
diff --git a/src/controllers/HistoryController.php b/src/controllers/HistoryController.php
index f26d08b5..d985f3e4 100644
--- a/src/controllers/HistoryController.php
+++ b/src/controllers/HistoryController.php
@@ -75,7 +75,7 @@ class HistoryController extends BaseController
// Bring to the front always
echo '<body onload="window.focus();">' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/history" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/history" method="post">' . \PHP_EOL;
$this->printConnection('history');
echo '</form><br />';
@@ -88,7 +88,6 @@ class HistoryController extends BaseController
if (isset($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']])) {
$history = new \PHPPgAdmin\ArrayRecordSet($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']]);
- //Kint::dump($history);
$columns = [
'query' => [
'title' => $this->lang['strsql'],
@@ -200,7 +199,7 @@ class HistoryController extends BaseController
echo "<p>{$this->lang['strconfdelhistory']}</p>" . \PHP_EOL;
echo '<pre>', \htmlentities($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']][$qid]['query'], \ENT_QUOTES, 'UTF-8'), '</pre>';
- echo '<form action="' . self::SUBFOLDER . '/src/views/history" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/history" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="delhistory" />' . \PHP_EOL;
echo "<input type=\"hidden\" name=\"queryid\" value=\"{$qid}\" />" . \PHP_EOL;
echo $this->view->form;
@@ -223,7 +222,7 @@ class HistoryController extends BaseController
echo "<h3>{$this->lang['strclearhistory']}</h3>" . \PHP_EOL;
echo "<p>{$this->lang['strconfclearhistory']}</p>" . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/history" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/history" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="clearhistory" />' . \PHP_EOL;
echo $this->view->form;
echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL;
diff --git a/src/controllers/IndexesController.php b/src/controllers/IndexesController.php
index c7134d6e..2bdfd9b8 100644
--- a/src/controllers/IndexesController.php
+++ b/src/controllers/IndexesController.php
@@ -15,7 +15,7 @@ class IndexesController extends BaseController
{
public $controller_title = 'strindexes';
- public $scripts = '<script src="' . self::SUBFOLDER . '/assets/js/indexes.js" type="text/javascript"></script>';
+ public $scripts = '<script src="/assets/js/indexes.js" type="text/javascript"></script>';
/**
* Default method to render the controller according to the action parameter.
@@ -25,7 +25,7 @@ class IndexesController extends BaseController
if ('tree' === $this->action) {
return $this->doTree();
}
-
+ $this->scripts = '<script src="' . \containerInstance()->subFolder . '/assets/js/indexes.js" type="text/javascript"></script>';
$this->printHeader($this->headerTitle(), $this->scripts);
$onloadInit = false;
@@ -144,7 +144,7 @@ class IndexesController extends BaseController
],
];
- $url = self::SUBFOLDER . '/src/views/indexes';
+ $url = \containerInstance()->subFolder . '/src/views/indexes';
$actions = [
'cluster' => [
@@ -268,7 +268,7 @@ class IndexesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfcluster'], $this->misc->printVal($_REQUEST['index'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/indexes" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/indexes" method="post">' . \PHP_EOL;
echo '<p><input type="checkbox" id="analyze" name="analyze"', (isset($_REQUEST['analyze']) ? ' checked="checked"' : ''), ' />';
echo "<label for=\"analyze\">{$this->lang['stranalyze']}</label></p>" . \PHP_EOL;
echo '<input type="hidden" name="action" value="cluster_index" />' . \PHP_EOL;
@@ -503,7 +503,7 @@ class IndexesController extends BaseController
$this->printTitle($this->lang['strdrop'], 'pg.index.drop');
echo '<p>', \sprintf($this->lang['strconfdropindex'], $this->misc->printVal($this->getRequestParam('index'))), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/indexes" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/indexes" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="drop_index" />' . \PHP_EOL;
echo '<input type="hidden" name="table" value="', \htmlspecialchars($object), '" />' . \PHP_EOL;
echo '<input type="hidden" name="index" value="', \htmlspecialchars($this->getRequestParam('index')), '" />' . \PHP_EOL;
diff --git a/src/controllers/IntroController.php b/src/controllers/IntroController.php
index 3f30a3ee..31d28215 100644
--- a/src/controllers/IntroController.php
+++ b/src/controllers/IntroController.php
@@ -18,14 +18,10 @@ class IntroController extends BaseController
*/
public function render()
{
- if (null === \requestInstance()->getAttribute('route')) {
- echo $this->doDefault();
- } else {
- $body = \responseInstance()->getBody();
- $body->write($this->doDefault());
+ $body = \responseInstance()->getBody();
+ $body->write($this->doDefault());
- return \responseInstance();
- }
+ return \responseInstance();
}
/**
@@ -89,7 +85,7 @@ class IntroController extends BaseController
$intro_html .= '</ul>';
if (\requestInstance()->getQueryParam('language')) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$intro_html .= $this->printFooter(false);
diff --git a/src/controllers/LoginController.php b/src/controllers/LoginController.php
index fe7e40ec..770be030 100644
--- a/src/controllers/LoginController.php
+++ b/src/controllers/LoginController.php
@@ -96,7 +96,7 @@ class LoginController extends BaseController
$login_html .= $this->printMsg($msg, false);
}
- $login_html .= '<form id="login_form" method="post" name="login_form" action="' . self::SUBFOLDER . '/redirect/server?server=' . \htmlspecialchars($server_id) . '">';
+ $login_html .= '<form id="login_form" method="post" name="login_form" action="' . \containerInstance()->subFolder . '/redirect/server?server=' . \htmlspecialchars($server_id) . '">';
$md5_server = \md5($server_id);
// Pass request vars through form (is this a security risk???)
diff --git a/src/controllers/MaterializedviewpropertiesController.php b/src/controllers/MaterializedviewpropertiesController.php
index 2a4429dd..d3a4126d 100644
--- a/src/controllers/MaterializedviewpropertiesController.php
+++ b/src/controllers/MaterializedviewpropertiesController.php
@@ -150,7 +150,7 @@ class MaterializedviewpropertiesController extends BaseController
$_POST['formComment'] = $viewdata->fields['relcomment'];
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
echo '<table style="width: 100%">' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strdefinition']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><textarea style=\"width: 100%;\" rows=\"20\" cols=\"50\" name=\"formDefinition\">",
@@ -187,7 +187,7 @@ class MaterializedviewpropertiesController extends BaseController
$this->printTitle($this->lang['stralter'], 'pg.column.alter');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
// Output matview header
echo '<table>' . \PHP_EOL;
@@ -285,7 +285,7 @@ class MaterializedviewpropertiesController extends BaseController
$this->coalesceArr($_POST, 'comment', $matview->fields['relcomment']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">';
@@ -351,13 +351,13 @@ class MaterializedviewpropertiesController extends BaseController
// Jump them to the new matview name
$_REQUEST[$this->subject] = $_POST['name'];
// Force a browser reload
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
// If schema has changed, need to change to the new schema and reload the browser
if (!empty($_POST['newschema']) && ($_POST['newschema'] !== $data->_schema)) {
// Jump them to the new sequence schema
$this->misc->setCurrentSchema($_POST['newschema']);
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doDefault($this->lang['strviewaltered']);
} else {
diff --git a/src/controllers/MaterializedviewsController.php b/src/controllers/MaterializedviewsController.php
index 2d765e4e..35b00836 100644
--- a/src/controllers/MaterializedviewsController.php
+++ b/src/controllers/MaterializedviewsController.php
@@ -124,7 +124,7 @@ class MaterializedviewsController extends BaseController
$this->keystring => [
'title' => 'M ' . $this->lang['strview'],
'field' => Decorator::field('relname'),
- 'url' => self::SUBFOLDER . "/redirect/matview?{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/matview?{$this->misc->href}&amp;",
'vars' => [$this->keystring => 'relname'],
],
'owner' => [
@@ -281,7 +281,7 @@ class MaterializedviewsController extends BaseController
$this->printTrail('getTrail');
$this->printTitle($this->lang['strdrop'], 'pg.matview.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/materializedviews" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/materializedviews" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
@@ -312,10 +312,19 @@ class MaterializedviewsController extends BaseController
$status = $data->dropView($s, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strviewdropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strviewdropped']
+ );
} else {
$data->endTransaction();
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strviewdroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strviewdroppedbad']
+ ));
return;
}
@@ -324,7 +333,7 @@ class MaterializedviewsController extends BaseController
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$this->doDefault($this->lang['strviewdroppedbad']);
@@ -333,7 +342,7 @@ class MaterializedviewsController extends BaseController
$status = $data->dropView($_POST['view'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strviewdropped']);
} else {
$this->doDefault($this->lang['strviewdroppedbad']);
@@ -403,7 +412,7 @@ class MaterializedviewsController extends BaseController
$this->printTitle($this->lang['strcreateview'], 'pg.matview.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$this->view_name}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$this->view_name}\" method=\"post\">" . \PHP_EOL;
echo '<table style="width: 100%">' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t<td class=\"data1\"><input name=\"formView\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -438,7 +447,7 @@ class MaterializedviewsController extends BaseController
$status = $data->createView($_POST['formView'], $_POST['formDefinition'], false, $_POST['formComment'], true);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strviewcreated']);
} else {
$this->doCreate($this->lang['strviewcreatedbad']);
diff --git a/src/controllers/OperatorsController.php b/src/controllers/OperatorsController.php
index baa78c46..602fbaaf 100644
--- a/src/controllers/OperatorsController.php
+++ b/src/controllers/OperatorsController.php
@@ -256,7 +256,7 @@ class OperatorsController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropoperator'], $this->misc->printVal($_REQUEST['operator'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/operators" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/operators" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="operator" value="', \htmlspecialchars($_REQUEST['operator']), '" />' . \PHP_EOL;
diff --git a/src/controllers/PrivilegesController.php b/src/controllers/PrivilegesController.php
index 028d940f..18c6dc96 100644
--- a/src/controllers/PrivilegesController.php
+++ b/src/controllers/PrivilegesController.php
@@ -79,7 +79,7 @@ class PrivilegesController extends BaseController
$this->printMsg($msg);
if (!isset($data->privlist[$subject])) {
- $this->halt('No privileges defined for subject ' . $subject);
+ $this->container->halt('No privileges defined for subject ' . $subject);
return;
}
@@ -316,7 +316,7 @@ class PrivilegesController extends BaseController
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/privileges" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/privileges" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left\">{$this->lang['strusers']}</th>" . \PHP_EOL;
echo '<td class="data1"><select name="username[]" multiple="multiple" size="', \min(6, $users->recordCount()), '">' . \PHP_EOL;
diff --git a/src/controllers/RolesController.php b/src/controllers/RolesController.php
index 2fea45c9..653db4c1 100644
--- a/src/controllers/RolesController.php
+++ b/src/controllers/RolesController.php
@@ -116,7 +116,7 @@ class RolesController extends BaseController
'role' => [
'title' => $this->lang['strrole'],
'field' => Decorator::field('rolname'),
- 'url' => self::SUBFOLDER . "/redirect/role?action=properties&amp;{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/role?action=properties&amp;{$this->misc->href}&amp;",
'vars' => ['rolename' => 'rolname'],
],
'group' => [
@@ -240,7 +240,7 @@ class RolesController extends BaseController
$this->printTitle($this->lang['strcreaterole'], 'pg.role.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/roles" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/roles" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\" style=\"width: 130px\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"{$data->_maxNameLen}\" name=\"formRolename\" value=\"", \htmlspecialchars($_POST['formRolename']), "\" /></td>\n\t</tr>" . \PHP_EOL;
@@ -393,7 +393,7 @@ class RolesController extends BaseController
$this->_adjustPostVars($roledata, $canRename);
- echo '<form action="' . self::SUBFOLDER . '/src/views/roles" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/roles" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left\" style=\"width: 130px\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"formNewRoleName\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"" . \htmlspecialchars($_POST['formNewRoleName']) . '" />' : $this->misc->printVal($roledata->fields['rolname'])), "</td>\n\t</tr>" . \PHP_EOL;
@@ -535,7 +535,7 @@ class RolesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdroprole'], $this->misc->printVal($_REQUEST['rolename'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/roles" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/roles" method="post">' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="rolename" value="', \htmlspecialchars($_REQUEST['rolename']), '" />' . \PHP_EOL;
echo $this->view->form;
@@ -762,7 +762,7 @@ class RolesController extends BaseController
$this->coalesceArr($_POST, 'confirm', '');
- echo '<form action="' . self::SUBFOLDER . '/src/views/roles" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/roles" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strpassword']}</th>" . \PHP_EOL;
echo "\t\t<td><input type=\"password\" name=\"password\" size=\"32\" value=\"",
diff --git a/src/controllers/RulesController.php b/src/controllers/RulesController.php
index 41515c60..5975b5af 100644
--- a/src/controllers/RulesController.php
+++ b/src/controllers/RulesController.php
@@ -170,7 +170,7 @@ class RulesController extends BaseController
$this->printTitle($this->lang['strcreaterule'], 'pg.rule.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/rules" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/rules" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<td class=\"data1\"><input name=\"name\" size=\"16\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -248,7 +248,7 @@ class RulesController extends BaseController
$this->misc->printVal($_REQUEST[$_REQUEST['reltype']])
), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/rules" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/rules" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="subject" value="', \htmlspecialchars($_REQUEST['reltype']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="', \htmlspecialchars($_REQUEST['reltype']),
diff --git a/src/controllers/SchemasController.php b/src/controllers/SchemasController.php
index b1b06fa0..f9fc577c 100644
--- a/src/controllers/SchemasController.php
+++ b/src/controllers/SchemasController.php
@@ -106,7 +106,7 @@ class SchemasController extends BaseController
'schema' => [
'title' => $this->lang['strschema'],
'field' => Decorator::field('nspname'),
- 'url' => self::SUBFOLDER . "{$destination}&amp;",
+ 'url' => \containerInstance()->subFolder . "{$destination}&amp;",
'vars' => ['schema' => 'nspname'],
],
'owner' => [
@@ -280,7 +280,7 @@ class SchemasController extends BaseController
$this->printTitle($this->lang['strcreateschema'], 'pg.schema.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/schemas" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/schemas" method="post">' . \PHP_EOL;
echo '<table style="width: 100%">' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><input name=\"formName\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -325,7 +325,7 @@ class SchemasController extends BaseController
$status = $data->createSchema($_POST['formName'], $_POST['formAuth'], $_POST['formComment']);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strschemacreated']);
} else {
$this->doCreate($this->lang['strschemacreatedbad']);
@@ -358,7 +358,7 @@ class SchemasController extends BaseController
$this->coalesceArr($_POST, 'owner', $schema->fields['ownername']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/schemas" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/schemas" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>" . \PHP_EOL;
@@ -413,7 +413,7 @@ class SchemasController extends BaseController
$status = $data->updateSchema($_POST['schema'], $_POST['comment'], $_POST['name'], $_POST['owner']);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strschemaaltered']);
} else {
$this->doAlter($this->lang['strschemaalteredbad']);
@@ -437,7 +437,7 @@ class SchemasController extends BaseController
$this->printTrail('schema');
$this->printTitle($this->lang['strdrop'], 'pg.schema.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/schemas" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/schemas" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
foreach ($_REQUEST['ma'] as $v) {
@@ -467,10 +467,19 @@ class SchemasController extends BaseController
$status = $data->dropSchema($s, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strschemadropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strschemadropped']
+ );
} else {
$data->endTransaction();
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strschemadroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strschemadroppedbad']
+ ));
return;
}
@@ -479,7 +488,7 @@ class SchemasController extends BaseController
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$this->doDefault($this->lang['strschemadroppedbad']);
@@ -488,7 +497,7 @@ class SchemasController extends BaseController
$status = $data->dropSchema($_POST['nsp'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strschemadropped']);
} else {
$this->doDefault($this->lang['strschemadroppedbad']);
diff --git a/src/controllers/SequencesController.php b/src/controllers/SequencesController.php
index a0708406..8b123395 100644
--- a/src/controllers/SequencesController.php
+++ b/src/controllers/SequencesController.php
@@ -407,7 +407,7 @@ class SequencesController extends BaseController
$this->printTitle($this->lang['strdrop'], 'pg.sequence.drop');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/sequences" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/sequences" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
@@ -437,10 +437,19 @@ class SequencesController extends BaseController
$status = $data->dropSequence($s, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strsequencedropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strsequencedropped']
+ );
} else {
$data->endTransaction();
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strsequencedroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strsequencedroppedbad']
+ ));
return;
}
@@ -449,7 +458,7 @@ class SequencesController extends BaseController
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$this->doDefault($this->lang['strsequencedroppedbad']);
@@ -458,7 +467,7 @@ class SequencesController extends BaseController
$status = $data->dropSequence($_POST['sequence'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strsequencedropped']);
} else {
$this->doDrop(true, $this->lang['strsequencedroppedbad']);
@@ -492,7 +501,7 @@ class SequencesController extends BaseController
$this->printTitle($this->lang['strcreatesequence'], 'pg.sequence.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/sequences" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/sequences" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
@@ -648,7 +657,7 @@ class SequencesController extends BaseController
$sequence = $data->getSequence($_REQUEST['sequence']);
if (\is_object($sequence) && 0 < $sequence->recordCount()) {
- echo '<form action="' . self::SUBFOLDER . '/src/views/sequences" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/sequences" method="post">' . \PHP_EOL;
echo '<table border="0">';
echo "<tr><th class=\"data left required\">{$this->lang['strlastvalue']}</th>" . \PHP_EOL;
echo '<td class="data1">';
@@ -712,13 +721,13 @@ class SequencesController extends BaseController
// Jump them to the new view name
$_REQUEST['sequence'] = $_POST['name'];
// Force a browser reload
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
if (!empty($_POST['newschema']) && ($_POST['newschema'] !== $data->_schema)) {
// Jump them to the new sequence schema
$this->misc->setCurrentSchema($_POST['newschema']);
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doProperties($this->lang['strsequencealtered']);
} else {
@@ -758,7 +767,7 @@ class SequencesController extends BaseController
$_POST['formCycledValue'] = 'on';
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/sequences" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/sequences" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
diff --git a/src/controllers/ServersController.php b/src/controllers/ServersController.php
index a2f32301..c02645d3 100644
--- a/src/controllers/ServersController.php
+++ b/src/controllers/ServersController.php
@@ -105,7 +105,7 @@ class ServersController extends BaseController
'server' => [
'title' => $this->lang['strserver'],
'field' => Decorator::field('desc'),
- 'url' => self::SUBFOLDER . '/redirect/server?',
+ 'url' => \containerInstance()->subFolder . '/redirect/server?',
'vars' => ['server' => 'sha'],
],
'host' => [
@@ -133,13 +133,13 @@ class ServersController extends BaseController
'url' => 'servers',
'urlvars' => [
'action' => 'logout',
- 'logoutServer' => Decorator::field('id'),
+ 'logoutServer' => Decorator::field('sha'),
],
],
],
],
];
-
+ //\sha1("{$server_info['host']}:{$server_info['port']}:{$server_info['sslmode']}")
$svPre = static function (&$rowdata) use ($actions) {
$actions['logout']['disable'] = empty($rowdata->fields['username']);
@@ -200,7 +200,7 @@ class ServersController extends BaseController
unset($_SESSION['sharedUsername'], $_SESSION['sharedPassword']);
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
echo \sprintf($this->lang['strlogoutmsg'], $server_info['desc']);
}
diff --git a/src/controllers/SqlController.php b/src/controllers/SqlController.php
index 59168e44..ca691edd 100644
--- a/src/controllers/SqlController.php
+++ b/src/controllers/SqlController.php
@@ -186,6 +186,9 @@ class SqlController extends BaseController
$data->conn->setFetchMode(\ADODB_FETCH_NUM);
\set_time_limit(25000);
+ /**
+ * @var \ADORecordSet
+ */
$rs = $data->conn->Execute($this->query);
echo '<form method="post" id="sqlform" action="' . $_SERVER['REQUEST_URI'] . '">';
@@ -260,7 +263,7 @@ class SqlController extends BaseController
}
// Reload the browser as we may have made schema changes
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
// Display duration if we know it
if (null !== $this->duration) {
diff --git a/src/controllers/SqleditController.php b/src/controllers/SqleditController.php
index 9b4b2085..3a6a62c9 100644
--- a/src/controllers/SqleditController.php
+++ b/src/controllers/SqleditController.php
@@ -68,7 +68,7 @@ class SqleditController extends BaseController
$default_html = $this->printTabs('popup', 'sql', false);
- $default_html .= '<form action="' . self::SUBFOLDER . '/src/views/sql" method="post" enctype="multipart/form-data" class="sqlform" id="sqlform" target="detail">';
+ $default_html .= '<form action="' . \containerInstance()->subFolder . '/src/views/sql" method="post" enctype="multipart/form-data" class="sqlform" id="sqlform" target="detail">';
$default_html .= \PHP_EOL;
$default_html .= $this->printConnection('sql', false);
diff --git a/src/controllers/TablesController.php b/src/controllers/TablesController.php
index 7888b709..3acc3853 100644
--- a/src/controllers/TablesController.php
+++ b/src/controllers/TablesController.php
@@ -157,8 +157,6 @@ class TablesController extends BaseController
$actions = $this->_getActions();
- //\Kint::dump($tables);
-
echo $this->printTable($tables, $columns, $actions, $this->table_place, $this->lang['strnotables']);
$attr = [
'href' => [
@@ -197,7 +195,7 @@ class TablesController extends BaseController
return $this
->container
- ->responseobj
+ ->response
->withStatus(200)
->withJson($all_tables);
}
@@ -262,7 +260,7 @@ class TablesController extends BaseController
*
* @param mixed $msg
*/
- public function doCreate($msg = '')
+ public function doCreate($msg = ''): void
{
$data = $this->misc->getDatabaseAccessor();
@@ -296,7 +294,7 @@ class TablesController extends BaseController
$this->printTitle($this->lang['strcreatetable'], 'pg.table.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/' . $this->script . '" method="post">';
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/' . $this->script . '" method="post">';
echo \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
@@ -368,8 +366,8 @@ class TablesController extends BaseController
$this->printTitle($this->lang['strcreatetable'], 'pg.table.create');
$this->printMsg($msg);
- echo '<script src="' . self::SUBFOLDER . '/assets/js/tables.js" type="text/javascript"></script>';
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/tables.js" type="text/javascript"></script>';
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
// Output table header
echo '<table>' . \PHP_EOL;
@@ -427,6 +425,7 @@ class TablesController extends BaseController
// only define js types array once
$predefined_size_types = \array_intersect($data->predefined_size_types, \array_keys($types_for_js));
$escaped_predef_types = []; // the JS escaped array elements
+
foreach ($predefined_size_types as $value) {
$escaped_predef_types[] = "'{$value}'";
}
@@ -524,9 +523,11 @@ class TablesController extends BaseController
);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
+
+ $this->doDefault($this->lang['strtablecreated']);
- return $this->doDefault($this->lang['strtablecreated']);
+ return;
}
if (-1 === $status) {
@@ -555,7 +556,7 @@ class TablesController extends BaseController
* @param mixed $confirm
* @param mixed $msg
*/
- public function doCreateLike($confirm, $msg = '')
+ public function doCreateLike($confirm, $msg = ''): void
{
$data = $this->misc->getDatabaseAccessor();
@@ -588,7 +589,7 @@ class TablesController extends BaseController
unset($tbltmp);
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
echo "<table>\n\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", \htmlspecialchars($_REQUEST['name']), "\" /></td>\n\t</tr>" . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strcreatetablelikeparent']}</th>" . \PHP_EOL;
@@ -662,9 +663,11 @@ class TablesController extends BaseController
);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
+
+ $this->doDefault($this->lang['strtablecreated']);
- return $this->doDefault($this->lang['strtablecreated']);
+ return;
}
$this->doCreateLike(false, $this->lang['strtablecreatedbad']);
@@ -689,7 +692,7 @@ class TablesController extends BaseController
$attrs = $data->getTableAttributes($_REQUEST['table']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/display" method="post" id="selectform">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/display" method="post" id="selectform">' . \PHP_EOL;
if (0 < $attrs->recordCount()) {
// JavaScript for select all feature
@@ -827,7 +830,7 @@ class TablesController extends BaseController
$this->coalesceArr($_REQUEST, 'nulls', []);
$this->coalesceArr($_REQUEST, 'format', []);
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post" id="ac_form">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post" id="ac_form">' . \PHP_EOL;
if (0 < $attrs->recordCount()) {
echo '<table>' . \PHP_EOL;
@@ -937,7 +940,6 @@ class TablesController extends BaseController
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo "<p><input type=\"submit\" name=\"insert\" value=\"{$this->lang['strinsert']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"insertandrepeat\" accesskey=\"r\" value=\"{$this->lang['strinsertandrepeat']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
if (false !== $fksprops) {
if ('default off' !== $this->conf['autocomplete']) {
@@ -949,11 +951,11 @@ class TablesController extends BaseController
echo '</p>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnofieldsforinsert']}</p>" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
}
echo $this->view->form;
echo '</form>' . \PHP_EOL;
- echo '<script src="' . self::SUBFOLDER . '/assets/js/insert_or_edit_row.js" type="text/javascript"></script>';
+ echo \sprintf('<button class="btn btn-mini btn_back" style="float: right; margin-right: 4em; margin-top: -3em;">%s</button>%s', $this->lang['strcancel'], \PHP_EOL);
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/insert_or_edit_row.js" type="text/javascript"></script>';
}
/**
@@ -974,7 +976,9 @@ class TablesController extends BaseController
if (0 === $status) {
if (isset($_POST['insert'])) {
- return $this->doDefault($this->lang['strrowinserted']);
+ $this->doDefault($this->lang['strrowinserted']);
+
+ return;
}
$_REQUEST['values'] = [];
$_REQUEST['nulls'] = [];
@@ -993,12 +997,14 @@ class TablesController extends BaseController
*
* @param mixed $confirm
*/
- public function doEmpty($confirm)
+ public function doEmpty($confirm): void
{
$data = $this->misc->getDatabaseAccessor();
if (empty($_REQUEST['table']) && empty($_REQUEST['ma'])) {
- return $this->doDefault($this->lang['strspecifytabletoempty']);
+ $this->doDefault($this->lang['strspecifytabletoempty']);
+
+ return;
}
if ($confirm) {
@@ -1006,7 +1012,7 @@ class TablesController extends BaseController
$this->printTrail('schema');
$this->printTitle($this->lang['strempty'], 'pg.table.empty');
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
@@ -1021,7 +1027,7 @@ class TablesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfemptytable'], $this->misc->printVal($_REQUEST['table'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
// END not mutli empty
@@ -1041,9 +1047,18 @@ class TablesController extends BaseController
if (0 === $status) {
$msg .= \sprintf('%s<br />', $sql);
- $msg .= \sprintf('%s: %s<br />', \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strtableemptied']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strtableemptied']
+ );
} else {
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strtableemptiedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strtableemptiedbad']
+ ));
return;
}
@@ -1054,12 +1069,16 @@ class TablesController extends BaseController
if (0 === $status) {
$msg .= \sprintf('%s<br />', $sql);
- $msg .= \sprintf('%s: %s<br />', \htmlentities($_POST['table'], \ENT_QUOTES, 'UTF-8'), $this->lang['strtableemptied']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($_POST['table'], \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strtableemptied']
+ );
- return $this->doDefault($msg);
+ $this->doDefault($msg);
}
- return $this->doDefault($sql . '<br>' . $this->lang['strtableemptiedbad']);
+ $this->doDefault($sql . '<br>' . $this->lang['strtableemptiedbad']);
// END not mutli empty
}
// END do Empty
@@ -1071,12 +1090,14 @@ class TablesController extends BaseController
*
* @param mixed $confirm
*/
- public function doDrop($confirm)
+ public function doDrop($confirm): void
{
$data = $this->misc->getDatabaseAccessor();
if (empty($_REQUEST['table']) && empty($_REQUEST['ma'])) {
- return $this->doDefault($this->lang['strspecifytabletodrop']);
+ $this->doDefault($this->lang['strspecifytabletodrop']);
+
+ return;
}
if ($confirm) {
@@ -1085,7 +1106,7 @@ class TablesController extends BaseController
$this->printTrail('schema');
$this->printTitle($this->lang['strdrop'], 'pg.table.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
@@ -1098,7 +1119,7 @@ class TablesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdroptable'], $this->misc->printVal($_REQUEST['table'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
// END if multi drop
}
@@ -1120,33 +1141,52 @@ class TablesController extends BaseController
$status = $data->dropTable($t, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strtabledropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strtabledropped']
+ );
} else {
$data->endTransaction();
- return $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strtabledroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strtabledroppedbad']
+ ));
+
+ return;
}
}
}
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
+
+ $this->doDefault($msg);
- return $this->doDefault($msg);
+ return;
}
- return $this->doDefault($this->lang['strtabledroppedbad']);
+ $this->doDefault($this->lang['strtabledroppedbad']);
+
+ return;
}
$status = $data->dropTable($_POST['table'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
+
+ $this->doDefault($this->lang['strtabledropped']);
- return $this->doDefault($this->lang['strtabledropped']);
+ return;
}
- return $this->doDefault($this->lang['strtabledroppedbad']);
+ $this->doDefault($this->lang['strtabledroppedbad']);
+
+ return;
// END DROP
}
}
@@ -1157,7 +1197,7 @@ class TablesController extends BaseController
'table' => [
'title' => $this->lang['strtable'],
'field' => Decorator::field('relname'),
- 'url' => self::SUBFOLDER . "/redirect/table?{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/table?{$this->misc->href}&amp;",
'vars' => ['table' => 'relname'],
],
'owner' => [
diff --git a/src/controllers/TablespacesController.php b/src/controllers/TablespacesController.php
index d14ad956..85a0cfbb 100644
--- a/src/controllers/TablespacesController.php
+++ b/src/controllers/TablespacesController.php
@@ -188,7 +188,7 @@ class TablespacesController extends BaseController
$this->coalesceArr($_POST, 'comment', ($data->hasSharedComments()) ? $tablespace->fields['spccomment'] : '');
- echo '<form action="' . self::SUBFOLDER . '/src/views/tablespaces" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tablespaces" method="post">' . \PHP_EOL;
echo $this->view->form;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
@@ -264,7 +264,7 @@ class TablespacesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdroptablespace'], $this->misc->printVal($_REQUEST['tablespace'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/tablespaces" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tablespaces" method="post">' . \PHP_EOL;
echo $this->view->form;
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="tablespace" value="', \htmlspecialchars($_REQUEST['tablespace']), '" />' . \PHP_EOL;
@@ -308,7 +308,7 @@ class TablespacesController extends BaseController
$this->printTitle($this->lang['strcreatetablespace'], 'pg.tablespace.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/tablespaces" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tablespaces" method="post">' . \PHP_EOL;
echo $this->view->form;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
diff --git a/src/controllers/TblpropertiesController.php b/src/controllers/TblpropertiesController.php
index 81f0db2b..254c09d3 100644
--- a/src/controllers/TblpropertiesController.php
+++ b/src/controllers/TblpropertiesController.php
@@ -306,13 +306,13 @@ class TblpropertiesController extends BaseController
// Jump them to the new table name
$_REQUEST['table'] = $_POST['name'];
// Force a browser reload
- $misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
// If schema has changed, need to change to the new schema and reload the browser
if (!empty($_POST['newschema']) && ($_POST['newschema'] !== $data->_schema)) {
// Jump them to the new sequence schema
$misc->setCurrentSchema($_POST['newschema']);
- $misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doDefault($this->lang['strtablealtered']);
} else {
@@ -357,7 +357,7 @@ class TblpropertiesController extends BaseController
$_POST['tablespace'] = $table->fields['tablespace'];
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/tblproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tblproperties" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">';
@@ -482,7 +482,7 @@ class TblpropertiesController extends BaseController
$max_size = $misc->inisizeToBytes(\ini_get('upload_max_filesize'));
if (\is_float($max_size) && 0 < $max_size) {
- echo '<form action="' . self::SUBFOLDER . '/src/views/dataimport" method="post" enctype="multipart/form-data">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/dataimport" method="post" enctype="multipart/form-data">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strformat']}</th>" . \PHP_EOL;
echo "\t\t<td><select name=\"format\">" . \PHP_EOL;
@@ -545,8 +545,8 @@ class TblpropertiesController extends BaseController
$this->printTitle($this->lang['straddcolumn'], 'pg.column.add');
$this->printMsg($msg);
- echo '<script src="' . self::SUBFOLDER . '/assets/js/tables.js" type="text/javascript"></script>';
- echo '<form action="' . self::SUBFOLDER . '/src/views/tblproperties" method="post">' . \PHP_EOL;
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/tables.js" type="text/javascript"></script>';
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tblproperties" method="post">' . \PHP_EOL;
// Output table header
echo '<table>' . \PHP_EOL;
@@ -592,6 +592,7 @@ class TblpropertiesController extends BaseController
echo '</select></td>' . \PHP_EOL;
$predefined_size_types = \array_intersect($data->predefined_size_types, $types_for_js);
$escaped_predef_types = []; // the JS escaped array elements
+
foreach ($predefined_size_types as $value) {
$escaped_predef_types[] = "'{$value}'";
}
@@ -648,7 +649,7 @@ class TblpropertiesController extends BaseController
);
if (0 === $status) {
- $misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault(\sprintf('%s %s %s', $sql, \PHP_EOL, $this->lang['strcolumnadded']));
} else {
$_REQUEST['stage'] = 1;
@@ -680,7 +681,7 @@ class TblpropertiesController extends BaseController
echo '<p>' . \sprintf($this->lang['strconfdropcolumn'], $misc->printVal($_REQUEST['column']), $misc->printVal($_REQUEST['table'])) . '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/tblproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tblproperties" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo '<input type="hidden" name="column" value="', \htmlspecialchars($_REQUEST['column']), '" />' . \PHP_EOL;
@@ -693,7 +694,7 @@ class TblpropertiesController extends BaseController
[$status, $sql] = $data->dropColumn($_POST['table'], $_POST['column'], isset($_POST['cascade']));
if (0 === $status) {
- $misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault(\sprintf('%s %s %s', $sql, \PHP_EOL, $this->lang['strcolumndropped']));
} else {
$this->doDefault($this->lang['strcolumndroppedbad']);
diff --git a/src/controllers/TreeController.php b/src/controllers/TreeController.php
index 81ee9bee..03ec4af6 100644
--- a/src/controllers/TreeController.php
+++ b/src/controllers/TreeController.php
@@ -145,10 +145,10 @@ class TreeController extends BaseController
$parent = [
'id' => 'root',
'children' => true,
- 'icon' => self::SUBFOLDER . '/assets/images/themes/default/Servers.png',
+ 'icon' => \containerInstance()->subFolder . '/assets/images/themes/default/Servers.png',
'state' => ['opened' => true],
- 'a_attr' => ['href' => \str_replace('//', '/', self::SUBFOLDER . '/src/views/servers')],
- 'url' => \str_replace('//', '/', self::SUBFOLDER . '/src/views/servers?action=tree'),
+ 'a_attr' => ['href' => \str_replace('//', '/', \containerInstance()->subFolder . '/src/views/servers')],
+ 'url' => \str_replace('//', '/', \containerInstance()->subFolder . '/src/views/servers?action=tree'),
'text' => 'Servers',
];
} elseif (0 < \count($treedata)) {
@@ -172,7 +172,7 @@ class TreeController extends BaseController
$url = Decorator::get_sanitized_value($attrs['branch'], $rec);
if ($url && false === \mb_strpos($url, '/src/views')) {
- $url = \str_replace('//', '/', self::SUBFOLDER . '/src/views/' . $url);
+ $url = \str_replace('//', '/', \containerInstance()->subFolder . '/src/views/' . $url);
}
if ($url) {
@@ -196,7 +196,7 @@ class TreeController extends BaseController
return $this
->container
- ->responseobj
+ ->response
->withStatus(200)
->withJson($parent);
}
diff --git a/src/controllers/TriggersController.php b/src/controllers/TriggersController.php
index 83faeb49..2c1eab77 100644
--- a/src/controllers/TriggersController.php
+++ b/src/controllers/TriggersController.php
@@ -273,7 +273,7 @@ class TriggersController extends BaseController
if (0 < $triggerdata->recordCount()) {
$this->coalesceArr($_POST, 'name', $triggerdata->fields['tgname']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">';
@@ -311,7 +311,7 @@ class TriggersController extends BaseController
$this->misc->printVal($_REQUEST['table'])
), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo '<input type="hidden" name="trigger" value="', \htmlspecialchars($_REQUEST['trigger']), '" />' . \PHP_EOL;
@@ -350,7 +350,7 @@ class TriggersController extends BaseController
$this->misc->printVal($_REQUEST['table'])
), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="enable" />' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo '<input type="hidden" name="trigger" value="', \htmlspecialchars($_REQUEST['trigger']), '" />' . \PHP_EOL;
@@ -388,7 +388,7 @@ class TriggersController extends BaseController
$this->misc->printVal($_REQUEST['table'])
), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="disable" />' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo '<input type="hidden" name="trigger" value="', \htmlspecialchars($_REQUEST['trigger']), '" />' . \PHP_EOL;
@@ -449,7 +449,7 @@ class TriggersController extends BaseController
$sel3 = new \PHPPgAdmin\XHtml\XHtmlSelect('formFrequency');
$sel3->set_data($data->triggerFrequency);
- echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo '<tr>' . \PHP_EOL;
echo " <th class=\"data\">{$this->lang['strname']}</th>" . \PHP_EOL;
diff --git a/src/controllers/TypesController.php b/src/controllers/TypesController.php
index 7c866657..7fb8289b 100644
--- a/src/controllers/TypesController.php
+++ b/src/controllers/TypesController.php
@@ -198,9 +198,7 @@ class TypesController extends BaseController
],
];
- if (!$data->hasEnumTypes()) {
- unset($navlinks['enum']);
- }
+ //if (!$data->hasEnumTypes()) { unset($navlinks['enum']); }
$this->printNavLinks($navlinks, 'types-types', \get_defined_vars());
}
@@ -344,7 +342,7 @@ class TypesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdroptype'], $this->misc->printVal($_REQUEST['type'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="type" value="', \htmlspecialchars($_REQUEST['type']), '" />' . \PHP_EOL;
@@ -386,7 +384,7 @@ class TypesController extends BaseController
$this->printTitle($this->lang['strcreatecomptype'], 'pg.type.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -432,7 +430,7 @@ class TypesController extends BaseController
$this->printTitle($this->lang['strcreatecomptype'], 'pg.type.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
// Output table header
echo '<table>' . \PHP_EOL;
@@ -563,7 +561,7 @@ class TypesController extends BaseController
$this->printTitle($this->lang['strcreateenumtype'], 'pg.type.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -607,7 +605,7 @@ class TypesController extends BaseController
$this->printTitle($this->lang['strcreateenumtype'], 'pg.type.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
// Output table header
echo '<table>' . \PHP_EOL;
@@ -710,7 +708,7 @@ class TypesController extends BaseController
$this->printTitle($this->lang['strcreatetype'], 'pg.type.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<td class=\"data1\"><input name=\"typname\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
diff --git a/src/controllers/UsersController.php b/src/controllers/UsersController.php
index 54034dfe..54dcf344 100644
--- a/src/controllers/UsersController.php
+++ b/src/controllers/UsersController.php
@@ -257,7 +257,7 @@ class UsersController extends BaseController
$this->coalesceArr($_POST, 'confirm', '');
- echo '<form action="' . self::SUBFOLDER . '/src/views/users" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/users" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strpassword']}</th>" . \PHP_EOL;
echo "\t\t<td><input type=\"password\" name=\"password\" size=\"32\" value=\"",
@@ -330,7 +330,7 @@ class UsersController extends BaseController
$_POST['formPassword'] = '';
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/users" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/users" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left\">{$this->lang['strusername']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"newname\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"" . \htmlspecialchars($_POST['newname']) . '" />' : $this->misc->printVal($userdata->fields['usename'])), "</td>\n\t</tr>" . \PHP_EOL;
@@ -400,7 +400,7 @@ class UsersController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropuser'], $this->misc->printVal($_REQUEST['username'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/users" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/users" method="post">' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="username" value="', \htmlspecialchars($_REQUEST['username']), '" />' . \PHP_EOL;
echo $this->view->form;
@@ -439,7 +439,7 @@ class UsersController extends BaseController
$this->printTitle($this->lang['strcreateuser'], 'pg.user.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/users" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/users" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strusername']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"{$data->_maxNameLen}\" name=\"formUsername\" value=\"", \htmlspecialchars($_POST['formUsername']), "\" /></td>\n\t</tr>" . \PHP_EOL;
diff --git a/src/controllers/ViewpropertiesController.php b/src/controllers/ViewpropertiesController.php
index 523d5c47..26d5b208 100644
--- a/src/controllers/ViewpropertiesController.php
+++ b/src/controllers/ViewpropertiesController.php
@@ -141,7 +141,7 @@ class ViewpropertiesController extends BaseController
}
$variables = (object) [
- 'subfolder' => self::SUBFOLDER . '/src/views/viewproperties',
+ 'subfolder' => \containerInstance()->subFolder . '/src/views/viewproperties',
'formDefinition' => \htmlspecialchars($_POST['formDefinition']),
@@ -201,7 +201,7 @@ EOT;
$this->printTitle($this->lang['stralter'], 'pg.column.alter');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/viewproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/viewproperties" method="post">' . \PHP_EOL;
// Output view header
echo '<table>' . \PHP_EOL;
@@ -299,7 +299,7 @@ EOT;
$this->coalesceArr($_POST, 'comment', $view->fields['relcomment']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/viewproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/viewproperties" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">';
@@ -365,13 +365,13 @@ EOT;
// Jump them to the new view name
$_REQUEST[$this->subject] = $_POST['name'];
// Force a browser reload
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
// If schema has changed, need to change to the new schema and reload the browser
if (!empty($_POST['newschema']) && ($_POST['newschema'] !== $data->_schema)) {
// Jump them to the new sequence schema
$this->misc->setCurrentSchema($_POST['newschema']);
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doDefault($this->lang['strviewaltered']);
} else {
diff --git a/src/controllers/ViewsController.php b/src/controllers/ViewsController.php
index 84feea4d..28a44422 100644
--- a/src/controllers/ViewsController.php
+++ b/src/controllers/ViewsController.php
@@ -124,7 +124,7 @@ class ViewsController extends BaseController
$this->keystring => [
'title' => $this->lang['strview'],
'field' => Decorator::field('relname'),
- 'url' => self::SUBFOLDER . "/redirect/view?{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/view?{$this->misc->href}&amp;",
'vars' => [$this->keystring => 'relname'],
],
'owner' => [
@@ -281,7 +281,7 @@ class ViewsController extends BaseController
$this->printTrail('view');
$this->printTitle($this->lang['strdrop'], 'pg.view.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/views" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/views" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
@@ -312,10 +312,19 @@ class ViewsController extends BaseController
$status = $data->dropView($s, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strviewdropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strviewdropped']
+ );
} else {
$data->endTransaction();
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strviewdroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strviewdroppedbad']
+ ));
return;
}
@@ -324,7 +333,7 @@ class ViewsController extends BaseController
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$this->doDefault($this->lang['strviewdroppedbad']);
@@ -333,7 +342,7 @@ class ViewsController extends BaseController
$status = $data->dropView($_POST['view'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strviewdropped']);
} else {
$this->doDefault($this->lang['strviewdroppedbad']);
@@ -403,7 +412,7 @@ class ViewsController extends BaseController
$this->printTitle($this->lang['strcreateview'], 'pg.view.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$this->view_name}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$this->view_name}\" method=\"post\">" . \PHP_EOL;
echo '<table style="width: 100%">' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t<td class=\"data1\"><input name=\"formView\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -438,7 +447,7 @@ class ViewsController extends BaseController
$status = $data->createView($_POST['formView'], $_POST['formDefinition'], false, $_POST['formComment']);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strviewcreated']);
} else {
$this->doCreate($this->lang['strviewcreatedbad']);
diff --git a/src/database/ADOdbBase.php b/src/database/ADOdbBase.php
index a0f1f8d8..9cca6b76 100644
--- a/src/database/ADOdbBase.php
+++ b/src/database/ADOdbBase.php
@@ -16,6 +16,7 @@ class ADOdbBase
{
use \PHPPgAdmin\Traits\HelperTrait;
use \PHPPgAdmin\Database\Traits\HasTrait;
+ use \PHPPgAdmin\Database\Traits\DatabaseTrait;
/**
* @var array
@@ -68,6 +69,53 @@ class ADOdbBase
}
/**
+ * Given an array of attnums and a relation, returns an array mapping
+ * attribute number to attribute name.
+ *
+ * @param string $table The table to get attributes for
+ * @param array $atts An array of attribute numbers
+ *
+ * @return array|int An array mapping attnum to attname or error code
+ * - -1 $atts must be an array
+ * - -2 wrong number of attributes found
+ */
+ public function getAttributeNames($table, $atts)
+ {
+ $c_schema = $this->_schema;
+ $this->clean($c_schema);
+ $this->clean($table);
+ $this->arrayClean($atts);
+
+ if (!\is_array($atts)) {
+ return -1;
+ }
+
+ if (0 === \count($atts)) {
+ return [];
+ }
+
+ $sql = "SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE
+ attrelid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' AND
+ relnamespace=(SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}'))
+ AND attnum IN ('" . \implode("','", $atts) . "')";
+
+ $rs = $this->selectSet($sql);
+
+ if ($rs->recordCount() !== \count($atts)) {
+ return -2;
+ }
+
+ $temp = [];
+
+ while (!$rs->EOF) {
+ $temp[$rs->fields['attnum']] = $rs->fields['attname'];
+ $rs->moveNext();
+ }
+
+ return $temp;
+ }
+
+ /**
* Sets the comment for an object in the database.
*
* @pre All parameters must already be cleaned
diff --git a/src/database/Postgres.php b/src/database/Postgres.php
index 392fcaec..b94ebbe8 100644
--- a/src/database/Postgres.php
+++ b/src/database/Postgres.php
@@ -101,6 +101,7 @@ class Postgres extends ADOdbBase
* Gets the help pages.
* get help page by instancing the corresponding help class
* if $this->help_page and $this->help_base are set, this function is a noop.
+ *
* @return array<array-key, string>|null|string
*/
public function getHelpPages()
@@ -293,8 +294,6 @@ class Postgres extends ADOdbBase
WHERE c.relkind='v' AND r.rulename != '_RETURN' AND r.rulename ILIKE {$term} {$where}
";
- //\Kint::dump($sql);
-
// Add advanced objects if show_advanced is set
if ($conf['show_advanced']) {
$sql .= "
@@ -345,53 +344,6 @@ class Postgres extends ADOdbBase
}
/**
- * Given an array of attnums and a relation, returns an array mapping
- * attribute number to attribute name.
- *
- * @param string $table The table to get attributes for
- * @param array $atts An array of attribute numbers
- *
- * @return array|int An array mapping attnum to attname or error code
- * - -1 $atts must be an array
- * - -2 wrong number of attributes found
- */
- public function getAttributeNames($table, $atts)
- {
- $c_schema = $this->_schema;
- $this->clean($c_schema);
- $this->clean($table);
- $this->arrayClean($atts);
-
- if (!\is_array($atts)) {
- return -1;
- }
-
- if (0 === \count($atts)) {
- return [];
- }
-
- $sql = "SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE
- attrelid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' AND
- relnamespace=(SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}'))
- AND attnum IN ('" . \implode("','", $atts) . "')";
-
- $rs = $this->selectSet($sql);
-
- if ($rs->recordCount() !== \count($atts)) {
- return -2;
- }
-
- $temp = [];
-
- while (!$rs->EOF) {
- $temp[$rs->fields['attnum']] = $rs->fields['attname'];
- $rs->moveNext();
- }
-
- return $temp;
- }
-
- /**
* Gets all languages.
*
* @param bool $all True to get all languages, regardless of show_system
@@ -533,6 +485,7 @@ class Postgres extends ADOdbBase
if (false === $finishpos) {
$line = \mb_substr($line, 0, $i); /* remove comment */
+
break;
}
$pre = \mb_substr($line, 0, $i);
@@ -581,6 +534,7 @@ class Postgres extends ADOdbBase
} else {
if ('--' === \mb_substr($line, $i, 2)) {
$line = \mb_substr($line, 0, $i); /* remove comment */
+
break;
} /* count nested parentheses */
diff --git a/src/database/databasetraits/RoleTrait.php b/src/database/databasetraits/RoleTrait.php
index a79d0a31..d540f899 100644
--- a/src/database/databasetraits/RoleTrait.php
+++ b/src/database/databasetraits/RoleTrait.php
@@ -132,7 +132,7 @@ trait RoleTrait
* @param bool $createrole Boolean whether or not the role can create other roles
* @param bool $inherits Boolean whether or not the role inherits the privileges from parent roles
* @param bool $login Boolean whether or not the role will be allowed to login
- * @param int $connlimit Number of concurrent connections the role can make
+ * @param int $connlimit Number of concurrent connections the role can make
* @param string $expiry String Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire
* @param array $new_roles_to_add (array) Roles to which the new role will be immediately added as a new member
* @param array $new_members_of_role (array) Roles which are automatically added as members of the new role
@@ -225,7 +225,7 @@ trait RoleTrait
* @param bool $createrole Boolean whether or not the role can create other roles
* @param bool $inherits Boolean whether or not the role inherits the privileges from parent roles
* @param bool $login Boolean whether or not the role will be allowed to login
- * @param int $connlimit Number of concurrent connections the role can make
+ * @param int $connlimit Number of concurrent connections the role can make
* @param string $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire
* @param array $new_roles_to_add (array) Roles to which the role will be immediately added as a new member
* @param array $new_members_of_role (array) Roles which are automatically added as members of the role
@@ -327,7 +327,7 @@ trait RoleTrait
* @param bool $createrole Boolean whether or not the role can create other roles
* @param bool $inherits Boolean whether or not the role inherits the privileges from parent roles
* @param bool $login Boolean whether or not the role will be allowed to login
- * @param int $connlimit Number of concurrent connections the role can make
+ * @param int $connlimit Number of concurrent connections the role can make
* @param string $expiry string Format 'YYYY-MM-DD HH:MM:SS'. '' means never expire
* @param array $new_roles_to_add (array) Roles to which the role will be immediately added as a new member
* @param array $new_members_of_role (array) Roles which are automatically added as members of the role
diff --git a/src/database/databasetraits/SequenceTrait.php b/src/database/databasetraits/SequenceTrait.php
index b5a68312..ba6dafbf 100644
--- a/src/database/databasetraits/SequenceTrait.php
+++ b/src/database/databasetraits/SequenceTrait.php
@@ -66,7 +66,7 @@ trait SequenceTrait
* Execute setval on a given sequence.
*
* @param string $sequence Sequence name
- * @param int $nextvalue The next value
+ * @param int $nextvalue The next value
*
* @return \ADORecordSet|int
*/
@@ -163,11 +163,11 @@ trait SequenceTrait
* Creates a new sequence.
*
* @param string $sequence Sequence name
- * @param int $increment The increment
- * @param int $minvalue The min value
- * @param int $maxvalue The max value
- * @param int $startvalue The starting value
- * @param int $cachevalue The cache value
+ * @param int $increment The increment
+ * @param int $minvalue The min value
+ * @param int $maxvalue The max value
+ * @param int $startvalue The starting value
+ * @param int $cachevalue The cache value
* @param bool $cycledvalue True if cycled, false otherwise
*
* @return \ADORecordSet|int
@@ -228,12 +228,12 @@ trait SequenceTrait
* @param string $owner The new owner for the sequence
* @param string $schema The new schema for the sequence
* @param string $increment The increment
- * @param int $minvalue The min value
- * @param int $maxvalue The max value
- * @param int $restartvalue The starting value
- * @param int $cachevalue The cache value
+ * @param int $minvalue The min value
+ * @param int $maxvalue The max value
+ * @param int $restartvalue The starting value
+ * @param int $cachevalue The cache value
* @param null|bool $cycledvalue True if cycled, false otherwise
- * @param int $startvalue The sequence start value when issueing a restart
+ * @param int $startvalue The sequence start value when issueing a restart
*
* @return bool|int 0 success
*/
@@ -324,13 +324,13 @@ trait SequenceTrait
* Alter a sequence's properties.
*
* @param \ADORecordSet $seqrs The sequence RecordSet returned by getSequence()
- * @param int $increment The sequence incremental value
- * @param int $minvalue The sequence minimum value
- * @param int $maxvalue The sequence maximum value
- * @param int $restartvalue The sequence current value
- * @param int $cachevalue The sequence cache value
+ * @param int $increment The sequence incremental value
+ * @param int $minvalue The sequence minimum value
+ * @param int $maxvalue The sequence maximum value
+ * @param int $restartvalue The sequence current value
+ * @param int $cachevalue The sequence cache value
* @param null|bool $cycledvalue Sequence can cycle ?
- * @param int $startvalue The sequence start value when issueing a restart
+ * @param int $startvalue The sequence start value when issueing a restart
*
* @return \ADORecordSet|int
*/
diff --git a/src/database/databasetraits/TableTrait.php b/src/database/databasetraits/TableTrait.php
index 6df728fe..eec71a9e 100644
--- a/src/database/databasetraits/TableTrait.php
+++ b/src/database/databasetraits/TableTrait.php
@@ -1422,8 +1422,7 @@ trait TableTrait
$this->fieldClean($atts->fields['attname']);
$sql .= " \"{$atts->fields['attname']}\"";
// Dump SERIAL and BIGSERIAL columns correctly
- if (
- $this->phpBool($atts->fields['attisserial']) &&
+ if ($this->phpBool($atts->fields['attisserial']) &&
('integer' === $atts->fields['type'] || 'bigint' === $atts->fields['type'])
) {
if ('integer' === $atts->fields['type']) {
diff --git a/src/decorators/ActionUrlDecorator.php b/src/decorators/ActionUrlDecorator.php
index 31c1e3e2..26ecfc3c 100644
--- a/src/decorators/ActionUrlDecorator.php
+++ b/src/decorators/ActionUrlDecorator.php
@@ -41,6 +41,6 @@ class ActionUrlDecorator extends Decorator
}
}
- return self::SUBFOLDER . '/src/views/' . \str_replace('.php', '', $url);
+ return \containerInstance()->subFolder . '/src/views/' . \str_replace('.php', '', $url);
}
}
diff --git a/src/decorators/BranchUrlDecorator.php b/src/decorators/BranchUrlDecorator.php
index 869162f1..0b3cb1ac 100644
--- a/src/decorators/BranchUrlDecorator.php
+++ b/src/decorators/BranchUrlDecorator.php
@@ -43,8 +43,8 @@ class BranchUrlDecorator extends Decorator
$url = \str_replace('//', '/', '/src/views/' . $url);
}
- if (self::SUBFOLDER !== '' && (0 === \mb_strpos($url, '/')) && (0 !== \mb_strpos($url, self::SUBFOLDER))) {
- $url = \str_replace('//', '/', self::SUBFOLDER . '/' . $url);
+ if ('' !== containerInstance()->subFolder && (0 === \mb_strpos($url, '/')) && (0 !== \mb_strpos($url, \containerInstance()->subFolder))) {
+ $url = \str_replace('//', '/', \containerInstance()->subFolder . '/' . $url);
}
return \str_replace('.php', '', $url);
diff --git a/src/decorators/Decorator.php b/src/decorators/Decorator.php
index 07947bdc..5609e5e9 100644
--- a/src/decorators/Decorator.php
+++ b/src/decorators/Decorator.php
@@ -6,25 +6,10 @@
namespace PHPPgAdmin\Decorators;
-use PHPPgAdmin\ContainerUtils;
-
class Decorator
{
use \PHPPgAdmin\Traits\HelperTrait;
- /**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
-
public $container;
public function __construct($value)
diff --git a/src/decorators/RedirectUrlDecorator.php b/src/decorators/RedirectUrlDecorator.php
index 90921e0b..9aebb881 100644
--- a/src/decorators/RedirectUrlDecorator.php
+++ b/src/decorators/RedirectUrlDecorator.php
@@ -45,8 +45,8 @@ class RedirectUrlDecorator extends Decorator
}
}
- if (self::SUBFOLDER !== '' && (0 === \mb_strpos($url, '/')) && (false === \mb_strpos($url, self::SUBFOLDER))) {
- $url = \str_replace('//', '/', self::SUBFOLDER . '/' . $url);
+ if ('' !== containerInstance()->subFolder && (0 === \mb_strpos($url, '/')) && (false === \mb_strpos($url, \containerInstance()->subFolder))) {
+ $url = \str_replace('//', '/', \containerInstance()->subFolder . '/' . $url);
}
return \str_replace('.php', '', $url);
diff --git a/src/decorators/UrlDecorator.php b/src/decorators/UrlDecorator.php
index 1a7d76ed..fabfb542 100644
--- a/src/decorators/UrlDecorator.php
+++ b/src/decorators/UrlDecorator.php
@@ -37,8 +37,8 @@ class UrlDecorator extends Decorator
}
}
- if (self::SUBFOLDER !== '' && (0 === \mb_strpos($url, '/')) && (false === \mb_strpos($url, self::SUBFOLDER))) {
- $url = \str_replace('//', '/', self::SUBFOLDER . '/' . $url);
+ if ('' !== containerInstance()->subFolder && (0 === \mb_strpos($url, '/')) && (false === \mb_strpos($url, \containerInstance()->subFolder))) {
+ $url = \str_replace('//', '/', \containerInstance()->subFolder . '/' . $url);
}
return $url;
diff --git a/src/help/PostgresDoc.php b/src/help/PostgresDoc.php
index c25c3938..b82f1102 100644
--- a/src/help/PostgresDoc.php
+++ b/src/help/PostgresDoc.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 7.4 documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc
{
@@ -188,7 +190,7 @@ class PostgresDoc
*
* @return null|string|string[]
*/
- public function getHelpTopics(?string $topic = null): array
+ public function getHelpTopics(?string $topic = null)
{
return $topic ? $this->help_topics[$topic] ?? null : $this->help_topics;
}
diff --git a/src/help/PostgresDoc10.php b/src/help/PostgresDoc10.php
index 47fcf9cd..6e5e9ec1 100644
--- a/src/help/PostgresDoc10.php
+++ b/src/help/PostgresDoc10.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 10.x documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc10 extends PostgresDoc96
{
diff --git a/src/help/PostgresDoc11.php b/src/help/PostgresDoc11.php
index 103f3ed9..19b24e97 100644
--- a/src/help/PostgresDoc11.php
+++ b/src/help/PostgresDoc11.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 11.x documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc11 extends PostgresDoc10
{
diff --git a/src/help/PostgresDoc12.php b/src/help/PostgresDoc12.php
index 0d360c70..0bc63c25 100644
--- a/src/help/PostgresDoc12.php
+++ b/src/help/PostgresDoc12.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 12.x documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc12 extends PostgresDoc11
{
diff --git a/src/help/PostgresDoc90.php b/src/help/PostgresDoc90.php
index eb94e437..fb1493f6 100644
--- a/src/help/PostgresDoc90.php
+++ b/src/help/PostgresDoc90.php
@@ -10,6 +10,8 @@ namespace PHPPgAdmin\Help;
* Help links for PostgreSQL 9.0 documentation.
*
* Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc90 extends PostgresDoc
{
diff --git a/src/help/PostgresDoc91.php b/src/help/PostgresDoc91.php
index 0b824106..66c2230c 100644
--- a/src/help/PostgresDoc91.php
+++ b/src/help/PostgresDoc91.php
@@ -10,6 +10,8 @@ namespace PHPPgAdmin\Help;
* Help links for PostgreSQL 9.1 documentation.
*
* Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc91 extends PostgresDoc90
{
diff --git a/src/help/PostgresDoc92.php b/src/help/PostgresDoc92.php
index 722f41db..e86f7f00 100644
--- a/src/help/PostgresDoc92.php
+++ b/src/help/PostgresDoc92.php
@@ -10,6 +10,8 @@ namespace PHPPgAdmin\Help;
* Help links for PostgreSQL 9.2 documentation.
*
* Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc92 extends PostgresDoc91
{
diff --git a/src/help/PostgresDoc93.php b/src/help/PostgresDoc93.php
index cad85288..6a9b0626 100644
--- a/src/help/PostgresDoc93.php
+++ b/src/help/PostgresDoc93.php
@@ -10,6 +10,8 @@ namespace PHPPgAdmin\Help;
* Help links for PostgreSQL 9.3 documentation.
*
* Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc93 extends PostgresDoc92
{
diff --git a/src/help/PostgresDoc94.php b/src/help/PostgresDoc94.php
index d1e8b024..fe8d2677 100644
--- a/src/help/PostgresDoc94.php
+++ b/src/help/PostgresDoc94.php
@@ -10,6 +10,8 @@ namespace PHPPgAdmin\Help;
* Help links for PostgreSQL 9.4 documentation.
*
* Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc94 extends PostgresDoc93
{
diff --git a/src/help/PostgresDoc95.php b/src/help/PostgresDoc95.php
index ca816526..7759ce44 100644
--- a/src/help/PostgresDoc95.php
+++ b/src/help/PostgresDoc95.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 9.5 documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc95 extends PostgresDoc94
{
diff --git a/src/help/PostgresDoc96.php b/src/help/PostgresDoc96.php
index f7b7238b..7e43a998 100644
--- a/src/help/PostgresDoc96.php
+++ b/src/help/PostgresDoc96.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 9.6 documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc96 extends PostgresDoc95
{
diff --git a/src/lib.inc.php b/src/lib.inc.php
index a2417192..139b6f05 100644
--- a/src/lib.inc.php
+++ b/src/lib.inc.php
@@ -4,6 +4,8 @@
* PHPPgAdmin 6.0.0
*/
+use Slim\App;
+
\defined('BASE_PATH') || \define('BASE_PATH', \dirname(__DIR__));
\defined('THEME_PATH') || \define('THEME_PATH', \dirname(__DIR__) . '/assets/themes');
@@ -15,14 +17,30 @@ if (!\is_writable(\dirname(__DIR__) . '/temp')) {
}
require_once \dirname(__DIR__) . '/vendor/autoload.php';
-$subfolder = '';
-// Check to see if the configuration file exists, if not, explain
-if (!\file_exists(\dirname(__DIR__) . '/config.inc.php')) {
- die('Configuration error: Copy config.inc.php-dist to config.inc.php and edit appropriately.');
+
+$shouldSetSession = (\defined('PHP_SESSION_ACTIVE') ? \PHP_SESSION_ACTIVE !== \session_status() : !\session_id())
+ && !\headers_sent()
+ && !\ini_get('session.auto_start');
+
+if ($shouldSetSession && \PHP_SAPI !== 'cli') {
+ \session_set_cookie_params(0, '/', $_SERVER['HTTP_HOST'], isset($_SERVER['HTTPS']));
+ \session_name('PPA_ID');
+ \session_start();
}
+
+\defined('ADODB_ERROR_HANDLER_TYPE') || \define('ADODB_ERROR_HANDLER_TYPE', \E_USER_ERROR);
+\defined('ADODB_ERROR_HANDLER') || \define('ADODB_ERROR_HANDLER', '\PHPPgAdmin\ADOdbException::adodb_throw');
+
+function getAppInstance(): \Slim\App
+{
+ $subfolder = '';
+ // Check to see if the configuration file exists, if not, explain
+ if (!\file_exists(\dirname(__DIR__) . '/config.inc.php')) {
+ die('Configuration error: Copy config.inc.php-dist to config.inc.php and edit appropriately.');
+ }
$conf = [];
- include \dirname(__DIR__) . '/config.inc.php';
+ include_once \dirname(__DIR__) . '/config.inc.php';
if (isset($conf['subfolder']) && \is_string($conf['subfolder'])) {
$subfolder = $conf['subfolder'];
@@ -36,105 +54,50 @@ if (!\file_exists(\dirname(__DIR__) . '/config.inc.php')) {
);
}
-\defined('PHPPGA_SUBFOLDER') || \define('PHPPGA_SUBFOLDER', $subfolder);
-$shouldSetSession = (\defined('PHP_SESSION_ACTIVE') ? \PHP_SESSION_ACTIVE !== \session_status() : !\session_id())
-&& !\headers_sent()
-&& !\ini_get('session.auto_start');
+ $conf['subfolder'] = $subfolder;
-if ($shouldSetSession && \PHP_SAPI !== 'cli') {
- \session_set_cookie_params(0, '/', $_SERVER['HTTP_HOST'], isset($_SERVER['HTTPS']));
- \session_name('PPA_ID');
- \session_start();
-}
+ $conf['debugmode'] = (!isset($conf['debugmode'])) ? false : (bool) ($conf['debugmode']);
-$debugmode = (!isset($conf['debugmode'])) ? false : (bool) ($conf['debugmode']);
-\defined('DEBUGMODE') || \define('DEBUGMODE', $debugmode);
+ if ($conf['debugmode']) {
+ \ini_set('display_startup_errors', 'On');
+ \ini_set('opcache.revalidate_freq', '0');
+ \error_reporting(\E_ALL);
-if (!\defined('ADODB_ERROR_HANDLER_TYPE')) {
- \define('ADODB_ERROR_HANDLER_TYPE', \E_USER_ERROR);
-}
-
-if (!\defined('ADODB_ERROR_HANDLER')) {
- \define('ADODB_ERROR_HANDLER', '\PHPPgAdmin\ADOdbException::adodb_throw');
-}
+ if (\array_key_exists('register_debuggers', $conf) && \is_callable($conf['register_debuggers'])) {
+ $conf['register_debuggers']();
+ }
+ }
-if (DEBUGMODE) {
- \ini_set('display_errors', 'On');
+ $conf['BASE_PATH'] = BASE_PATH;
+ $conf['theme_path'] = BASE_PATH . '/assets/themes';
+ \defined('IN_TEST') || \define('IN_TEST', false);
+ $conf['IN_TEST'] = IN_TEST;
+ \defined('ADODB_ASSOC_CASE') || \define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_NATIVE);
- \ini_set('display_startup_errors', 'On');
- \ini_set('opcache.revalidate_freq', '0');
- \error_reporting(\E_ALL);
+ // Fetch App and DI Container
+ $app = \PHPPgAdmin\ContainerUtils::getAppInstance($conf);
- if (\array_key_exists('register_debuggers', $conf) && \is_callable($conf['register_debuggers'])) {
- $conf['register_debuggers']();
- }
+ return $app;
}
-\define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_NATIVE);
-// Fetch App and DI Container
-$app = \PHPPgAdmin\ContainerUtils::createApp($conf);
-$container = $app->getContainer();
-if (!$container instanceof \Slim\Container) {
- \trigger_error('App Container must be an instance of \\Slim\\Container', \E_USER_ERROR);
-}
-function containerInstance(): \Slim\Container
+function containerInstance(): \PHPPgAdmin\ContainerUtils
{
- return \PHPPgAdmin\ContainerUtils::getContainerInstance();
+ $app = getAppInstance();
+ $container = $app->getContainer();
+
+ if (!$container instanceof \PHPPgAdmin\ContainerUtils) {
+ \trigger_error('App Container must be an instance of \\Slim\\Container', \E_USER_ERROR);
+ }
+
+ return $container;
}
function requestInstance(): \Slim\Http\Request
{
- return containerInstance()->request;
+ return \containerInstance()->request;
}
- function responseInstance(): \Slim\Http\Response
- {
- return containerInstance()->response;
- }
-
-// This should be deprecated once we're sure no php scripts are required directly
-$container->offsetSet('server', $_REQUEST['server'] ?? null);
-$container->offsetSet('database', $_REQUEST['database'] ?? null);
-$container->offsetSet('schema', $_REQUEST['schema'] ?? null);
-
-$container['haltHandler'] = static function (\Slim\Container $c) {
- return static function ($request, $response, $exits, $status = 500) use ($c) {
- $title = 'PHPPgAdmin Error';
-
- $html = '<p>The application could not run because of the following error:</p>';
-
- $output = \sprintf(
- "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" .
- '<title>%s</title><style>' .
- 'body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}' .
- 'h3{margin:0;font-size:28px;font-weight:normal;line-height:30px;}' .
- 'span{display:inline-block;font-size:16px;}' .
- '</style></head><body><h3>%s</h3><p>%s</p><span>%s</span></body></html>',
- $title,
- $title,
- $html,
- \implode('<br>', $exits)
- );
-
- $body = $response->getBody(); //new \Slim\Http\Body(fopen('php://temp', 'r+'));
- $body->write($output);
-
- return $response
- ->withStatus($status)
- ->withHeader('Content-type', 'text/html')
- ->withBody($body);
- };
-};
-
-// Set the requestobj and responseobj properties of the container
-// as the value of $request and $response, which already contain the route
-$app->add(new \PHPPgAdmin\Middleware\PopulateRequestResponse($container));
-
-$container['action'] = $_REQUEST['action'] ?? '';
-
-if (!isset($msg)) {
- $msg = '';
+function responseInstance(): \Slim\Http\Response
+{
+ return \containerInstance()->response;
}
-
-$container['msg'] = $msg;
-//ddd($container->misc);
diff --git a/src/middleware/PopulateRequestResponse.php b/src/middleware/PopulateRequestResponse.php
index 8a3828cc..e453d666 100644
--- a/src/middleware/PopulateRequestResponse.php
+++ b/src/middleware/PopulateRequestResponse.php
@@ -20,16 +20,16 @@ class PopulateRequestResponse extends Middleware
$next
) {
$container = $this->container;
- $subfolder = $this->getSubfolder();
- $container['requestobj'] = $request;
- $container['responseobj'] = $response;
+ $subfolder = $this->container->getSubfolder();
+
$route = $request->getAttribute('route');
$container['server'] = $request->getParam('server');
$container['database'] = $request->getParam('database');
$container['schema'] = $request->getParam('schema');
$misc = $container->get('misc');
- $view = $container->get('view');
+
+ $view = $this->getViewManager($container);
$misc->setHREF();
$view->setForm();
@@ -41,10 +41,13 @@ class PopulateRequestResponse extends Middleware
$container['server'] = $route->getArgument('server', $request->getParam('server'));
}
- $query_string = $request->getUri()->getQuery();
+ $request = $request->withUri($this->getUri($request)->withBasePath($subfolder));
+ $uri = $request->getUri();
+ $query_string = $uri->getQuery();
+ $requestPath = $uri->getPath();
+
$view->offsetSet('query_string', $query_string);
- $path = ($subfolder ? ($subfolder . '/') : '')
- . $request->getUri()->getPath() . ($query_string ? '?' . $query_string : '');
+ $path = $requestPath . ($query_string ? '?' . $query_string : '');
$view->offsetSet('path', $path);
$params = $request->getParams();
@@ -71,13 +74,27 @@ class PopulateRequestResponse extends Middleware
$view->offsetSet('in_test', $in_test);
if (0 < \count($container['errors'])) {
- return ($container->haltHandler)($container->requestobj, $container->responseobj, $container['errors'], 412);
+ return ($container->haltHandler)($request, $response, $container['errors'], 412);
}
+ $enqueued_reload_browser = ($container->flash->getFirstMessage('reload_browser') ?? false);
+ if ($enqueued_reload_browser) {
+ $view->setReloadBrowser($enqueued_reload_browser);
+ }
// First execute anything else
$response = $next($request, $response);
// Any other request, pass on current response
return $response;
}
+
+ private function getUri(\Slim\Http\Request $request): \Slim\Http\Uri
+ {
+ return $request->getUri();
+ }
+
+ private function getViewManager(\PHPPgAdmin\ContainerUtils $container): \PHPPgAdmin\ViewManager
+ {
+ return $container->get('view');
+ }
}
diff --git a/src/router.php b/src/router.php
index c3d707c1..4d252d6b 100644
--- a/src/router.php
+++ b/src/router.php
@@ -5,31 +5,35 @@
*/
require_once __DIR__ . '/lib.inc.php';
+$app = getAppInstance();
+$container = containerInstance();
+
+// Set the requestobj and responseobj properties of the container
+// as the value of $request and $response, which already contain the route
+$app->add(new \PHPPgAdmin\Middleware\PopulateRequestResponse($container));
+
+if (!isset($msg)) {
+ $msg = '';
+}
+$container['msg'] = $msg;
+//ddd($container->misc);
+
$app->get('/status', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
- \phpinfo();
- return;
- //dump($this->get('settings')->all());
return $response
->withHeader('Content-type', 'application/json')
->withJson(
- DEBUGMODE ? $this->get('settings')->all() : ['version' => $this->version]
+ $this->get('settings')['debug'] ? $this->get('settings')->all() : ['version' => $this->version]
);
});
$app->post('/redirect/server', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
$body = $response->getBody();
@@ -52,6 +56,7 @@ $app->post('/redirect/server', function (
$data = $misc->getDatabaseAccessor();
if (null === $data) {
+ //ddd($misc->getErrorMsg());
$login_controller = new \PHPPgAdmin\Controller\LoginController($this, true);
$body->write($login_controller->doLoginForm($misc->getErrorMsg()));
@@ -63,41 +68,36 @@ $app->post('/redirect/server', function (
$_SESSION['sharedPassword'] = $loginPassword;
}
- $misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
+ $this->addFlash(true, 'reload_browser');
- $destinationurl = $this->utils->getDestinationWithLastTab('alldb');
+ $destinationurl = $this->getDestinationWithLastTab('alldb');
return $response->withStatus(302)->withHeader('Location', $destinationurl);
}
$_server_info = $this->misc->getServerInfo();
if (!isset($_server_info['username'])) {
- $destinationurl = $this->utils->getDestinationWithLastTab('server');
+ $destinationurl = $this->getDestinationWithLastTab('server');
return $response->withStatus(302)->withHeader('Location', $destinationurl);
}
});
$app->get('/redirect[/{subject}]', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
$subject = (isset($args['subject'])) ? $args['subject'] : 'root';
- $destinationurl = $this->utils->getDestinationWithLastTab($subject);
+ $destinationurl = $this->getDestinationWithLastTab($subject);
return $response->withStatus(302)->withHeader('Location', $destinationurl);
});
$app->map(['GET', 'POST'], '/src/views/{subject}', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
$subject = $args['subject'];
@@ -110,11 +110,11 @@ $app->map(['GET', 'POST'], '/src/views/{subject}', function (
$safe_subjects = ('servers' === $subject || 'intro' === $subject || 'browser' === $subject);
if (null === $this->misc->getServerId() && !$safe_subjects) {
- return $response->withStatus(302)->withHeader('Location', SUBFOLDER . '/src/views/servers');
+ return $response->withStatus(302)->withHeader('Location', $this->subFolder . '/src/views/servers');
}
if (!isset($_server_info['username']) && 'login' !== $subject && !$safe_subjects) {
- $destinationurl = SUBFOLDER . '/src/views/login?server=' . $this->misc->getServerId();
+ $destinationurl = $this->subFolder . '/src/views/login?server=' . $this->misc->getServerId();
return $response->withStatus(302)->withHeader('Location', $destinationurl);
}
@@ -126,11 +126,8 @@ $app->map(['GET', 'POST'], '/src/views/{subject}', function (
});
$app->get('/{subject:\w+}[/{server_id}]', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
$subject = $args['subject'] ?? 'intro';
@@ -153,11 +150,8 @@ $app->get('/{subject:\w+}[/{server_id}]', function (
});
$app->get('/', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
$subject = 'intro';
@@ -168,11 +162,8 @@ $app->get('/', function (
});
$app->get('[/{path:.*}]', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
$filepath = \dirname(__DIR__) . '/' . $args['path'];
@@ -180,7 +171,7 @@ $app->get('[/{path:.*}]', function (
//d($this->subfolder, $args, $query_string, $filepath);
- $this->utils->prtrace($request->getAttribute('route'));
+ $this->prtrace($request->getAttribute('route'));
return $response->write($args['path'] ? $args['path'] : 'index');
});
diff --git a/src/traits/AdminTrait.php b/src/traits/AdminTrait.php
index 8460eaa3..be95a1b2 100644
--- a/src/traits/AdminTrait.php
+++ b/src/traits/AdminTrait.php
@@ -34,7 +34,7 @@ trait AdminTrait
$this->printTrail('schema');
$this->printTitle($this->lang['strclusterindex'], 'pg.index.cluster');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
@@ -45,7 +45,7 @@ trait AdminTrait
$this->printTrail($type);
$this->printTitle($this->lang['strclusterindex'], 'pg.index.cluster');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
if ('table' === $type) {
echo '<p>', \sprintf($this->lang['strconfclustertable'], $this->misc->printVal($_REQUEST['object'])), '</p>' . \PHP_EOL;
@@ -86,7 +86,7 @@ trait AdminTrait
$this->printTrail('schema');
$this->printTitle($this->lang['strreindex'], 'pg.reindex');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
@@ -97,7 +97,7 @@ trait AdminTrait
$this->printTrail($type);
$this->printTitle($this->lang['strreindex'], 'pg.reindex');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
if ('table' === $type) {
echo '<p>', \sprintf($this->lang['strconfreindextable'], $this->misc->printVal($_REQUEST['object'])), '</p>' . \PHP_EOL;
@@ -141,11 +141,10 @@ trait AdminTrait
$this->printTrail('schema');
$this->printTitle($this->lang['stranalyze'], 'pg.analyze');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
- //\Kint::dump($a);
echo '<p>', \sprintf($this->lang['strconfanalyzetable'], $this->misc->printVal($a['table'])), '</p>' . \PHP_EOL;
echo '<input type="hidden" name="table[]" value="', \htmlspecialchars($a['table']), '" />' . \PHP_EOL;
} // END if multi analyze
@@ -153,7 +152,7 @@ trait AdminTrait
$this->printTrail($type);
$this->printTitle($this->lang['stranalyze'], 'pg.analyze');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
if ('table' === $type) {
echo '<p>', \sprintf($this->lang['strconfanalyzetable'], $this->misc->printVal($_REQUEST['object'])), '</p>' . \PHP_EOL;
@@ -190,7 +189,7 @@ trait AdminTrait
$this->printTrail('schema');
$this->printTitle($this->lang['strvacuum'], 'pg.vacuum');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
@@ -202,7 +201,7 @@ trait AdminTrait
$this->printTrail($type);
$this->printTitle($this->lang['strvacuum'], 'pg.vacuum');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
if ('table' === $type) {
echo '<p>', \sprintf($this->lang['strconfvacuumtable'], $this->misc->printVal($_REQUEST['object'])), '</p>' . \PHP_EOL;
@@ -286,7 +285,7 @@ trait AdminTrait
$old_val['autovacuum_vacuum_cost_limit'] = '';
}
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
echo $this->view->form;
echo '<input type="hidden" name="action" value="editautovac" />' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
@@ -384,9 +383,19 @@ trait AdminTrait
$msg .= \sprintf('%s<br />', $sql);
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['strclusteredgood']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strclusteredgood']
+ );
} else {
- $this->doDefault(\sprintf('%s %s%s: %s<br />', $type, $msg, \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['strclusteredbad']));
+ $this->doDefault(\sprintf(
+ '%s %s%s: %s<br />',
+ $type,
+ $msg,
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strclusteredbad']
+ ));
return;
}
@@ -440,21 +449,31 @@ trait AdminTrait
$status = $data->reindex(\mb_strtoupper($type), $o, isset($_REQUEST['reindex_force']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['strreindexgood']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strreindexgood']
+ );
} else {
- $this->doDefault(\sprintf('%s %s%s: %s<br />', $type, $msg, \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['strreindexbad']));
+ $this->doDefault(\sprintf(
+ '%s %s%s: %s<br />',
+ $type,
+ $msg,
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strreindexbad']
+ ));
return;
}
}
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$status = $data->reindex(\mb_strtoupper($type), $_REQUEST['object'], isset($_REQUEST['reindex_force']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doAdmin($type, $this->lang['strreindexgood']);
} else {
$this->doAdmin($type, $this->lang['strreindexbad']);
@@ -485,22 +504,32 @@ trait AdminTrait
$status = $data->analyzeDB($o);
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['stranalyzegood']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['stranalyzegood']
+ );
} else {
- $this->doDefault(\sprintf('%s %s%s: %s<br />', $type, $msg, \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['stranalyzebad']));
+ $this->doDefault(\sprintf(
+ '%s %s%s: %s<br />',
+ $type,
+ $msg,
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['stranalyzebad']
+ ));
return;
}
}
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
//we must pass table here. When empty, analyze the whole db
$status = $data->analyzeDB($_REQUEST['table']);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doAdmin($type, $this->lang['stranalyzegood']);
} else {
$this->doAdmin($type, $this->lang['stranalyzebad']);
@@ -531,12 +560,24 @@ trait AdminTrait
[$status, $sql] = $data->vacuumDB($t, isset($_REQUEST['vacuum_analyze']), isset($_REQUEST['vacuum_full']), isset($_REQUEST['vacuum_freeze']));
if (0 !== $status) {
- return $this->doDefault(\sprintf('%s %s%s: %s<br />', $type, $msg, \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strvacuumbad']));
+ return $this->doDefault(\sprintf(
+ '%s %s%s: %s<br />',
+ $type,
+ $msg,
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strvacuumbad']
+ ));
}
- $msg .= \sprintf('%s%s %s: %s<br />', $sql, \PHP_EOL, \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strvacuumgood']);
+ $msg .= \sprintf(
+ '%s%s %s: %s<br />',
+ $sql,
+ \PHP_EOL,
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strvacuumgood']
+ );
}
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
return $this->doDefault($msg);
}
@@ -544,7 +585,7 @@ trait AdminTrait
[$status, $sql] = $data->vacuumDB($_REQUEST['table'], isset($_REQUEST['vacuum_analyze']), isset($_REQUEST['vacuum_full']), isset($_REQUEST['vacuum_freeze']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
return $this->doAdmin($type, \sprintf('%s%s%s', $sql, \PHP_EOL, $this->lang['strvacuumgood']));
}
@@ -647,7 +688,12 @@ trait AdminTrait
echo '</th>';
$table_hidden_inputs = ('table' === $type) ?
- \sprintf('<input type="hidden" name="table" value="%s" />%s<input type="hidden" name="subject" value="table" />', \htmlspecialchars($_REQUEST['object']), \PHP_EOL, \PHP_EOL) : '';
+ \sprintf(
+ '<input type="hidden" name="table" value="%s" />%s<input type="hidden" name="subject" value="table" />%s',
+ \htmlspecialchars($_REQUEST['object']),
+ \PHP_EOL,
+ \PHP_EOL
+ ) : '';
[$recluster_help, $reclusterconf] = $this->_getReclusterConf($data, $type, $table_hidden_inputs);
@@ -661,7 +707,7 @@ trait AdminTrait
// Vacuum
echo '<tr class="row1">' . \PHP_EOL;
echo '<td style="text-align: center; vertical-align: bottom">' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="confirm_vacuum" />' . \PHP_EOL;
echo $this->view->form;
@@ -672,7 +718,7 @@ trait AdminTrait
// Analyze
echo '<td style="text-align: center; vertical-align: bottom">' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="confirm_analyze" />' . \PHP_EOL;
echo $this->view->form;
echo $table_hidden_inputs;
@@ -685,7 +731,7 @@ trait AdminTrait
// Reindex
echo '<td style="text-align: center; vertical-align: bottom">' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="confirm_reindex" />' . \PHP_EOL;
echo $this->view->form;
echo $table_hidden_inputs;
@@ -803,11 +849,14 @@ trait AdminTrait
return ['', ''];
}
$script = $this->script;
- $recluster_help = \sprintf('<th class="data">%s</th>', $this->view->printHelp($this->lang['strclusterindex'], 'pg.index.cluster', false));
+ $recluster_help = \sprintf(
+ '<th class="data">%s</th>',
+ $this->view->printHelp($this->lang['strclusterindex'], 'pg.index.cluster', false)
+ );
$disabled = '';
$reclusterconf = '<td style="text-align: center; vertical-align: bottom">' . \PHP_EOL;
- $reclusterconf .= '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ $reclusterconf .= '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
$reclusterconf .= $this->view->form;
$reclusterconf .= $table_hidden_inputs;
@@ -854,48 +903,55 @@ trait AdminTrait
'namespace' => [
'title' => $this->lang['strschema'],
'field' => Decorator::field('nspname'),
- 'url' => self::SUBFOLDER . "/redirect/schema?{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/schema?{$this->misc->href}&amp;",
'vars' => ['schema' => 'nspname'],
],
'relname' => [
'title' => $this->lang['strtable'],
'field' => Decorator::field('relname'),
- 'url' => self::SUBFOLDER . "/redirect/table?{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/table?{$this->misc->href}&amp;",
'vars' => ['table' => 'relname', 'schema' => 'nspname'],
],
'autovacuum_enabled' => [
'title' => $this->lang['strenabled'],
- 'field' => Decorator::callback($enlight, ['autovacuum_enabled', $defaults['autovacuum']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_enabled',
+ $defaults['autovacuum'], ]),
'type' => 'verbatim',
],
'autovacuum_vacuum_threshold' => [
'title' => $this->lang['strvacuumbasethreshold'],
- 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_threshold', $defaults['autovacuum_vacuum_threshold']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_threshold',
+ $defaults['autovacuum_vacuum_threshold'], ]),
'type' => 'verbatim',
],
'autovacuum_vacuum_scale_factor' => [
'title' => $this->lang['strvacuumscalefactor'],
- 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_scale_factor', $defaults['autovacuum_vacuum_scale_factor']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_scale_factor',
+ $defaults['autovacuum_vacuum_scale_factor'], ]),
'type' => 'verbatim',
],
'autovacuum_analyze_threshold' => [
'title' => $this->lang['stranalybasethreshold'],
- 'field' => Decorator::callback($enlight, ['autovacuum_analyze_threshold', $defaults['autovacuum_analyze_threshold']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_analyze_threshold',
+ $defaults['autovacuum_analyze_threshold'], ]),
'type' => 'verbatim',
],
'autovacuum_analyze_scale_factor' => [
'title' => $this->lang['stranalyzescalefactor'],
- 'field' => Decorator::callback($enlight, ['autovacuum_analyze_scale_factor', $defaults['autovacuum_analyze_scale_factor']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_analyze_scale_factor',
+ $defaults['autovacuum_analyze_scale_factor'], ]),
'type' => 'verbatim',
],
'autovacuum_vacuum_cost_delay' => [
'title' => $this->lang['strvacuumcostdelay'],
- 'field' => Decorator::concat(Decorator::callback($enlight, ['autovacuum_vacuum_cost_delay', $defaults['autovacuum_vacuum_cost_delay']]), 'ms'),
+ 'field' => Decorator::concat(Decorator::callback($enlight, ['autovacuum_vacuum_cost_delay',
+ $defaults['autovacuum_vacuum_cost_delay'], ]), 'ms'),
'type' => 'verbatim',
],
'autovacuum_vacuum_cost_limit' => [
'title' => $this->lang['strvacuumcostlimit'],
- 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_cost_limit', $defaults['autovacuum_vacuum_cost_limit']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_cost_limit',
+ $defaults['autovacuum_vacuum_cost_limit'], ]),
'type' => 'verbatim',
],
];
@@ -935,7 +991,8 @@ trait AdminTrait
];
if ('table' === $type) {
- unset($actions['edit']['vars']['schema'],
+ unset(
+ $actions['edit']['vars']['schema'],
$actions['delete']['vars']['schema'],
$columns['namespace'],
$columns['relname']
@@ -947,7 +1004,7 @@ trait AdminTrait
if (('table' === $type) && (0 === $autovac->recordCount())) {
echo '<br />';
- echo '<a href="' . self::SUBFOLDER . "/src/views/tables?action=confeditautovac&amp;{$this->misc->href}&amp;table=";
+ echo '<a href="' . \containerInstance()->subFolder . "/src/views/tables?action=confeditautovac&amp;{$this->misc->href}&amp;table=";
echo \htmlspecialchars($_REQUEST['table']);
echo "\">{$this->lang['straddvacuumtable']}</a>";
}
diff --git a/src/traits/ExportTrait.php b/src/traits/ExportTrait.php
index 803bb58b..9098c2df 100644
--- a/src/traits/ExportTrait.php
+++ b/src/traits/ExportTrait.php
@@ -172,7 +172,7 @@ trait ExportTrait
{
$content = \sprintf(
'<form id="export_form" action="%s/%s" method="post">%s',
- self::SUBFOLDER . '/src/views',
+ \containerInstance()->subFolder . '/src/views',
$endpoint,
\PHP_EOL
);
diff --git a/src/traits/HelperTrait.php b/src/traits/HelperTrait.php
index 0728ede1..e7c3d1ef 100644
--- a/src/traits/HelperTrait.php
+++ b/src/traits/HelperTrait.php
@@ -19,29 +19,6 @@ namespace PHPPgAdmin\Traits;
trait HelperTrait
{
/**
- * static reference to subfolder in which the app is running.
- *
- * @var null|string
- */
- public static $subFolder = null;
-
- /**
- * Gets the subfolder.
- *
- * @param string $path The path
- *
- * @return string the subfolder
- */
- public function getSubfolder(string $path = ''): string
- {
- if (null === self::$subFolder) {
- self::$subFolder = $this->container->subfolder;
- }
-
- return \implode(\DIRECTORY_SEPARATOR, [self::$subFolder, $path]);
- }
-
- /**
* Halts the execution of the program. It's like calling exit() but using builtin Slim Exceptions.
*
* @param string $msg The message to show to the user
@@ -173,18 +150,6 @@ trait HelperTrait
}
/**
- * Returns a string with html <br> variant replaced with a new line.
- *
- * @param string $msg message to parse (<br> separated)
- *
- * @return string parsed message (linebreak separated)
- */
- public static function br2ln($msg)
- {
- return \str_replace(['<br>', '<br/>', '<br />'], \PHP_EOL, $msg);
- }
-
- /**
* Receives N parameters and sends them to the console adding where was it called from.
*
* @param array<int, mixed> $args
diff --git a/src/traits/InsertEditRowTrait.php b/src/traits/InsertEditRowTrait.php
index a6c2ac2a..742d518f 100644
--- a/src/traits/InsertEditRowTrait.php
+++ b/src/traits/InsertEditRowTrait.php
@@ -119,12 +119,12 @@ trait InsertEditRowTrait
$fksprops['code'] .= "var table='" . \addslashes(\htmlentities($table, \ENT_QUOTES, 'UTF-8')) . "';";
$fksprops['code'] .= "var server='" . \htmlentities($_REQUEST['server'], \ENT_QUOTES, 'UTF-8') . "';";
$fksprops['code'] .= "var database='" . \addslashes(\htmlentities($_REQUEST['database'], \ENT_QUOTES, 'UTF-8')) . "';";
- $fksprops['code'] .= "var subfolder='" . self::SUBFOLDER . "';";
+ $fksprops['code'] .= "var subfolder='" . \containerInstance()->subFolder . "';";
$fksprops['code'] .= '</script>' . \PHP_EOL;
$fksprops['code'] .= '<div id="fkbg"></div>';
$fksprops['code'] .= '<div id="fklist"></div>';
- $fksprops['code'] .= '<script src="' . self::SUBFOLDER . '/assets/js/ac_insert_row.js" type="text/javascript"></script>';
+ $fksprops['code'] .= '<script src="' . \containerInstance()->subFolder . '/assets/js/ac_insert_row.js" type="text/javascript"></script>';
} else {
/* we have no foreign keys on this table */
return false;
diff --git a/src/traits/MiscTrait.php b/src/traits/MiscTrait.php
index 7c5e21b4..be7a390c 100644
--- a/src/traits/MiscTrait.php
+++ b/src/traits/MiscTrait.php
@@ -6,6 +6,7 @@
namespace PHPPgAdmin\Traits;
+use PHPPgAdmin\ContainerUtils;
use PHPPgAdmin\Decorators\Decorator;
/**
@@ -161,11 +162,11 @@ trait MiscTrait
}
if (!isset($vars['url'])) {
- $vars['url'] = self::SUBFOLDER . '/redirect';
+ $vars['url'] = \containerInstance()->subFolder . '/redirect';
}
- if (self::SUBFOLDER . '/redirect' === $vars['url'] && isset($vars['params']['subject'])) {
- $vars['url'] = self::SUBFOLDER . '/redirect/' . $vars['params']['subject'];
+ if (containerInstance()->subFolder . '/redirect' === $vars['url'] && isset($vars['params']['subject'])) {
+ $vars['url'] = \containerInstance()->subFolder . '/redirect/' . $vars['params']['subject'];
unset($vars['params']['subject']);
}
@@ -287,7 +288,7 @@ trait MiscTrait
case 'cid':
case 'tid':
$align = 'right';
- $out = \nl2br(\htmlspecialchars(self::br2ln($str)));
+ $out = \nl2br(\htmlspecialchars(ContainerUtils::br2ln($str)));
break;
case 'yesno':
@@ -319,7 +320,7 @@ trait MiscTrait
break;
case 'nbsp':
- $out = \nl2br(\str_replace(' ', '&nbsp;', self::br2ln($str)));
+ $out = \nl2br(\str_replace(' ', '&nbsp;', ContainerUtils::br2ln($str)));
break;
case 'verbatim':
@@ -345,7 +346,7 @@ trait MiscTrait
$out = \htmlspecialchars($str);
} else {
//$tag = 'span';
- $out = \nl2br(\htmlspecialchars(self::br2ln($str)));
+ $out = \nl2br(\htmlspecialchars(ContainerUtils::br2ln($str)));
}
}
@@ -1038,14 +1039,14 @@ trait MiscTrait
return [
'sql' => [
'title' => $lang['strsql'],
- 'url' => self::SUBFOLDER . '/src/views/sqledit',
+ 'url' => \containerInstance()->subFolder . '/src/views/sqledit',
'urlvars' => ['action' => 'sql', 'subject' => 'schema'],
'help' => 'pg.sql',
'icon' => 'SqlEditor',
],
'find' => [
'title' => $lang['strfind'],
- 'url' => self::SUBFOLDER . '/src/views/sqledit',
+ 'url' => \containerInstance()->subFolder . '/src/views/sqledit',
'urlvars' => ['action' => 'find', 'subject' => 'schema'],
'icon' => 'Search',
],
@@ -1143,43 +1144,56 @@ trait MiscTrait
$tabs = [];
switch ($section) {
- case 'root':$tabs = $this->getTabsRoot($data);
+ case 'root':
+ $tabs = $this->getTabsRoot($data);
break;
- case 'server':$tabs = $this->getTabsServer($data);
+ case 'server':
+ $tabs = $this->getTabsServer($data);
break;
- case 'database':$tabs = $this->getTabsDatabase($data);
+ case 'database':
+ $tabs = $this->getTabsDatabase($data);
break;
- case 'schema':$tabs = $this->getTabsSchema($data);
+ case 'schema':
+ $tabs = $this->getTabsSchema($data);
break;
- case 'table':$tabs = $this->getTabsTable($data);
+ case 'table':
+ $tabs = $this->getTabsTable($data);
break;
- case 'view':$tabs = $this->getTabsView($data);
+ case 'view':
+ $tabs = $this->getTabsView($data);
break;
- case 'matview':$tabs = $this->getTabsMatview($data);
+ case 'matview':
+ $tabs = $this->getTabsMatview($data);
break;
- case 'function':$tabs = $this->getTabsFunction($data);
+ case 'function':
+ $tabs = $this->getTabsFunction($data);
break;
- case 'aggregate':$tabs = $this->getTabsAggregate($data);
+ case 'aggregate':
+ $tabs = $this->getTabsAggregate($data);
break;
- case 'role':$tabs = $this->getTabsRole($data);
+ case 'role':
+ $tabs = $this->getTabsRole($data);
break;
- case 'popup':$tabs = $this->getTabsPopup($data);
+ case 'popup':
+ $tabs = $this->getTabsPopup($data);
break;
- case 'column':$tabs = $this->getTabsColumn($data);
+ case 'column':
+ $tabs = $this->getTabsColumn($data);
break;
- case 'fulltext':$tabs = $this->getTabsFulltext($data);
+ case 'fulltext':
+ $tabs = $this->getTabsFulltext($data);
break;
}
diff --git a/src/traits/ViewsMatviewsTrait.php b/src/traits/ViewsMatviewsTrait.php
index 9a35516d..15813802 100644
--- a/src/traits/ViewsMatviewsTrait.php
+++ b/src/traits/ViewsMatviewsTrait.php
@@ -64,7 +64,7 @@ trait ViewsMatviewsTrait
$attrs = $data->getTableAttributes($_REQUEST[$this->keystring]);
- echo '<form action="' . self::SUBFOLDER . '/src/views/' . $this->script . '" method="post" id="selectform">';
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/' . $this->script . '" method="post" id="selectform">';
echo \PHP_EOL;
if (0 < $attrs->recordCount()) {
@@ -118,12 +118,13 @@ trait ViewsMatviewsTrait
'>', \htmlspecialchars($v), '</option>' . \PHP_EOL;
}
echo '</select></td>' . \PHP_EOL;
- echo '<td style="white-space:nowrap;">', $data->printField(
+ echo '<td style="white-space:nowrap;">';
+ echo $data->printField(
"values[{$attrs->fields['attname']}]",
$_REQUEST['values'][$attrs->fields['attname']],
$attrs->fields['type']
- ), '</td>';
- echo '</tr>' . \PHP_EOL;
+ );
+ echo '</td></tr>' . \PHP_EOL;
++$i;
$attrs->moveNext();
}
@@ -184,7 +185,7 @@ trait ViewsMatviewsTrait
$tables = $data->getAllTables();
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$this->script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$this->script}\" method=\"post\">" . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strtables']}</th></tr>";
echo "<tr>\n<td class=\"data1\">" . \PHP_EOL;
@@ -322,7 +323,7 @@ trait ViewsMatviewsTrait
$status = $data->createView($_POST['formView'], $viewQuery, false, $_POST['formComment'], $is_materialized);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
return $this->doDefault($this->lang['strviewcreated']);
}
@@ -375,7 +376,7 @@ trait ViewsMatviewsTrait
}
\asort($arrFields);
- echo '<form action="' . self::SUBFOLDER . '/src/views/materializedviews" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/materializedviews" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strviewname']}</th></tr>";
echo "<tr>\n<td class=\"data1\">" . \PHP_EOL;
@@ -409,6 +410,7 @@ trait ViewsMatviewsTrait
for ($i = 0; $i < $linkCount; ++$i) {
// Initialise variables
+ $formLink[$i] = $formLink[$i] ?? [];
$this->coalesceArr($formLink[$i], 'operator', 'INNER JOIN');
echo "<tr>\n<td class=\"{$rowClass}\">" . \PHP_EOL;
diff --git a/src/translations/Afrikaans.php b/src/translations/Afrikaans.php
index 54633668..4a29df04 100644
--- a/src/translations/Afrikaans.php
+++ b/src/translations/Afrikaans.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Afrikaans language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Afrikaans extends AbstractLang
{
diff --git a/src/translations/Arabic.php b/src/translations/Arabic.php
index c1adb2c2..2bd22f60 100644
--- a/src/translations/Arabic.php
+++ b/src/translations/Arabic.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Arabic language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Arabic extends AbstractLang
{
diff --git a/src/translations/Catalan.php b/src/translations/Catalan.php
index f8f7697b..962f8803 100644
--- a/src/translations/Catalan.php
+++ b/src/translations/Catalan.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Catalan language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Catalan extends AbstractLang
{
diff --git a/src/translations/ChineseSim.php b/src/translations/ChineseSim.php
index 3d45e39a..7226d468 100644
--- a/src/translations/ChineseSim.php
+++ b/src/translations/ChineseSim.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseSim language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class ChineseSim extends AbstractLang
{
diff --git a/src/translations/ChineseTr.php b/src/translations/ChineseTr.php
index 0f52b9b7..e6769dbf 100644
--- a/src/translations/ChineseTr.php
+++ b/src/translations/ChineseTr.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseTr language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class ChineseTr extends AbstractLang
{
diff --git a/src/translations/ChineseUtf8ZhCn.php b/src/translations/ChineseUtf8ZhCn.php
index 4bc315f3..65e85201 100644
--- a/src/translations/ChineseUtf8ZhCn.php
+++ b/src/translations/ChineseUtf8ZhCn.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseUtf8ZhCn language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class ChineseUtf8ZhCn extends AbstractLang
{
diff --git a/src/translations/ChineseUtf8ZhTw.php b/src/translations/ChineseUtf8ZhTw.php
index dc4c5fa3..7edf1027 100644
--- a/src/translations/ChineseUtf8ZhTw.php
+++ b/src/translations/ChineseUtf8ZhTw.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseUtf8ZhTw language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class ChineseUtf8ZhTw extends AbstractLang
{
diff --git a/src/translations/Czech.php b/src/translations/Czech.php
index a331f8f3..a3a5d3e3 100644
--- a/src/translations/Czech.php
+++ b/src/translations/Czech.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Czech language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Czech extends AbstractLang
{
diff --git a/src/translations/Danish.php b/src/translations/Danish.php
index 084b475f..2603f9eb 100644
--- a/src/translations/Danish.php
+++ b/src/translations/Danish.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Danish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Danish extends AbstractLang
{
diff --git a/src/translations/Dutch.php b/src/translations/Dutch.php
index c66ef240..26a2137b 100644
--- a/src/translations/Dutch.php
+++ b/src/translations/Dutch.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Dutch language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Dutch extends AbstractLang
{
diff --git a/src/translations/English.php b/src/translations/English.php
index c1782fd0..007157a1 100644
--- a/src/translations/English.php
+++ b/src/translations/English.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Ukrainian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class English extends AbstractLang
{
diff --git a/src/translations/French.php b/src/translations/French.php
index 603b5337..32047076 100644
--- a/src/translations/French.php
+++ b/src/translations/French.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for French language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class French extends AbstractLang
{
diff --git a/src/translations/Galician.php b/src/translations/Galician.php
index 08c1fc41..37da8d75 100644
--- a/src/translations/Galician.php
+++ b/src/translations/Galician.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Galician language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Galician extends AbstractLang
{
diff --git a/src/translations/German.php b/src/translations/German.php
index 0b0c6e04..3057dfdd 100644
--- a/src/translations/German.php
+++ b/src/translations/German.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for German language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class German extends AbstractLang
{
diff --git a/src/translations/Greek.php b/src/translations/Greek.php
index 34348a6a..b02b2c17 100644
--- a/src/translations/Greek.php
+++ b/src/translations/Greek.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Greek language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Greek extends AbstractLang
{
diff --git a/src/translations/Hebrew.php b/src/translations/Hebrew.php
index b2d5f4c0..e92f2818 100644
--- a/src/translations/Hebrew.php
+++ b/src/translations/Hebrew.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Hebrew language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Hebrew extends AbstractLang
{
diff --git a/src/translations/Hungarian.php b/src/translations/Hungarian.php
index 7b9ff72b..d08856a0 100644
--- a/src/translations/Hungarian.php
+++ b/src/translations/Hungarian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Hungarian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Hungarian extends AbstractLang
{
diff --git a/src/translations/Italian.php b/src/translations/Italian.php
index f024c63d..976a143f 100644
--- a/src/translations/Italian.php
+++ b/src/translations/Italian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Italian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Italian extends AbstractLang
{
diff --git a/src/translations/Japanese.php b/src/translations/Japanese.php
index b25d1e75..6af1161e 100644
--- a/src/translations/Japanese.php
+++ b/src/translations/Japanese.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Japanese language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Japanese extends AbstractLang
{
diff --git a/src/translations/Lithuanian.php b/src/translations/Lithuanian.php
index 727d266f..428d675c 100644
--- a/src/translations/Lithuanian.php
+++ b/src/translations/Lithuanian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Lithuanian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Lithuanian extends AbstractLang
{
diff --git a/src/translations/Mongol.php b/src/translations/Mongol.php
index 6129cffe..b74aedf4 100644
--- a/src/translations/Mongol.php
+++ b/src/translations/Mongol.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Mongol language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Mongol extends AbstractLang
{
diff --git a/src/translations/Polish.php b/src/translations/Polish.php
index ce12d448..a40cb2fc 100644
--- a/src/translations/Polish.php
+++ b/src/translations/Polish.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Polish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Polish extends AbstractLang
{
diff --git a/src/translations/PortugueseBr.php b/src/translations/PortugueseBr.php
index 40b219bd..d033e61f 100644
--- a/src/translations/PortugueseBr.php
+++ b/src/translations/PortugueseBr.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for PortugueseBr language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PortugueseBr extends AbstractLang
{
diff --git a/src/translations/PortuguesePt.php b/src/translations/PortuguesePt.php
index 395b3fe4..3f876f6a 100644
--- a/src/translations/PortuguesePt.php
+++ b/src/translations/PortuguesePt.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for PortuguesePt language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PortuguesePt extends AbstractLang
{
diff --git a/src/translations/Romanian.php b/src/translations/Romanian.php
index 184eba41..77976706 100644
--- a/src/translations/Romanian.php
+++ b/src/translations/Romanian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Romanian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Romanian extends AbstractLang
{
diff --git a/src/translations/Russian.php b/src/translations/Russian.php
index 03c37111..37d4a930 100644
--- a/src/translations/Russian.php
+++ b/src/translations/Russian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Russian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Russian extends AbstractLang
{
diff --git a/src/translations/RussianUtf8.php b/src/translations/RussianUtf8.php
index bbe96e70..4aad8cad 100644
--- a/src/translations/RussianUtf8.php
+++ b/src/translations/RussianUtf8.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for RussianUtf8 language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class RussianUtf8 extends AbstractLang
{
diff --git a/src/translations/Slovak.php b/src/translations/Slovak.php
index e3834a5e..6427a83d 100644
--- a/src/translations/Slovak.php
+++ b/src/translations/Slovak.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Slovak language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Slovak extends AbstractLang
{
diff --git a/src/translations/Spanish.php b/src/translations/Spanish.php
index 9f6d6a77..63bb9e18 100644
--- a/src/translations/Spanish.php
+++ b/src/translations/Spanish.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Spanish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Spanish extends AbstractLang
{
diff --git a/src/translations/Swedish.php b/src/translations/Swedish.php
index 6eaa8791..23818a96 100644
--- a/src/translations/Swedish.php
+++ b/src/translations/Swedish.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Swedish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Swedish extends AbstractLang
{
diff --git a/src/translations/Turkish.php b/src/translations/Turkish.php
index 897a1da6..ab32559e 100644
--- a/src/translations/Turkish.php
+++ b/src/translations/Turkish.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Turkish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Turkish extends AbstractLang
{
diff --git a/src/translations/Ukrainian.php b/src/translations/Ukrainian.php
index d73366d9..5029df01 100644
--- a/src/translations/Ukrainian.php
+++ b/src/translations/Ukrainian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Ukrainian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Ukrainian extends AbstractLang
{
diff --git a/src/xhtml/HTMLController.php b/src/xhtml/HTMLController.php
index 27e2f3e4..192253e7 100644
--- a/src/xhtml/HTMLController.php
+++ b/src/xhtml/HTMLController.php
@@ -6,7 +6,6 @@
namespace PHPPgAdmin\XHtml;
-use PHPPgAdmin\ContainerUtils;
use PHPPgAdmin\Decorators\Decorator;
/**
@@ -15,18 +14,6 @@ use PHPPgAdmin\Decorators\Decorator;
class HTMLController
{
use \PHPPgAdmin\Traits\HelperTrait;
- /**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
public $form = '';
@@ -40,24 +27,33 @@ class HTMLController
public $controller_title = 'html';
+ /**
+ * @var \PHPPgAdmin\ViewManager
+ */
public $view;
+ /**
+ * @var \PHPPgAdmin\Misc
+ */
+ public $misc;
+
public $appName;
public $appVersion;
public $appLangFiles;
- public $misc;
-
public $conf;
public $appThemes;
+ /**
+ * @var \PHPPgAdmin\ContainerUtils
+ */
protected $container;
// Constructor
- public function __construct(\Slim\Container $container, $controller_name = null)
+ public function __construct(\PHPPgAdmin\ContainerUtils $container, $controller_name = null)
{
$this->container = $container;
$this->lang = $container->get('lang');
diff --git a/src/xhtml/HTMLFooterController.php b/src/xhtml/HTMLFooterController.php
index 17ca4695..e529a56f 100644
--- a/src/xhtml/HTMLFooterController.php
+++ b/src/xhtml/HTMLFooterController.php
@@ -55,7 +55,7 @@ class HTMLFooterController extends HTMLController
{
$reload_param = 'none';
- if ($this->misc->getReloadBrowser()) {
+ if ($this->view->getReloadBrowser()) {
$reload_param = 'other';
} elseif ($this->_reload_drop_database) {
$reload_param = 'database';
diff --git a/src/xhtml/HTMLHeaderController.php b/src/xhtml/HTMLHeaderController.php
index db21960e..41b70086 100644
--- a/src/xhtml/HTMLHeaderController.php
+++ b/src/xhtml/HTMLHeaderController.php
@@ -15,6 +15,8 @@ class HTMLHeaderController extends HTMLController
private $_no_output = false;
+ private $_reload_drop_database = false;
+
/**
* Sets the value of private member variable $_no_output.
*
@@ -42,8 +44,6 @@ class HTMLHeaderController extends HTMLController
*/
public function printHeader($title = '', $script = null, $do_print = true, $template = 'header.twig')
{
-
-
$lang = $this->lang;
$viewVars = [];
@@ -51,8 +51,16 @@ class HTMLHeaderController extends HTMLController
$viewVars['dir'] = (0 !== \strcasecmp($lang['applangdir'], 'ltr')) ? ' dir="' . \htmlspecialchars($lang['applangdir']) . '"' : '';
$viewVars['headertemplate'] = $template;
$viewVars['title'] = ('' !== $title) ? ' - ' . $title : '';
+ $viewVars['lang'] = $lang;
$viewVars['appName'] = \htmlspecialchars($this->appName);
+ $reload_param = 'none';
+ if ($this->view->getReloadBrowser()) {
+ $reload_param = 'other';
+ } elseif ($this->_reload_drop_database) {
+ $reload_param = 'database';
+ }
+ $viewVars['reload'] = $reload_param;
$viewVars['script'] = $script;
$header_html = $this->view->fetch($template, $viewVars);
diff --git a/src/xhtml/HTMLNavbarController.php b/src/xhtml/HTMLNavbarController.php
index beac11c0..fe0c28cf 100644
--- a/src/xhtml/HTMLNavbarController.php
+++ b/src/xhtml/HTMLNavbarController.php
@@ -46,8 +46,6 @@ class HTMLNavbarController extends HTMLController
];
$viewVars = $this->_getSearchPathsCrumbs($crumbs, $viewVars);
- //\Kint::dump($viewVars);
-
$trail_html .= $this->getContainer()->view->fetch('components/trail.twig', $viewVars);
if ($do_print) {
@@ -60,6 +58,29 @@ class HTMLNavbarController extends HTMLController
}
/**
+ * Get the URL for the last active tab of a particular tab bar.
+ *
+ * @param string $section
+ *
+ * @return null|mixed
+ */
+ public function getLastTabURL($section)
+ {
+ //$data = $this->getDatabaseAccessor();
+
+ $tabs = $this->misc->getNavTabs($section);
+
+ if (isset($_SESSION['webdbLastTab'][$section], $tabs[$_SESSION['webdbLastTab'][$section]])) {
+ $tab = $tabs[$_SESSION['webdbLastTab'][$section]];
+ } else {
+ $tab = \reset($tabs);
+ }
+ // $this->prtrace(['section' => $section, 'tabs' => $tabs, 'tab' => $tab]);
+
+ return isset($tab['url']) ? $tab : null;
+ }
+
+ /**
* Display navigation tabs.
*
* @param string $alltabs The name of current section (Ex: intro, server, ...),
@@ -73,6 +94,11 @@ class HTMLNavbarController extends HTMLController
$from = $from ? $from : __METHOD__;
$this->misc = $this->misc;
+ $_SESSION['webdbLastTab'] = $_SESSION['webdbLastTab'] ?? [];
+
+ if (!\is_array($_SESSION['webdbLastTab'])) {
+ $_SESSION['webdbLastTab'] = [$alltabs => $activetab];
+ }
if (\is_string($alltabs)) {
$_SESSION['webdbLastTab'][$alltabs] = $activetab;
@@ -166,7 +192,7 @@ class HTMLNavbarController extends HTMLController
foreach ($search_paths as $schema) {
$url = \str_replace(['&amp;', 'redirect/database'], ['&', 'redirect/schema'], $dburl . '&schema=' . $schema);
- $destination = $this->container->utils->getDestinationWithLastTab('database');
+ $destination = $this->container->getDestinationWithLastTab('database');
//$this->dump(['url' => $url, 'destination' => $destination]);
$search_path_crumbs[$schema] = [
'title' => $lang['strschema'],
@@ -222,7 +248,7 @@ class HTMLNavbarController extends HTMLController
'sql' => [
'attr' => [
'href' => [
- 'url' => self::SUBFOLDER . '/src/views/sqledit',
+ 'url' => \containerInstance()->subFolder . '/src/views/sqledit',
'urlvars' => \array_merge($reqvars, [
'action' => 'sql',
]),
@@ -236,7 +262,7 @@ class HTMLNavbarController extends HTMLController
'history' => [
'attr' => [
'href' => [
- 'url' => self::SUBFOLDER . '/src/views/history',
+ 'url' => \containerInstance()->subFolder . '/src/views/history',
'urlvars' => \array_merge($reqvars, [
'action' => 'pophistory',
]),
@@ -249,7 +275,7 @@ class HTMLNavbarController extends HTMLController
'find' => [
'attr' => [
'href' => [
- 'url' => self::SUBFOLDER . '/src/views/sqledit',
+ 'url' => \containerInstance()->subFolder . '/src/views/sqledit',
'urlvars' => \array_merge($reqvars, [
'action' => 'find',
]),
@@ -263,7 +289,7 @@ class HTMLNavbarController extends HTMLController
'logout' => [
'attr' => [
'href' => [
- 'url' => self::SUBFOLDER . '/src/views/servers',
+ 'url' => \containerInstance()->subFolder . '/src/views/servers',
'urlvars' => [
'action' => 'logout',
'logoutServer' => \sha1("{$server_info['host']}:{$server_info['port']}:{$server_info['sslmode']}"),
@@ -325,7 +351,7 @@ class HTMLNavbarController extends HTMLController
$trail['root'] = [
'text' => $appName,
- 'url' => self::SUBFOLDER . '/src/views/servers',
+ 'url' => \containerInstance()->subFolder . '/src/views/servers',
'icon' => 'Introduction',
];
diff --git a/src/xhtml/HTMLTableController.php b/src/xhtml/HTMLTableController.php
index dbd6d2a0..41391ab8 100644
--- a/src/xhtml/HTMLTableController.php
+++ b/src/xhtml/HTMLTableController.php
@@ -210,7 +210,7 @@ class HTMLTableController extends HTMLController
$lang = $this->lang;
if ($this->has_ma) {
- $matop_html .= '<script src="' . self::SUBFOLDER . '/assets/js/multiactionform.js" type="text/javascript"></script>' . \PHP_EOL;
+ $matop_html .= '<script src="' . \containerInstance()->subFolder . '/assets/js/multiactionform.js" type="text/javascript"></script>' . \PHP_EOL;
$matop_html .= \sprintf('<form id="multi_form" action="%s" method="post" enctype="multipart/form-data">%s', $this->ma['url'], \PHP_EOL);
$this->coalesceArr($this->ma, 'vars', []);
@@ -293,7 +293,6 @@ class HTMLTableController extends HTMLController
foreach ($this->ma['keycols'] as $k => $v) {
$a[$k] = $tabledata->fields[$v];
}
- //\Kint::dump($a);
$tbody_html .= \sprintf('<td><input type="checkbox" name="ma[]" value="%s"/></td>', \htmlentities(\serialize($a), \ENT_COMPAT, 'UTF-8')) . \PHP_EOL;
}
diff --git a/src/xhtml/XHtmlSimpleElement.php b/src/xhtml/XHtmlSimpleElement.php
index d08abadf..fa529fa8 100644
--- a/src/xhtml/XHtmlSimpleElement.php
+++ b/src/xhtml/XHtmlSimpleElement.php
@@ -6,8 +6,6 @@
namespace PHPPgAdmin\XHtml;
-use PHPPgAdmin\ContainerUtils;
-
/**
* XHtmlSimpleElement.
*
@@ -19,18 +17,6 @@ use PHPPgAdmin\ContainerUtils;
class XHtmlSimpleElement
{
use \PHPPgAdmin\Traits\HelperTrait;
- /**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
public $_element;
diff --git a/tests/_support/Helper/Unit.php b/tests/_support/Helper/Unit.php
index 447192dd..abb182cc 100644
--- a/tests/_support/Helper/Unit.php
+++ b/tests/_support/Helper/Unit.php
@@ -7,49 +7,31 @@
namespace Helper;
\defined('IN_TEST') || \define('IN_TEST', true);
-use PHPPgAdmin\ContainerUtils;
-if (!\is_readable(ContainerUtils::BASE_PATH . '/src/lib.inc.php')) {
+$bootstrapfile = \dirname(__DIR__, 3) . '/src/lib.inc.php';
+
+if (!\is_readable($bootstrapfile)) {
die('lib.inc.php is not readable');
}
-\defined('IN_TEST') || \define('IN_TEST', true);
-require_once ContainerUtils::BASE_PATH . '/src/lib.inc.php';
+require_once $bootstrapfile;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class Unit extends \Codeception\Module
{
/**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
-
- /**
* @var \PHPPgAdmin
*/
private static $_container;
private static $_conf;
- public static function getDir()
- {
- return self::DIRNAME;
- }
-
public static function getContainer()
{
//$conf = self::getConf();
if (!static::$_container) {
- self::$_container = ContainerUtils::getContainerInstance();
+ self::$_container = containerInstance();
}
//dump(PHP_SAPI);
diff --git a/tests/unit/ContainerTest.php b/tests/unit/ContainerTest.php
index 7f435d94..aee3a87f 100644
--- a/tests/unit/ContainerTest.php
+++ b/tests/unit/ContainerTest.php
@@ -20,7 +20,6 @@ class ContainerTest extends \Codeception\Test\Unit
public function testContainerValidity(): void
{
- $utils = $this->container['utils'];
self::assertTrue(
$this->container instanceof \Psr\Container\ContainerInterface,
'$container must be an instance of \Psr\Container\ContainerInterface'
@@ -29,9 +28,8 @@ class ContainerTest extends \Codeception\Test\Unit
public function testContainerUtils(): void
{
- $utils = $this->container['utils'];
self::assertTrue(
- $this->container->utils instanceof \PHPPgAdmin\ContainerUtils,
+ $this->container instanceof \PHPPgAdmin\ContainerUtils,
'$container->utils must be an instance of PHPPgAdmin\ContainerUtils'
);
}
@@ -56,7 +54,7 @@ class ContainerTest extends \Codeception\Test\Unit
{
$Helper = $this->getModule('\Helper\Unit');
$this->container = $Helper::getContainer();
- self::$BASE_PATH = $Helper::BASE_PATH;
+ self::$BASE_PATH = $this->container->BASE_PATH;
$this->container->misc->setNoDBConnection(true);
}
diff --git a/tests/unit/DataEntitiesTest.php b/tests/unit/DataEntitiesTest.php
index a16d5f7e..b076f184 100644
--- a/tests/unit/DataEntitiesTest.php
+++ b/tests/unit/DataEntitiesTest.php
@@ -63,7 +63,7 @@ class DataEntitiesTest extends \Codeception\Test\Unit
{
$Helper = $this->getModule('\Helper\Unit');
$this->container = $Helper::getContainer();
- self::$BASE_PATH = $Helper::BASE_PATH;
+ self::$BASE_PATH = self::$BASE_PATH = $this->container->BASE_PATH;
$this->container->get('misc')->setNoDBConnection(true);
// Helper
// \Codeception\Util\Debug::debug('BASE_PATH is ' . \BASE_PATH);
diff --git a/tests/unit/PublicSectionsTest.php b/tests/unit/PublicSectionsTest.php
index 4a6bb7da..bd1d57ba 100644
--- a/tests/unit/PublicSectionsTest.php
+++ b/tests/unit/PublicSectionsTest.php
@@ -133,7 +133,7 @@ class PublicSectionsTest extends \Codeception\Test\Unit
{
$Helper = $this->getModule('\Helper\Unit');
$this->container = $Helper::getContainer();
- self::$BASE_PATH = $Helper::BASE_PATH;
+ self::$BASE_PATH = self::$BASE_PATH = $this->container->BASE_PATH;
$this->container->get('misc')->setNoDBConnection(true);
// Helper
//\Codeception\Util\Debug::debug('BASE_PATH is ' . \BASE_PATH);
diff --git a/tests/unit/TablesAndViewsTest.php b/tests/unit/TablesAndViewsTest.php
index 3d6004a9..a362805f 100644
--- a/tests/unit/TablesAndViewsTest.php
+++ b/tests/unit/TablesAndViewsTest.php
@@ -86,7 +86,7 @@ class TablesAndViewsTest extends \Codeception\Test\Unit
{
$Helper = $this->getModule('\Helper\Unit');
$this->container = $Helper::getContainer();
- self::$BASE_PATH = $Helper::BASE_PATH;
+ self::$BASE_PATH = self::$BASE_PATH = $this->container->BASE_PATH;
$this->container->get('misc')->setNoDBConnection(true);
//\Codeception\Util\Debug::debug('BASE_PATH is ' . \BASE_PATH);
}
diff --git a/tests/unit/UserEntitiesTest.php b/tests/unit/UserEntitiesTest.php
index bd1345cc..76072ed3 100644
--- a/tests/unit/UserEntitiesTest.php
+++ b/tests/unit/UserEntitiesTest.php
@@ -63,7 +63,7 @@ class UserEntitiesTest extends \Codeception\Test\Unit
{
$Helper = $this->getModule('\Helper\Unit');
$this->container = $Helper::getContainer();
- self::$BASE_PATH = $Helper::BASE_PATH;
+ self::$BASE_PATH = self::$BASE_PATH = $this->container->BASE_PATH;
$this->container->get('misc')->setNoDBConnection(true);
// Helper
//\Codeception\Util\Debug::debug('BASE_PATH is ' . \BASE_PATH);
diff --git a/tests/unit/ViewTest.php b/tests/unit/ViewTest.php
index 77a473b9..b758f7c1 100644
--- a/tests/unit/ViewTest.php
+++ b/tests/unit/ViewTest.php
@@ -178,7 +178,7 @@ class ViewTest extends \Codeception\Test\Unit
{
$Helper = $this->getModule('\Helper\Unit');
$this->container = $Helper::getContainer();
- self::$BASE_PATH = $Helper::BASE_PATH;
+ self::$BASE_PATH = self::$BASE_PATH = $this->container->BASE_PATH;
$this->container->get('misc')->setNoDBConnection(true);
// Helper
//\Codeception\Util\Debug::debug('BASE_PATH is ' . \BASE_PATH);
diff --git a/tools/composer-require-checker b/tools/composer-require-checker
new file mode 120000
index 00000000..5a931534
--- /dev/null
+++ b/tools/composer-require-checker
@@ -0,0 +1 @@
+/home/ffflabs/.phive/phars/composer-require-checker-2.1.0.phar \ No newline at end of file
diff --git a/tools/phpcpd b/tools/phpcpd
new file mode 120000
index 00000000..8e085ba5
--- /dev/null
+++ b/tools/phpcpd
@@ -0,0 +1 @@
+/home/ffflabs/.phive/phars/phpcpd-4.1.0.phar \ No newline at end of file
diff --git a/tools/phpcs b/tools/phpcs
new file mode 120000
index 00000000..18b16ce6
--- /dev/null
+++ b/tools/phpcs
@@ -0,0 +1 @@
+/home/ffflabs/.phive/phars/phpcs-3.5.3.phar \ No newline at end of file
diff --git a/tools/phpmd b/tools/phpmd
new file mode 120000
index 00000000..7384b0ce
--- /dev/null
+++ b/tools/phpmd
@@ -0,0 +1 @@
+/home/ffflabs/.phive/phars/phpmd-2.7.0.phar \ No newline at end of file
diff --git a/tools/reviewdog b/tools/reviewdog
new file mode 100755
index 00000000..cf8bccd2
--- /dev/null
+++ b/tools/reviewdog
Binary files differ
diff --git a/yarn.lock b/yarn.lock
index 86e6daf9..de321dfa 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -109,31 +109,13 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"
-"@nodelib/fs.scandir@2.1.3":
- version "2.1.3"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
- integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==
- dependencies:
- "@nodelib/fs.stat" "2.0.3"
- run-parallel "^1.1.9"
-
-"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2":
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3"
- integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==
-
-"@nodelib/fs.walk@^1.2.3":
- version "1.2.4"
- resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976"
- integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==
- dependencies:
- "@nodelib/fs.scandir" "2.1.3"
- fastq "^1.6.0"
-
"@types/color-name@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
+ dependencies:
+ "@nodelib/fs.stat" "2.0.3"
+ run-parallel "^1.1.9"
"@types/jquery@^3.5.1":
version "3.5.1"
@@ -142,7 +124,25 @@
dependencies:
"@types/sizzle" "*"
-"@types/json-schema@^7.0.3":
+"@types/sizzle@*":
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.2.tgz#a811b8c18e2babab7d542b3365887ae2e4d9de47"
+ integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==
+
+acorn-jsx@^5.2.0:
+ version "5.3.1"
+ resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b"
+ integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==
+
+acorn@^7.4.0:
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c"
+ integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==
+
+ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.4:
+ version "6.12.4"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234"
+ integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==
version "7.0.6"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0"
integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==
@@ -529,10 +529,10 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
-eslint-config-prettier@^6.12.0:
- version "6.12.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.12.0.tgz#9eb2bccff727db1c52104f0b49e87ea46605a0d2"
- integrity sha512-9jWPlFlgNwRUYVoujvWTQ1aMO8o6648r+K7qU7K5Jmkbyqav1fuEZC0COYpGBxyiAJb65Ra9hrmFx19xRGwXWw==
+eslint-config-prettier@^6.11.0:
+ version "6.11.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1"
+ integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==
dependencies:
get-stdin "^6.0.0"
@@ -543,15 +543,15 @@ eslint-plugin-prettier@^3.1.4:
dependencies:
prettier-linter-helpers "^1.0.0"
-eslint-scope@^5.0.0, eslint-scope@^5.1.1:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
- integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
+eslint-scope@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.0.tgz#d0f971dfe59c69e0cada684b23d49dbf82600ce5"
+ integrity sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==
dependencies:
esrecurse "^4.3.0"
estraverse "^4.1.1"
-eslint-utils@^2.0.0, eslint-utils@^2.1.0:
+eslint-utils@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27"
integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==
@@ -563,10 +563,10 @@ eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
-eslint-visitor-keys@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8"
- integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
+eslint@^7.8.1:
+ version "7.8.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.8.1.tgz#e59de3573fb6a5be8ff526c791571646d124a8fa"
+ integrity sha512-/2rX2pfhyUG0y+A123d0ccXtMm7DV7sH1m3lk9nk2DZ2LReq39FXHueR9xZwshE5MdfSf0xunSaMWRqyIA6M1w==
eslint@^7.10.0:
version "7.10.0"
@@ -581,7 +581,7 @@ eslint@^7.10.0:
debug "^4.0.1"
doctrine "^3.0.0"
enquirer "^2.3.5"
- eslint-scope "^5.1.1"
+ eslint-scope "^5.1.0"
eslint-utils "^2.1.0"
eslint-visitor-keys "^1.3.0"
espree "^7.3.0"
@@ -686,13 +686,6 @@ fast-levenshtein@^2.0.6:
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
-fastq@^1.6.0:
- version "1.8.0"
- resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.8.0.tgz#550e1f9f59bbc65fe185cb6a9b4d95357107f481"
- integrity sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==
- dependencies:
- reusify "^1.0.4"
-
file-entry-cache@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
@@ -772,17 +765,17 @@ globals@^9.18.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==
-globby@^11.0.1:
- version "11.0.1"
- resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357"
- integrity sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==
+graceful-fs@^4.1.2:
+ version "4.2.4"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
+ integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
+
+has-ansi@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
+ integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=
dependencies:
- array-union "^2.1.0"
- dir-glob "^3.0.1"
- fast-glob "^3.1.1"
- ignore "^5.1.4"
- merge2 "^1.3.0"
- slash "^3.0.0"
+ ansi-regex "^2.0.0"
graceful-fs@^4.1.2:
version "4.2.4"
@@ -816,17 +809,17 @@ ignore@^4.0.6:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
-ignore@^5.1.4:
- version "5.1.8"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
- integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
-
image-size@~0.5.0:
version "0.5.5"
resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=
import-fresh@^3.0.0, import-fresh@^3.2.1:
+ version "0.5.5"
+ resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
+ integrity sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=
+
+import-fresh@^3.0.0, import-fresh@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==
@@ -876,11 +869,6 @@ is-glob@^4.0.0, is-glob@^4.0.1:
dependencies:
is-extglob "^2.1.1"
-is-number@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
- integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
-
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
@@ -949,7 +937,7 @@ levn@^0.4.1:
prelude-ls "^1.2.1"
type-check "~0.4.0"
-lodash@^4.12.0, lodash@^4.15.0, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.4:
+lodash@^4.12.0, lodash@^4.15.0, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.4:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
@@ -1021,10 +1009,10 @@ melody-types@^1.7.5:
dependencies:
babel-types "^6.8.1"
-merge2@^1.3.0:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
- integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
+mime@^1.4.1:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
+ integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
micromatch@^4.0.2:
version "4.0.2"
@@ -1124,15 +1112,15 @@ path-parse@^1.0.6:
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
-path-type@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
- integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
+pify@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
+ integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
-picomatch@^2.0.5, picomatch@^2.2.1:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
- integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
+prelude-ls@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
+ integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==
pify@^4.0.1:
version "4.0.1"
@@ -1169,10 +1157,10 @@ prettier@^1.8.2:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
-prettier@^2.1.2:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5"
- integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==
+prettier@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.1.tgz#d9485dd5e499daa6cb547023b87a6cf51bee37d6"
+ integrity sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==
progress@^2.0.0:
version "2.0.3"
@@ -1194,7 +1182,7 @@ regenerator-runtime@^0.11.0:
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
-regexpp@^3.0.0, regexpp@^3.1.0:
+regexpp@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2"
integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==
@@ -1211,11 +1199,6 @@ resolve@^1.12.0:
dependencies:
path-parse "^1.0.6"
-reusify@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
- integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
-
rimraf@2.6.3:
version "2.6.3"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
@@ -1223,17 +1206,12 @@ rimraf@2.6.3:
dependencies:
glob "^7.1.3"
-run-parallel@^1.1.9:
- version "1.1.9"
- resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679"
- integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==
-
semver@^5.6.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
-semver@^7.2.1, semver@^7.3.2:
+semver@^7.2.1:
version "7.3.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
@@ -1365,29 +1343,29 @@ to-fast-properties@^2.0.0:
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
-to-regex-range@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
- integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
- dependencies:
- is-number "^7.0.0"
-
-tslib@^1.10.0, tslib@^1.8.1:
+tslib@^1.10.0:
version "1.13.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==
+ dependencies:
+ is-number "^7.0.0"
tslib@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e"
integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==
+type-check@^0.4.0, type-check@~0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
+ integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==
+
tsutils@^3.17.1:
version "3.17.1"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==
dependencies:
- tslib "^1.8.1"
+ prelude-ls "^1.2.1"
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"