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-10-19 20:04:42 +0300
committerGitHub <noreply@github.com>2020-10-19 20:04:42 +0300
commit3a62e657a4ba5df4a96aba8771c61a2379801f88 (patch)
treefc78d27569b4e414cddabfc7c3caacf75d4255cb
parent6ffa0620042bbae9eec70980344e7ddf33394795 (diff)
parent78b76c8435398cfab1e80fdc29f23f49c2992c74 (diff)
Merge pull request #340 from HuasoFoundries/feature/improve_typehinting
Feature/improve typehinting
-rw-r--r--.configs/debug.kint.php52
-rw-r--r--.configs/debug.var_dumper.php43
-rw-r--r--.github/workflows/codeception_tests.yml73
-rw-r--r--.github/workflows/coding_standards.yml100
-rw-r--r--.github/workflows/rector_checkstyle.yml80
-rw-r--r--.github/workflows/static_analysis.yml115
-rw-r--r--.gitignore20
-rw-r--r--.phive/phars.xml9
-rw-r--r--.php_cs.php (renamed from .php_cs)7
-rw-r--r--.phpcs.xml19
-rw-r--r--.prettierrc42
-rw-r--r--.reviewdog.yml23
-rw-r--r--.scrutinizer.yml2
-rw-r--r--Makefile101
-rw-r--r--README.md4
-rw-r--r--assets/js/ac_insert_row.js370
-rw-r--r--assets/js/codemirror/addon/sql-lint.js62
-rw-r--r--assets/js/codemirror/codemirror_footer.js58
-rw-r--r--assets/js/codemirror/instance_codemirror.js37
-rw-r--r--assets/js/database.js143
-rw-r--r--assets/js/display.js191
-rw-r--r--assets/js/footer_scripts.js28
-rw-r--r--assets/js/footer_sqledit.js52
-rw-r--r--assets/js/functions.js414
-rw-r--r--assets/js/indexes.js139
-rw-r--r--assets/js/insert_or_edit_row.js42
-rw-r--r--assets/js/multiactionform.js14
-rw-r--r--assets/js/polyfills.js9
-rw-r--r--assets/js/tables.js11
-rw-r--r--assets/sw.dev.js78
-rw-r--r--assets/sw.js1340
-rw-r--r--assets/templates/components/common_head.twig11
-rw-r--r--assets/templates/footer_iframe.twig21
-rw-r--r--assets/themes/global.css485
-rw-r--r--assets/vendor/less.min.js (renamed from assets/js/less.min.js)0
-rw-r--r--composer-require-checker.json34
-rw-r--r--composer.json138
-rw-r--r--composer.lock2077
-rw-r--r--config.inc.php-dist119
-rw-r--r--globals.d.ts8
-rw-r--r--mk_linters.mk189
-rw-r--r--package.json27
-rw-r--r--phpstan-baseline.neon492
-rw-r--r--phpstan.neon44
-rw-r--r--psalm-baseline.xml599
-rw-r--r--psalm.xml6
-rw-r--r--rector.php48
-rw-r--r--src/classes/ADONewConnection.php5
-rw-r--r--src/classes/ADORecordSet.php15
-rw-r--r--src/classes/ADOdbException.php73
-rw-r--r--src/classes/ArrayRecordSet.php17
-rw-r--r--src/classes/Connection.php (renamed from src/database/Connection.php)185
-rw-r--r--src/classes/ContainerHandlers.php146
-rw-r--r--src/classes/ContainerUtils.php504
-rw-r--r--src/classes/Misc.php153
-rw-r--r--src/classes/Translations.php15
-rw-r--r--src/classes/ViewManager.php255
-rw-r--r--src/controllers/AggregatesController.php28
-rw-r--r--src/controllers/AlldbController.php42
-rw-r--r--src/controllers/BaseController.php100
-rw-r--r--src/controllers/ColpropertiesController.php16
-rw-r--r--src/controllers/ConstraintsController.php4
-rw-r--r--src/controllers/DatabaseController.php74
-rw-r--r--src/controllers/DataexportController.php8
-rw-r--r--src/controllers/DataimportController.php1
-rw-r--r--src/controllers/DbexportController.php2
-rw-r--r--src/controllers/DisplayController.php36
-rw-r--r--src/controllers/DomainsController.php38
-rw-r--r--src/controllers/FulltextController.php74
-rw-r--r--src/controllers/FunctionsController.php59
-rw-r--r--src/controllers/GroupsController.php16
-rw-r--r--src/controllers/HistoryController.php11
-rw-r--r--src/controllers/IndexesController.php22
-rw-r--r--src/controllers/IntroController.php14
-rw-r--r--src/controllers/LoginController.php10
-rw-r--r--src/controllers/MaterializedviewpropertiesController.php30
-rw-r--r--src/controllers/MaterializedviewsController.php35
-rw-r--r--src/controllers/OperatorsController.php10
-rw-r--r--src/controllers/PrivilegesController.php6
-rw-r--r--src/controllers/RolesController.php30
-rw-r--r--src/controllers/RulesController.php12
-rw-r--r--src/controllers/SchemasController.php49
-rw-r--r--src/controllers/SequencesController.php130
-rw-r--r--src/controllers/ServersController.php14
-rw-r--r--src/controllers/SqlController.php5
-rw-r--r--src/controllers/SqleditController.php2
-rw-r--r--src/controllers/TablesController.php255
-rw-r--r--src/controllers/TablespacesController.php16
-rw-r--r--src/controllers/TblpropertiesController.php114
-rw-r--r--src/controllers/TreeController.php12
-rw-r--r--src/controllers/TriggersController.php38
-rw-r--r--src/controllers/TypesController.php48
-rw-r--r--src/controllers/UsersController.php22
-rw-r--r--src/controllers/ViewpropertiesController.php28
-rw-r--r--src/controllers/ViewsController.php35
-rw-r--r--src/database/ADOdbBase.php126
-rw-r--r--src/database/Postgres.php105
-rw-r--r--src/database/Postgres10.php8
-rw-r--r--src/database/Postgres11.php8
-rw-r--r--src/database/Postgres12.php8
-rw-r--r--src/database/Postgres13.php8
-rw-r--r--src/database/Postgres90.php8
-rw-r--r--src/database/Postgres91.php8
-rw-r--r--src/database/Postgres92.php8
-rw-r--r--src/database/Postgres93.php8
-rw-r--r--src/database/Postgres94.php8
-rw-r--r--src/database/Postgres95.php8
-rw-r--r--src/database/Postgres96.php8
-rw-r--r--src/database/databasetraits/HasTrait.php5
-rw-r--r--src/database/databasetraits/RoleTrait.php6
-rw-r--r--src/database/databasetraits/SequenceTrait.php34
-rw-r--r--src/database/databasetraits/TableTrait.php189
-rw-r--r--src/decorators/ActionUrlDecorator.php2
-rw-r--r--src/decorators/BranchUrlDecorator.php4
-rw-r--r--src/decorators/CallbackDecorator.php2
-rw-r--r--src/decorators/Decorator.php25
-rw-r--r--src/decorators/RedirectUrlDecorator.php4
-rw-r--r--src/decorators/UrlDecorator.php4
-rw-r--r--src/help/PostgresDoc.php (renamed from src/help/PostgresDoc74.php)40
-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/PostgresDoc80.php35
-rw-r--r--src/help/PostgresDoc81.php25
-rw-r--r--src/help/PostgresDoc82.php20
-rw-r--r--src/help/PostgresDoc83.php35
-rw-r--r--src/help/PostgresDoc84.php20
-rw-r--r--src/help/PostgresDoc90.php4
-rw-r--r--src/help/PostgresDoc91.php2
-rw-r--r--src/help/PostgresDoc92.php4
-rw-r--r--src/help/PostgresDoc93.php14
-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.php146
-rw-r--r--src/middleware/PopulateRequestResponse.php33
-rw-r--r--src/router.php72
-rw-r--r--src/traits/AdminTrait.php165
-rw-r--r--src/traits/ExportTrait.php4
-rw-r--r--src/traits/FormTrait.php4
-rw-r--r--src/traits/HelperTrait.php39
-rw-r--r--src/traits/InsertEditRowTrait.php4
-rw-r--r--src/traits/MiscTrait.php58
-rw-r--r--src/traits/ViewsMatviewsTrait.php28
-rw-r--r--src/translations/AbstractLang.php26
-rw-r--r--src/translations/Afrikaans.php6
-rw-r--r--src/translations/Arabic.php6
-rw-r--r--src/translations/Catalan.php6
-rw-r--r--src/translations/ChineseSim.php6
-rw-r--r--src/translations/ChineseTr.php6
-rw-r--r--src/translations/ChineseUtf8ZhCn.php6
-rw-r--r--src/translations/ChineseUtf8ZhTw.php6
-rw-r--r--src/translations/Czech.php6
-rw-r--r--src/translations/Danish.php6
-rw-r--r--src/translations/Dutch.php6
-rw-r--r--src/translations/English.php11
-rw-r--r--src/translations/French.php6
-rw-r--r--src/translations/Galician.php6
-rw-r--r--src/translations/German.php6
-rw-r--r--src/translations/Greek.php6
-rw-r--r--src/translations/Hebrew.php6
-rw-r--r--src/translations/Hungarian.php6
-rw-r--r--src/translations/Italian.php6
-rw-r--r--src/translations/Japanese.php6
-rw-r--r--src/translations/Lithuanian.php6
-rw-r--r--src/translations/Mongol.php6
-rw-r--r--src/translations/Polish.php6
-rw-r--r--src/translations/PortugueseBr.php6
-rw-r--r--src/translations/PortuguesePt.php6
-rw-r--r--src/translations/Romanian.php6
-rw-r--r--src/translations/Russian.php6
-rw-r--r--src/translations/RussianUtf8.php6
-rw-r--r--src/translations/Slovak.php6
-rw-r--r--src/translations/Spanish.php6
-rw-r--r--src/translations/Swedish.php6
-rw-r--r--src/translations/Turkish.php6
-rw-r--r--src/translations/Ukrainian.php6
-rw-r--r--src/xhtml/HTMLController.php28
-rw-r--r--src/xhtml/HTMLFooterController.php2
-rw-r--r--src/xhtml/HTMLHeaderController.php14
-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--tsconfig.json22
-rw-r--r--workbox-config.js20
-rw-r--r--yarn.lock1062
198 files changed, 9510 insertions, 4116 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
new file mode 100644
index 00000000..5fa7a7d0
--- /dev/null
+++ b/.github/workflows/codeception_tests.yml
@@ -0,0 +1,73 @@
+# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
+
+name: "Codeception_Tests"
+
+on:
+ push:
+ branches:
+ - master
+ - develop
+ pull_request:
+ 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:
+ tests:
+ name: "Codeception_Tests"
+
+ runs-on: "ubuntu-latest"
+
+ strategy:
+ matrix:
+ php_version:
+ - "7.3"
+
+ dependencies:
+ - "locked"
+
+ steps:
+ - name: "Checkout"
+ uses: "actions/checkout@v2.3.1"
+
+ - 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 PHP with extensions"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ coverage: "none"
+ extensions: "${{ env.PHP_EXTENSIONS }}"
+ php-version: "${{ matrix.php_version }}"
+ tools: composer
+
+ - 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"
+
+ - 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
new file mode 100644
index 00000000..c3c810c4
--- /dev/null
+++ b/.github/workflows/coding_standards.yml
@@ -0,0 +1,100 @@
+# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
+
+name: "Coding_Standards"
+
+on:
+ push:
+ branches:
+ - master
+ - develop
+ pull_request:
+ 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:
+ coding_standards:
+ name: "Coding_Standards"
+
+ 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 PHP with extensions"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ coverage: "none"
+ extensions: "${{ env.PHP_EXTENSIONS }}"
+ php-version: "${{ matrix.php_version }}"
+ tools: composer, phpcs, 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 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 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 phpcs and friendsofphp/php-cs-fixer"
+ uses: "actions/cache@v2.1.1"
+ with:
+ 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 --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
new file mode 100644
index 00000000..aa4b9edd
--- /dev/null
+++ b/.github/workflows/static_analysis.yml
@@ -0,0 +1,115 @@
+# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
+
+name: "Static_Analysis"
+
+on:
+ pull_request:
+ branches:
+ - master
+ - develop
+
+env:
+ MIN_COVERED_MSI: 100
+ MIN_MSI: 100
+ PHP_EXTENSIONS: "mbstring, pgsql"
+ GH_ACTIONS_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
+ 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:
+ name: "Static_Analysis"
+
+ 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 for extensions
+ id: extcache
+ uses: shivammathur/cache-extensions@v1
+ with:
+ php-version: ${{ matrix.php_version }}
+ extensions: ${{ env.PHP_EXTENSIONS }}
+ key: ${{ env.key }}
+
+ - name: Create cache entry for 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 PHP with extensions"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ coverage: "none"
+ extensions: "${{ env.PHP_EXTENSIONS }}"
+ php-version: "${{ matrix.php_version }}"
+ tools: "${{ env.PHP_TOOLS }}"
+
+ - name: Create cache entry for 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 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:
+ path: ".build/phpstan"
+ key: "php-7.3-phpstan-${{ github.sha }}"
+ restore-keys: "php-7.3-phpstan-"
+
+ - name: "Run phpstan/phpstan"
+ run: "vendor/bin/phpstan analyse --configuration=phpstan.neon --error-format=checkstyle | cs2pr"
+
+
+ - name: "Create cache entry for vimeo/psalm"
+ uses: "actions/cache@v2.1.1"
+ with:
+ path: ".build/psalm"
+ key: "php-7.3-psalm-${{ github.sha }}"
+ restore-keys: "php-7.3-psalm-"
+
+ - name: "Run vimeo/psalm"
+ 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 f9a6fcc7..ecc5e4cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
selenium/tests/config.inc.php
tests/selenium/config.test.php
-*sublime*
+
@@ -16,13 +16,18 @@ phppga
/.idea/*
sublime-*
.php.tools.ini
-
+.vscode/*
+*.code-workspace
+*sublime*
###> temp and generated files
temp/sessions/*
+temp/route.cache.php
playground
*.log
tests/_output
+temp/*.output.txt
+
###> Vendor files
node_modules
@@ -31,7 +36,7 @@ vendor
###> Config files other tan examples
config.yml
-.configs/
+.configs
sftp-config*
config.*.php*
!config.inc.php-dist
@@ -42,3 +47,12 @@ config.*.php*
.build
.php_cs.cache
.phpunit.result.cache
+
+### 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
new file mode 100644
index 00000000..76e86e56
--- /dev/null
+++ b/.phive/phars.xml
@@ -0,0 +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 b/.php_cs.php
index 43d3c524..1c5b6884 100644
--- a/.php_cs
+++ 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
new file mode 100644
index 00000000..7a3f065a
--- /dev/null
+++ b/.reviewdog.yml
@@ -0,0 +1,23 @@
+runner:
+ phpstan:
+ cmd: vendor/bin/phpstan analyse --memory-limit=2G --configuration phpstan.neon --error-format=checkstyle
+ level: info
+
+ psalm:
+ cmd: vendor/bin/psalm --config=psalm.xml --diff --diff-methods --output-format=checkstyle
+ level: info
+ name: 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 68f6d23f..b991a84c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+include mk_linters.mk
+
VERSION = $(shell cat composer.json | sed -n 's/.*"version": "\([^"]*\)"/\1/p')
SHELL = /usr/bin/env bash
@@ -7,6 +9,7 @@ XDSWI := $(shell command -v xd_swi 2> /dev/null)
HAS_PHPMD := $(shell command -v phpmd 2> /dev/null)
HAS_CSFIXER:= $(shell command -v php-cs-fixer 2> /dev/null)
XDSWI_STATUS:=$(shell command xd_swi stat 2> /dev/null)
+HAS_PHIVE:=$(shell command phive --version 2> /dev/null)
CURRENT_BRANCH:=$(shell command git rev-parse --abbrev-ref HEAD 2> /dev/null)
DATENOW:=`date +'%Y-%m-%d'`
YELLOW=\033[0;33m
@@ -35,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}" ;\
@@ -73,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)","")
@@ -83,40 +92,6 @@ endif
-csfixer:
- @if [ -f "vendor/bin/php-cs-fixer" ]; then \
- echo "XDEBUG was: "$(XDSWI_STATUS) ;\
- ${MAKE} disable_xdebug --no-print-directory ;\
- mkdir -p .build/php-cs-fixer ;\
- vendor/bin/php-cs-fixer fix --config=.php_cs --verbose ;\
- ${MAKE} enable_xdebug new_status=$(XDSWI_STATUS) --no-print-directory;\
- else \
- echo -e "$(GREEN)php-cs-fixer$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
- echo -e "Install it with $(GREEN)composer install --dev friendsofphp/php-cs-fixer$(WHITE)" ;\
- fi ;\
- sudo rm -rf temp/route.cache.php
-
-
-
-disable_xdebug:
- @if [[ "$(XDSWI)" != "" ]]; then \
- xd_swi off ;\
- fi
-
-enable_xdebug:
- @if [[ "$(XDSWI)" != "" ]]; then \
- 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 text .phpmd.xml | sed "s/.*\///" ;\
- fi ;\
- echo ""
-
var_dumper:
@if [ -f "vendor/bin/var-dump-server" ]; then \
vendor/bin/var-dump-server ;\
@@ -126,57 +101,6 @@ var_dumper:
fi;
@echo ""
-folder ?= src
-psalm: FOLDER_BASENAME:=`basename $(folder)|sed 's/src//'`
-psalm:
- @if [ -f "vendor/bin/psalm" ]; then \
- mkdir -p .build/psalm ;\
- ${MAKE} disable_xdebug --no-print-directory ;\
- vendor/bin/psalm --show-info=true \
- --config=psalm.xml \
- --set-baseline=.build/psalm/psalm-baseline$(FOLDER_BASENAME).xml \
- --shepherd $(folder) ;\
- ${MAKE} enable_xdebug new_status=$(XDSWI_STATUS) --no-print-directory;\
- else \
- echo -e "$(GREEN)vimeo/psalm$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
- echo -e "Install it with $(GREEN)composer require --dev vimeo/psalm$(WHITE)" ;\
- fi
- @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 ;\
- fi
-
- @mkdir -p .build/phpstan ;\
- ./vendor/bin/phpstan analyse --memory-limit=2G ${error_format}
- @${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 \
- $(folder) ;\
- ${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 jakub-onderka/php-parallel-lint$(WHITE)" ;\
- fi
- @find ./src -name \*.php -print0 | xargs -0 -n 1 php -l
- @echo ""
-
-
-
-fixers: phpmd psalm phpstan
create_testdb:
PGPASSWORD=scrutinizer psql -U scrutinizer -h localhost -f tests/simpletest/data/ppatests_install.sql
@@ -186,4 +110,5 @@ destroy_testdb:
run_local:
${MAKE} fix_permissions
- php -S localhost:8000 index.php \ No newline at end of file
+ php -S localhost:8000 index.php
+
diff --git a/README.md b/README.md
index ab2dfa7c..df11d495 100644
--- a/README.md
+++ b/README.md
@@ -6,8 +6,10 @@ PHP Based administration tool for PostgreSQL. Blazing fast routing with [Slim Fr
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/289a56c1c7d94216b3d089c220689e9e)](https://www.codacy.com/app/amenadiel/phpPgAdmin6?utm_source=github.com&utm_medium=referral&utm_content=HuasoFoundries/phpPgAdmin6&utm_campaign=Badge_Grade)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/HuasoFoundries/phpPgAdmin6/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/HuasoFoundries/phpPgAdmin6/?branch=develop)
[![Build Status](https://scrutinizer-ci.com/g/HuasoFoundries/phpPgAdmin6/badges/build.png?b=develop)](https://scrutinizer-ci.com/g/HuasoFoundries/phpPgAdmin6/build-status/develop)
+[![License](https://img.shields.io/badge/license-MIT-428f7e.svg?logo=open%20source%20initiative&logoColor=white&labelColor=555555)](LICENSE.md)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FHuasoFoundries%2FphpPgAdmin6.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FHuasoFoundries%2FphpPgAdmin6?ref=badge_shield)
-
+![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/huasofoundries/phppgadmin6?logo=php&labelColor=efefef)
+____________
This project is inspired in [phppgadmin](https://github.com/phppgadmin/phppgadmin). Said project stalled a few years ago so we took it, refactored almost entirely and added:
- Composer Installation and dependency management
diff --git a/assets/js/ac_insert_row.js b/assets/js/ac_insert_row.js
index d6eff8fd..23abb75c 100644
--- a/assets/js/ac_insert_row.js
+++ b/assets/js/ac_insert_row.js
@@ -1,224 +1,224 @@
+/** 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();
- }
+ jQuery.ppa.o = 0;
+ 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) {
- jQuery.ppa.attrs
- .bind('keyup.ac_action', autocomplete)
- .bind('focus.ac_action', autocomplete)
- .bind('keypress.ac_action', move)
- .addClass('ac_field');
- } else {
- jQuery.ppa.attrs
- .removeClass('ac_field')
- .unbind('.ac_action');
- }
+ if (ac) {
+ jQuery.ppa.attrs
+ .bind('keyup.ac_action', autocomplete)
+ .bind('focus.ac_action', autocomplete)
+ .bind('keypress.ac_action', move)
+ .addClass('ac_field');
+ } else {
+ jQuery.ppa.attrs.removeClass('ac_field').unbind('.ac_action');
+ }
}
/* select the given index value and highlight it */
function selectVal(index) {
- 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)
- trs.eq(jQuery.ppa.i).find('*').css({
- 'background-color': '#fff',
- 'color': ''
- });
-
- // change colors for newly selected
- trs.eq(index).find('*').css({
- 'background-color': '#3d80df',
- 'color': '#fff'
+ 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) {
+ trs.eq(jQuery.ppa.i).find('*').css({
+ 'background-color': '#fff',
+ color: '',
});
+ }
+
+ // change colors for newly selected
+ trs.eq(index).find('*').css({
+ 'background-color': '#3d80df',
+ color: '#fff',
+ });
- jQuery.ppa.i = index;
+ jQuery.ppa.i = index;
}
function openlist(e) {
- var elt = jQuery(e);
- var attnum = elt.attr('id').match(/\d+/)[0];
- /* FIXME we only support the first FK constraint of the field */
- var conid = attrs['attr_' + attnum][0];
-
- var constr = constrs["constr_" + conid];
-
- // get the changed attribute position in the arrays
- for (i = 0;
- (constr.pattnums[i] != attnum); i++);
-
- var datas = {
- fattpos: i,
- fvalue: e.value,
- database: database,
- 'keys[]': constr.pattnums,
- 'keynames[]': constr.pattnames,
- 'fkeynames[]': constr.fattnames,
- f_table: constr.f_table,
- f_schema: constr.f_schema,
- offset: jQuery.ppa.o
- };
-
- jQuery.ajax({
- url: subfolder + '/src/views/acinsert.php?server=' + server,
- type: 'post',
- data: datas,
- dataType: 'html',
- cache: false,
- contentType: 'application/x-www-form-urlencoded',
- 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;
- }
- }
- });
+ var elt = jQuery(e);
+ var attnum = elt.attr('id').match(/\d+/)[0];
+ /* FIXME we only support the first FK constraint of the field */
+ var conid = attrs['attr_' + attnum][0];
+
+ var constr = constrs['constr_' + conid];
+
+ // get the changed attribute position in the arrays
+ for (i = 0; constr.pattnums[i] != attnum; i++) {}
+
+ var datas = {
+ fattpos: i,
+ fvalue: e.value,
+ database: database,
+ 'keys[]': constr.pattnums,
+ 'keynames[]': constr.pattnames,
+ 'fkeynames[]': constr.fattnames,
+ f_table: constr.f_table,
+ f_schema: constr.f_schema,
+ offset: jQuery.ppa.o,
+ };
+
+ jQuery.ajax({
+ url: subfolder + '/src/views/acinsert.php?server=' + server,
+ type: 'post',
+ data: datas,
+ dataType: 'html',
+ cache: false,
+ contentType: 'application/x-www-form-urlencoded',
+ success: function (ret) {
+ jQuery.ppa.i = 0;
+ jQuery.ppa.fkbg.show();
+
+ jQuery.ppa.fklist
+ .html(ret)
+ .appendTo('#row_att_' + attnum)
+ .css('width', elt.css('width'))
+ .show();
+ jQuery.ppa.numrow = jQuery.ppa.fklist.find('tr').length;
+ },
+ });
}
-
/* move the cursor down or up,
* load available next/prev values if going out of bound */
function move(event) {
- /* selecting next value down.
- * if the list is closed, it will open next */
- if (event.keyCode == 40) {
- if (jQuery.ppa.fklist[0].style.display == 'block') {
- if ((jQuery.ppa.i + 1) < jQuery.ppa.numrow) {
- selectVal(jQuery.ppa.i + 1);
- } else if (fkl_hasnext == true) {
- jQuery.ppa.o += 11;
- openlist(this);
- }
- } else {
- openlist(this);
- }
+ /* selecting next value down.
+ * if the list is closed, it will open next */
+ if (event.keyCode == 40) {
+ if (jQuery.ppa.fklist[0].style.display == 'block') {
+ if (jQuery.ppa.i + 1 < jQuery.ppa.numrow) {
+ selectVal(jQuery.ppa.i + 1);
+ } else if (fkl_hasnext == true) {
+ jQuery.ppa.o += 11;
+ openlist(this);
+ }
+ } else {
+ openlist(this);
}
+ } else if (event.keyCode == 38) {
/* selecting prev value up */
- else if (event.keyCode == 38) {
- if ((jQuery.ppa.i - 1) > 0) {
- selectVal(jQuery.ppa.i - 1);
- } else if ((fkl_hasprev == true) && (jQuery.ppa.i == 1)) {
- jQuery.ppa.o -= 11;
- openlist(this);
- } else {
- selectVal(jQuery.ppa.numrow - 1);
- }
- }
-}
-
-/* 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;
- }
- /* ignoring 38:up and 40:down */
- else if (event.keyCode == 38 || event.keyCode == 40) {
- return false;
- }
- /* ignoring 9:tab, 37:left, 39:right, 16:shift, ctrl: 17, alt:18, 20:lockmaj */
- else if (event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39 || event.keyCode == 16 || event.keyCode == 17 || event.keyCode == 18 || event.keyCode == 20) {
- return true;
- }
- /* esc */
- else if (event.keyCode == 27) {
- hideAc();
- }
- /* request the list of possible values asynchronously */
- else {
- /* 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);
+ if (jQuery.ppa.i - 1 > 0) {
+ selectVal(jQuery.ppa.i - 1);
+ } else if (fkl_hasprev == true && jQuery.ppa.i == 1) {
+ jQuery.ppa.o -= 11;
+ openlist(this);
+ } else {
+ selectVal(jQuery.ppa.numrow - 1);
}
-
- return true;
+ }
}
/* bind actions on values lines: hover for style change, click for select */
jQuery('tr.acline').on('mouseover', function () {
- selectVal(jQuery('table.ac_values tr').index(this));
+ selectVal(jQuery('table.ac_values tr').index(this));
});
jQuery('tr.acline').on('click', function () {
- var a = jQuery(this).find('td > a.fkval');
+ var a = jQuery(this).find('td > a.fkval');
- for (i = 0; i < a.length; i++) {
- jQuery('input[name="values[' + a[i].name + ']"]').val(jQuery(a[i]).text());
- }
- hideAc();
+ for (i = 0; i < a.length; i++) {
+ jQuery('input[name="values[' + a[i].name + ']"]').val(jQuery(a[i]).text());
+ }
+ hideAc();
});
-
jQuery(document).ready(function () {
- /* register some global value in the ppa namespace */
- jQuery.ppa = {
- fklist: jQuery('#fklist'),
- attrs: jQuery('input[id^=attr_]'), // select fields with FK
- fkbg: jQuery('#fkbg'),
- i: 0, // selected value indice
- o: 0 // offset when navigating prev/next
- };
-
- jQuery.ppa.fklist.on('click', '#fkprev', function () {
- jQuery.ppa.o -= 11;
- /* get the field that is the previous html elt from the #fklist
- * and trigger its focus to refresh the list AND actualy
- * focus back on the field */
- jQuery('#fklist').prev().focus();
- });
-
-
- jQuery.ppa.fklist.on('click', '#fknext', function () {
- jQuery.ppa.o += 11;
- /* get the field that is the previous html elt from the #fklist
- * and trigger its focus to refresh the list AND actualy
- * focus back on the field*/
- jQuery('#fklist').prev().focus();
- });
-
- /* close the list when clicking outside of it */
- jQuery.ppa.fkbg.click(function (e) {
- hideAc();
- });
+ /* register some global value in the ppa namespace */
+ jQuery.ppa = {
+ fklist: jQuery('#fklist'),
+ attrs: jQuery('input[id^=attr_]'), // select fields with FK
+ fkbg: jQuery('#fkbg'),
+ i: 0, // selected value indice
+ o: 0, // offset when navigating prev/next
+ };
+
+ jQuery.ppa.fklist.on('click', '#fkprev', function () {
+ jQuery.ppa.o -= 11;
+ /* get the field that is the previous html elt from the #fklist
+ * and trigger its focus to refresh the list AND actualy
+ * focus back on the field */
+ jQuery('#fklist').prev().focus();
+ });
+
+ jQuery.ppa.fklist.on('click', '#fknext', function () {
+ jQuery.ppa.o += 11;
+ /* get the field that is the previous html elt from the #fklist
+ * and trigger its focus to refresh the list AND actualy
+ * focus back on the field*/
+ jQuery('#fklist').prev().focus();
+ });
+
+ /* close the list when clicking outside of it */
+ jQuery.ppa.fkbg.click(function (e) {
+ hideAc();
+ });
- /* 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')
- return false;
- });
-
- /* enable/disable auto-complete according to the checkbox */
- triggerAc(
- jQuery('#no_ac').click(function () {
- triggerAc(this.checked);
- })[0].checked
- );
-}); \ No newline at end of file
+ /* 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') {
+ return false;
+ }
+ });
+
+ /* enable/disable auto-complete according to the checkbox */
+ triggerAc(
+ jQuery('#no_ac').click(function () {
+ triggerAc(this.checked);
+ })[0].checked
+ );
+});
diff --git a/assets/js/codemirror/addon/sql-lint.js b/assets/js/codemirror/addon/sql-lint.js
index 800c8d7a..064bc954 100644
--- a/assets/js/codemirror/addon/sql-lint.js
+++ b/assets/js/codemirror/addon/sql-lint.js
@@ -1,38 +1,34 @@
CodeMirror.sqlLint = function (text, updateLinting, options, cm) {
- // Skipping check if text box is empty.
- if (text.trim() === '') {
- updateLinting(cm, []);
- return;
- }
-
- function handleResponse (response) {
- var found = [];
- for (var idx in response) {
- found.push({
- from: CodeMirror.Pos(
- response[idx].fromLine, response[idx].fromColumn
- ),
- to: CodeMirror.Pos(
- response[idx].toLine, response[idx].toColumn
- ),
- messageHTML: response[idx].message,
- severity : response[idx].severity
- });
- }
+ // Skipping check if text box is empty.
+ if (text.trim() === '') {
+ updateLinting(cm, []);
+ return;
+ }
- updateLinting(cm, found);
+ function handleResponse(response) {
+ var found = [];
+ for (var idx in response) {
+ found.push({
+ from: CodeMirror.Pos(response[idx].fromLine, response[idx].fromColumn),
+ to: CodeMirror.Pos(response[idx].toLine, response[idx].toColumn),
+ messageHTML: response[idx].message,
+ severity: response[idx].severity,
+ });
}
- $.ajax({
- method: 'POST',
- url: 'lint.php',
- dataType: 'json',
- data: {
- sql_query: text,
- server: PMA_commonParams.get('server'),
- options: options.lintOptions,
- no_history: true,
- },
- success: handleResponse
- });
+ updateLinting(cm, found);
+ }
+
+ $.ajax({
+ method: 'POST',
+ url: 'lint.php',
+ dataType: 'json',
+ data: {
+ sql_query: text,
+ server: PMA_commonParams.get('server'),
+ options: options.lintOptions,
+ no_history: true,
+ },
+ success: handleResponse,
+ });
};
diff --git a/assets/js/codemirror/codemirror_footer.js b/assets/js/codemirror/codemirror_footer.js
index 9613ea2c..b5b6f0ee 100644
--- a/assets/js/codemirror/codemirror_footer.js
+++ b/assets/js/codemirror/codemirror_footer.js
@@ -2,8 +2,8 @@ var avoid_bogus_character = true;
var windowsize;
function autoResize(cb) {
//console.log('window size', windowsize);
- jQuery(".CodeMirror").css(
- "height",
+ jQuery('.CodeMirror').css(
+ 'height',
jQuery(window).innerHeight() - windowsize.height_difference
);
if (cb) {
@@ -12,59 +12,59 @@ function autoResize(cb) {
}
function setResizable() {
requestAnimationFrame(() => {
- jQuery(".CodeMirror")
- .css("resize", "both")
- .attr("resizable", "true")
+ jQuery('.CodeMirror')
+ .css('resize', 'both')
+ .attr('resizable', 'true')
.resizable({
- handles: "all",
- resize: function() {
+ handles: 'all',
+ resize: function () {
window.codemirrorEditor.setSize($(this).width(), $(this).height());
- }
+ },
});
});
}
-window.addEventListener("load", event => {
+window.addEventListener('load', (event) => {
console.log("'Todos los recursos terminaron de cargar!");
if (
!avoid_bogus_character ||
- typeof CodeMirror === "undefined" ||
- !document.querySelector("textarea#query")
+ typeof CodeMirror === 'undefined' ||
+ !document.querySelector('textarea#query')
) {
return;
}
- jQuery(document).ready(function() {
+ jQuery(document).ready(function () {
windowsize = {
height: jQuery(window).innerHeight(),
- width: jQuery(window).innerWidth()
+ width: jQuery(window).innerWidth(),
};
let modeCM,
specCM,
- editorMode = "text/x-pgsql";
+ editorMode = 'text/x-pgsql';
- CodeMirror.autoLoadMode = function(instance, mode) {
+ CodeMirror.autoLoadMode = function (instance, mode) {
console.log({ instance, mode });
if (CodeMirror.modes.hasOwnProperty(mode)) {
return;
}
- CodeMirror.requireMode(mode, function() {
- instance.setOption("mode", instance.getOption("mode"));
- jQuery(".CodeMirror").css("height", $("#query").attr("rows") * 26);
+ CodeMirror.requireMode(mode, function () {
+ instance.setOption('mode', instance.getOption('mode'));
+ jQuery('.CodeMirror').css('height', $('#query').attr('rows') * 26);
requestAnimationFrame(() => {
if (window.inPopUp) {
windowsize.height_difference =
- windowsize.height - jQuery(".CodeMirror").innerHeight();
- jQuery(window).on("resize", autoResize);
+ windowsize.height - jQuery('.CodeMirror').innerHeight();
+ jQuery(window).on('resize', autoResize);
}
window.codemirrorEditor = instance;
autoResize(setResizable);
});
});
};
- CodeMirror.commands.sendQuery = function() {
- jQuery("#sqlform").submit();
+ CodeMirror.commands.sendQuery = function () {
+ jQuery('#sqlform').submit();
};
/*
window.editor = CodeMirror.fromTextArea(document.querySelector("#query"), {
@@ -89,7 +89,7 @@ window.addEventListener("load", event => {
*/
let codemirrorEditor = CodeMirror.fromTextArea(
- document.querySelector("#query"),
+ document.querySelector('#query'),
/*{
// mode: "text/x-pgsql",
indentWithTabs: true,
@@ -106,7 +106,7 @@ window.addEventListener("load", event => {
//foldGutter: {rangeFinder: CodeMirror.fold.brace },
gutters: ["CodeMirror-linenumbers", "CodeMirror-lint-markers"]
}*/ {
- mode: "text/x-pgsql",
+ mode: 'text/x-pgsql',
indentWithTabs: true,
smartIndent: true,
lineNumbers: true,
@@ -115,11 +115,11 @@ window.addEventListener("load", event => {
autofocus: true,
addModeClass: true,
extraKeys: {
- "Ctrl-Enter": "sendQuery",
- "Ctrl-Q": function(cm) {
+ 'Ctrl-Enter': 'sendQuery',
+ 'Ctrl-Q': function (cm) {
cm.foldCode(cm.getCursor());
- }
- }
+ },
+ },
//foldGutter: true,
// foldGutter: { rangeFinder: CodeMirror.fold.brace },
//gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
@@ -129,7 +129,7 @@ window.addEventListener("load", event => {
var modeInfo = CodeMirror.findModeByMIME(editorMode);
console.log({ editorMode, modeInfo });
if (modeInfo && modeInfo.mode) {
- codemirrorEditor.setOption("mode", editorMode);
+ codemirrorEditor.setOption('mode', editorMode);
CodeMirror.autoLoadMode(codemirrorEditor, modeInfo.mode);
}
});
diff --git a/assets/js/codemirror/instance_codemirror.js b/assets/js/codemirror/instance_codemirror.js
index 8e295b25..9dd63d02 100644
--- a/assets/js/codemirror/instance_codemirror.js
+++ b/assets/js/codemirror/instance_codemirror.js
@@ -1,27 +1,26 @@
-if (typeof CodeMirror !== "undefined") {
+if (typeof CodeMirror !== 'undefined') {
let modeCM,
specCM,
- editorMode = "text/x-pgsql";
- CodeMirror.autoLoadMode = function(instance, mode) {
+ editorMode = 'text/x-pgsql';
+ CodeMirror.autoLoadMode = function (instance, mode) {
console.log({ instance, mode });
- if (!CodeMirror.modes.hasOwnProperty(mode))
- CodeMirror.requireMode(mode, function() {
- instance.setOption("mode", instance.getOption("mode"));
- jQuery(".CodeMirror").css("height", $("#query").attr("rows") * 26);
+ if (!CodeMirror.modes.hasOwnProperty(mode)) {
+ CodeMirror.requireMode(mode, function () {
+ instance.setOption('mode', instance.getOption('mode'));
+ jQuery('.CodeMirror').css('height', $('#query').attr('rows') * 26);
- window.setTimeout(function() {
- jQuery(".CodeMirror")
- .attr("resizable", "true")
- .focus();
+ window.setTimeout(function () {
+ jQuery('.CodeMirror').attr('resizable', 'true').focus();
}, 2500);
});
+ }
};
- CodeMirror.commands.sendQuery = function() {
- jQuery("#sqlform").submit();
+ CodeMirror.commands.sendQuery = function () {
+ jQuery('#sqlform').submit();
};
- if (document.querySelector("textarea#query")) {
- window.editor = CodeMirror.fromTextArea(document.querySelector("#query"), {
+ if (document.querySelector('textarea#query')) {
+ window.editor = CodeMirror.fromTextArea(document.querySelector('#query'), {
// mode: "text/x-pgsql",
indentWithTabs: true,
smartIndent: true,
@@ -31,11 +30,11 @@ if (typeof CodeMirror !== "undefined") {
autofocus: true,
addModeClass: true,
extraKeys: {
- "Ctrl-Space": "autocomplete",
- "Ctrl-Enter": "sendQuery"
+ 'Ctrl-Space': 'autocomplete',
+ 'Ctrl-Enter': 'sendQuery',
},
//foldGutter: {rangeFinder: CodeMirror.fold.brace },
- gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
+ gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'],
});
var modeInfo = CodeMirror.findModeByMIME(editorMode);
@@ -44,7 +43,7 @@ if (typeof CodeMirror !== "undefined") {
mode = modeInfo.mode;
spec = modeInfo;
- window.editor.setOption("mode", modeInfo);
+ window.editor.setOption('mode', modeInfo);
CodeMirror.autoLoadMode(window.editor, modeInfo.mode);
}
}
diff --git a/assets/js/database.js b/assets/js/database.js
index 7e04dea1..f42d3954 100644
--- a/assets/js/database.js
+++ b/assets/js/database.js
@@ -1,72 +1,89 @@
$(document).ready(function () {
+ var timeid = (query = null);
+ var controlLink = $('#control');
- var timeid = query = null;
- var controlLink = $('#control');
+ console.log('Database is', Database);
- console.log('Database is', Database);
+ var errmsg = $('<p class="errmsg">' + Database.errmsg + '</p>')
+ .insertBefore(controlLink)
+ .hide();
- var errmsg = $('<p class="errmsg">' + Database.errmsg + '</p>')
- .insertBefore(controlLink)
- .hide();
+ var loading = $(
+ '<img class="loading" alt="[loading]" src="' + Database.load_icon + '" />'
+ )
+ .insertAfter(controlLink)
+ .hide();
- var loading = $('<img class="loading" alt="[loading]" src="' + Database.load_icon + '" />')
- .insertAfter(controlLink)
- .hide();
+ controlLink.show();
- controlLink.show();
+ function refreshTable() {
+ if (Database.ajax_time_refresh > 0) {
+ loading.show();
+ query = $.ajax({
+ type: 'GET',
+ dataType: 'html',
+ data: {
+ server: Database.server,
+ database: Database.dbname,
+ action: Database.action,
+ },
+ url: '/src/views/database.php',
+ cache: false,
+ contentType: 'application/x-www-form-urlencoded',
+ success: function (html) {
+ $('#data_block').html(html);
+ timeid = window.setTimeout(refreshTable, Database.ajax_time_refresh);
+ loading.hide();
+ },
+ error: function () {
+ controlLink.click();
+ //errmsg.show();
+ },
+ complete: function () {
+ //loading.hide();
+ },
+ });
+ }
+ }
+ controlLink.on('click', function () {
+ console.log(timeid);
+ if (timeid === null) {
+ console.log('toggle 1');
+ timeid = window.setTimeout(refreshTable, Database.ajax_time_refresh);
+ controlLink
+ .empty()
+ .append(
+ '<img src="' +
+ Database.str_stop.icon +
+ '" alt="" />&nbsp;' +
+ Database.str_stop.text +
+ '&nbsp;&nbsp;&nbsp;'
+ );
+ } else {
+ console.log('toggle 2');
+ window.clearInterval(timeid);
+ if (query) {
+ query.abort();
+ }
+ controlLink
+ .empty()
+ .append(
+ '<img src="' +
+ Database.str_start.icon +
+ '" alt="" />&nbsp;' +
+ Database.str_start.text
+ );
+ }
+ });
- function refreshTable() {
- if (Database.ajax_time_refresh > 0) {
- loading.show();
- query = $.ajax({
- type: 'GET',
- dataType: 'html',
- data: {
- server: Database.server,
- database: Database.dbname,
- action: Database.action
- },
- url: '/src/views/database.php',
- cache: false,
- contentType: 'application/x-www-form-urlencoded',
- success: function (html) {
- $('#data_block').html(html);
- timeid = window.setTimeout(refreshTable, Database.ajax_time_refresh)
- loading.hide();
- },
- error: function () {
- controlLink.click();
- //errmsg.show();
- },
- complete: function () {
- //loading.hide();
- }
- });
- }
- }
+ /* preload images */
+ $('#control img')
+ .hide()
+ .attr('src', Database.str_start.icon)
+ .attr('src', Database.str_stop.icon)
+ .show();
- controlLink.on('click', function () {
- console.log(timeid);
- if (timeid === null) {
- console.log('toggle 1');
- timeid = window.setTimeout(refreshTable, Database.ajax_time_refresh);
- controlLink.empty().append('<img src="' + Database.str_stop.icon + '" alt="" />&nbsp;' + Database.str_stop.text + '&nbsp;&nbsp;&nbsp;');
- } else {
- console.log('toggle 2');
- window.clearInterval(timeid);
- if (query) query.abort();
- controlLink.empty().append('<img src="' + Database.str_start.icon + '" alt="" />&nbsp;' + Database.str_start.text);
- }
- });
-
-
- /* preload images */
- $('#control img').hide()
- .attr('src', Database.str_start.icon)
- .attr('src', Database.str_stop.icon)
- .show();
-
- /* start refreshing */
- controlLink.click();
-}); \ No newline at end of file
+ /* start refreshing */
+ controlLink.click();
+});
diff --git a/assets/js/display.js b/assets/js/display.js
index 10719811..cf1a23dd 100644
--- a/assets/js/display.js
+++ b/assets/js/display.js
@@ -1,93 +1,106 @@
-$(document).ready(function () {
-
- /* init some needed tags and values */
-
- $('table#data').wrap('<div id="fkcontainer" class="fk" />');
- $('#fkcontainer').append('<div id="root" />');
-
- jQuery.ppa = {
- root: $('#root')
- };
-
- $("a.fk").on('click', function (event) {
- /* make the cursor being a waiting cursor */
- $('body').css('cursor', 'wait');
-
- query = $.ajax({
- type: 'GET',
- dataType: 'html',
- data: {
- action: 'dobrowsefk'
- },
- url: $(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];
-
- /* if we are clicking on a FK from the original table
+$(function () {
+ /* init some needed tags and values */
+
+ $('table#data').wrap('<div id="fkcontainer" class="fk" />');
+ $('#fkcontainer').append('<div id="root" />');
+
+ jQuery.ppa = jQuery.ppa || {
+ root: $('#root'),
+ };
+
+ $('a.fk').on('click', function (event) {
+ /* make the cursor being a waiting cursor */
+ $('body').css('cursor', 'wait');
+ let $this = $(this);
+ $.ajax({
+ type: 'GET',
+ dataType: 'html',
+ data: {
+ action: 'dobrowsefk',
+ },
+ url: String($(this).attr('href')),
+ cache: false,
+ context: $(this),
+ contentType: 'application/x-www-form-urlencoded',
+ })
+ .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();
- /* if the requested top position is different than
+ if (pdiv[0].id == 'fkcontainer') {
+ /* computing top position, which is the topid as well */
+ 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)
- jQuery.ppa.root.empty()
- .css({
- left: (pdiv.position().left) + 'px',
- top: top + 'px'
- })
- /* 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 */
- .topid = top;
-
- pdiv = jQuery.ppa.root;
-
- /* Remove equal rows in the root div */
- jQuery.ppa.root.children('.' + divclass).remove();
- } else {
- /* Remove equal rows in the pdiv */
- pdiv.children('div.' + divclass).remove();
- }
-
- /* creating the data div */
- newdiv = $('<div class="fk ' + divclass + '">').html(answer);
-
- /* highlight referencing fields */
- newdiv.data('ref', this).data('refclass', $(this).attr('class').split(' ')[1])
- .mouseenter(function (event) {
- $(this).data('ref').closest('tr').find('a.' + $(this).data('refclass')).closest('div').addClass('highlight');
- })
- .mouseleave(function (event) {
- $(this).data('ref').closest('tr').find('a.' + $(this).data('refclass')).closest('div').removeClass('highlight');
- });
-
- /* appending it to the level-1 div */
- pdiv.append(newdiv);
-
- 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();
- }
- });
- },
-
- error: function () {
- this.closest('div.fk').append('<p class="errmsg">' + Display.errmsg + '</p>');
- },
-
- complete: function () {
- $('body').css('cursor', 'auto');
- }
+ jQuery.ppa.root.empty().css({
+ left: pdiv.position().left + 'px',
+ top: top + 'px',
+ }).topid = top;
+ }
+
+ pdiv = jQuery.ppa.root;
+
+ /* Remove equal rows in the root div */
+ jQuery.ppa.root.children('.' + divclass).remove();
+ } else {
+ /* Remove equal rows in the pdiv */
+ pdiv.children('div.' + divclass).remove();
+ }
+
+ /* creating the data div */
+ let newdiv = $('<div class="fk ' + divclass + '">').html(answer);
+
+ /* highlight referencing fields */
+ newdiv
+ .data('ref', $this)
+ .data('refclass', $(this).attr('class').split(' ')[1]);
+ newdiv
+ .on('mouseenter', function (event) {
+ $(this)
+ .data('ref')
+ .closest('tr')
+ .find('a.' + $(this).data('refclass'))
+ .closest('div')
+ .addClass('highlight');
+ })
+ .on('mouseleave', function (event) {
+ $(this)
+ .data('ref')
+ .closest('tr')
+ .find('a.' + $(this).data('refclass'))
+ .closest('div')
+ .removeClass('highlight');
+ });
+
+ /* appending it to the level-1 div */
+ pdiv.append(newdiv);
+
+ newdiv.on('click', '.fk_delete', function (event) {
+ console.log('clicked .fk_delete', jQuery(this));
+ let closestDiv = $(this).closest('div');
+ closestDiv
+ .data('ref')
+ .closest('tr')
+ .find('a.' + closestDiv.data('refclass'))
+ .closest('div')
+ .removeClass('highlight');
+ closestDiv.remove();
});
-
- return false; // do not refresh the page
- });
-
-
-}); \ No newline at end of file
+ })
+ .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 b9cfbc20..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,16 +29,18 @@ 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 => {
+ ].forEach((element) => {
let href = element.href;
- element.addEventListener('click', e => {
+ element.addEventListener('click', (e) => {
e.preventDefault();
window
.open(
@@ -50,7 +55,7 @@ function addBehaviorToTopLinks(amIDetailFrame) {
element.href = 'javascript:void(this.click())'; // eslint-disable-line
});
toplink_logout &&
- toplink_logout.addEventListener('click', e => {
+ toplink_logout.addEventListener('click', (e) => {
e.preventDefault();
if (confirm(stateObj.strconfdropcred)) {
window.location.href = e.target.href;
@@ -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');
@@ -103,7 +115,7 @@ $.ready
})
.then(() => {
if (window.location.href.indexOf('servers?action=logout') !== -1) {
- window.setTimeout(function() {
+ window.setTimeout(function () {
window.parent.location.replace(`${stateObj.subfolder}/servers`);
}, 3000);
} else if (
@@ -130,12 +142,12 @@ $.ready
}
}
if (typeof hljs !== 'undefined') {
- $('pre code.hljs').each(function(i, block) {
+ $('pre code.hljs').each(function (i, block) {
hljs.highlightBlock(block);
});
}
return;
})
- .catch(err => {
+ .catch((err) => {
console.error(err);
});
diff --git a/assets/js/footer_sqledit.js b/assets/js/footer_sqledit.js
index fe4b4505..15a7f33d 100644
--- a/assets/js/footer_sqledit.js
+++ b/assets/js/footer_sqledit.js
@@ -1,57 +1,57 @@
-$(document).ready(function() {
+$(function () {
if (window.inPopUp) {
- jQuery("table.tabs").prependTo("body");
- jQuery("table.printconnection").prependTo(".sqlform");
+ jQuery('table.tabs').prependTo('body');
+ jQuery('table.printconnection').prependTo('.sqlform');
}
- var the_action = $("#the_action").val();
+ var the_action = $('#the_action').val();
function get_action_params(from) {
var action_params = [];
- if (the_action === "sql") {
+ if (the_action === 'sql') {
action_params = [
- "query=" + encodeURI(window.editor.getValue()),
- "search_path=" +
- (from === "server" ? "public" : encodeURI($("#search_path").val()))
+ 'query=' + encodeURI(window.editor.getValue()),
+ 'search_path=' +
+ (from === 'server' ? 'public' : encodeURI($('#search_path').val())),
];
- if (jQuery("#paginate").is(":checked")) {
- action_params.push("paginate=on");
+ if (jQuery('#paginate').is(':checked')) {
+ action_params.push('paginate=on');
}
- } else if (the_action === "find") {
+ } else if (the_action === 'find') {
action_params = [
- "term=" + encodeURI($("#term").val()),
- "filter=" + encodeURI($("#filter").val())
+ 'term=' + encodeURI($('#term').val()),
+ 'filter=' + encodeURI($('#filter').val()),
];
}
return action_params;
}
- $("#selectserver").on("change", function() {
- console.log("server changed to ", $(this).val());
+ $('#selectserver').on('change', function () {
+ console.log('server changed to ', $(this).val());
- var base_location = location.href.split("&")[0],
- next_location = [base_location, "server=" + $(this).val()];
+ var base_location = location.href.split('&')[0],
+ next_location = [base_location, 'server=' + $(this).val()];
- next_location = next_location.concat(get_action_params("server"));
+ next_location = next_location.concat(get_action_params('server'));
- location.href = next_location.join("&");
+ location.href = next_location.join('&');
//console.log('next_location would be',next_location.join('&'));
});
- $("#selectdb").on("change", function() {
- console.log("database changed to ", $(this).val());
+ $('#selectdb').on('change', function () {
+ console.log('database changed to ', $(this).val());
- var base_location = location.href.split("&")[0],
+ var base_location = location.href.split('&')[0],
next_location = [
base_location,
- "server=" + $("#selectserver").val(),
- "database=" + $(this).val()
+ 'server=' + $('#selectserver').val(),
+ 'database=' + $(this).val(),
];
- next_location = next_location.concat(get_action_params("database"));
+ next_location = next_location.concat(get_action_params('database'));
- location.href = next_location.join("&");
+ location.href = next_location.join('&');
//console.log('next_location would be',next_location.join('&'));
});
});
diff --git a/assets/js/functions.js b/assets/js/functions.js
index d37e61d0..3ee87ba1 100644
--- a/assets/js/functions.js
+++ b/assets/js/functions.js
@@ -1,222 +1,250 @@
-var g_args = 0;
-var g_no_args = new Boolean(false);
+let g_args = 0,
+ g_no_args = false;
/*
function for adding arguments
*/
function addArg(subfolder) {
- var baseTR = baseArgTR(subfolder);
- console.log('addArg', subfolder);
- if (document.getElementById("args_table").insertBefore(baseTR, document.getElementById("parent_add_tr"))) {
- g_args++;
- return baseTR;
- }
+ var baseTR = baseArgTR(subfolder);
+ console.log('addArg', subfolder);
+ if (
+ document
+ .getElementById('args_table')
+ .insertBefore(baseTR, document.getElementById('parent_add_tr'))
+ ) {
+ g_args++;
+ return baseTR;
+ }
}
function buildArgImages(orig_td, subfolder) {
- var table = document.createElement("table");
- var tbody = document.createElement("tbody");
- var tr = document.createElement("tr");
- var td = document.createElement("td");
- var img = document.createElement("img");
- img.src = subfolder + "/assets/images/themes/default/RaiseArgument.png";
- td.onmouseover = function () {
- this.style.cursor = 'pointer';
- this.title = g_lang_strargraise;
- }
- td.onclick = function () {
- swapArgTR(this.parentNode.parentNode.parentNode.parentNode.parentNode.previousSibling, this.parentNode.parentNode.parentNode.parentNode.parentNode);
- }
- img.className = 'arg_icon';
- td.appendChild(img);
- td.className = "data1";
- tr.appendChild(td);
- var img = document.createElement("img");
- var td = document.createElement("td");
- img.src = subfolder + "/assets/images/themes/default/LowerArgument.png";
- img.className = 'arg_icon';
- td.appendChild(img);
- td.className = "data1";
- td.onmouseover = function () {
- this.style.cursor = 'pointer';
- this.title = g_lang_strarglower;
- }
- td.onclick = function () {
- swapArgTR(this.parentNode.parentNode.parentNode.parentNode.parentNode, this.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling);
- }
- tr.appendChild(td);
- var img = document.createElement("img");
- var td = document.createElement("td");
- img.src = subfolder + "/assets/images/themes/default/RemoveArgument.png";
- img.title = g_lang_strargremove;
- img.className = 'arg_icon';
- td.appendChild(img);
- td.className = "data1";
- td.onmouseover = function () {
- this.style.cursor = 'pointer';
- this.title = 'Remove';
- }
- td.onclick = function () {
- if (g_args > 1) {
- if (confirm(g_lang_strargremoveconfirm)) document.getElementById("args_table").removeChild(this.parentNode.parentNode.parentNode.parentNode.parentNode);
- g_args--;
- } else {
- if (g_no_args == false) {
- disableArgTR(this.parentNode.parentNode.parentNode.parentNode.parentNode);
- this.childNodes[0].src = subfolder + '/images/themes/default/EnableArgument.png';
- this.childNodes[0].title = g_lang_strargenableargs;
- this.childNodes[0].id = "1st_arg_iag";
- alert(g_lang_strargnoargs);
- g_no_args = true;
- g_args--;
- } else {
- enableArgTR(this.parentNode.parentNode.parentNode.parentNode.parentNode);
- this.childNodes[0].src = subfolder + '/images/themes/default/RemoveArgument.png';
- this.childNodes[0].title = g_lang_strargremove;
- g_args++;
- g_no_args = false;
- }
- }
- }
- td.onmouseout = function () {}
- if (g_args == 0) {
- td.id = "1st_arg_td";
- }
- tr.className = 'arg_tr_pc';
- tr.appendChild(td);
- tbody.appendChild(tr);
- table.appendChild(tbody);
- orig_td.appendChild(table);
- return orig_td;
+ var table = document.createElement('table');
+ var tbody = document.createElement('tbody');
+ var tr = document.createElement('tr');
+ var td = document.createElement('td');
+ var img = document.createElement('img');
+ img.src = subfolder + '/assets/images/themes/default/RaiseArgument.png';
+ td.onmouseover = function () {
+ this.style.cursor = 'pointer';
+ this.title = g_lang_strargraise;
+ };
+ td.onclick = function () {
+ swapArgTR(
+ this.parentNode.parentNode.parentNode.parentNode.parentNode
+ .previousSibling,
+ this.parentNode.parentNode.parentNode.parentNode.parentNode
+ );
+ };
+ img.className = 'arg_icon';
+ td.appendChild(img);
+ td.className = 'data1';
+ tr.appendChild(td);
+ var img = document.createElement('img');
+ var td = document.createElement('td');
+ img.src = subfolder + '/assets/images/themes/default/LowerArgument.png';
+ img.className = 'arg_icon';
+ td.appendChild(img);
+ td.className = 'data1';
+ td.onmouseover = function () {
+ this.style.cursor = 'pointer';
+ this.title = g_lang_strarglower;
+ };
+ td.onclick = function () {
+ swapArgTR(
+ this.parentNode.parentNode.parentNode.parentNode.parentNode,
+ this.parentNode.parentNode.parentNode.parentNode.parentNode.nextSibling
+ );
+ };
+ tr.appendChild(td);
+ var img = document.createElement('img');
+ var td = document.createElement('td');
+ img.src = subfolder + '/assets/images/themes/default/RemoveArgument.png';
+ img.title = g_lang_strargremove;
+ img.className = 'arg_icon';
+ td.appendChild(img);
+ td.className = 'data1';
+ td.onmouseover = function () {
+ this.style.cursor = 'pointer';
+ this.title = 'Remove';
+ };
+ td.onclick = function () {
+ if (g_args > 1) {
+ if (confirm(g_lang_strargremoveconfirm)) {
+ document
+ .getElementById('args_table')
+ .removeChild(
+ this.parentNode.parentNode.parentNode.parentNode.parentNode
+ );
+ }
+ g_args--;
+ } else if (g_no_args == false) {
+ disableArgTR(this.parentNode.parentNode.parentNode.parentNode.parentNode);
+ this.childNodes[0].src =
+ subfolder + '/images/themes/default/EnableArgument.png';
+ this.childNodes[0].title = g_lang_strargenableargs;
+ this.childNodes[0].id = '1st_arg_iag';
+ alert(g_lang_strargnoargs);
+ g_no_args = true;
+ g_args--;
+ } else {
+ enableArgTR(this.parentNode.parentNode.parentNode.parentNode.parentNode);
+ this.childNodes[0].src =
+ subfolder + '/images/themes/default/RemoveArgument.png';
+ this.childNodes[0].title = g_lang_strargremove;
+ g_args++;
+ g_no_args = false;
+ }
+ };
+ td.onmouseout = function () {};
+ if (g_args == 0) {
+ td.id = '1st_arg_td';
+ }
+ tr.className = 'arg_tr_pc';
+ tr.appendChild(td);
+ tbody.appendChild(tr);
+ table.appendChild(tbody);
+ orig_td.appendChild(table);
+ return orig_td;
}
function noArgsRebuild(tr) {
- disableArgTR(tr);
- var td = document.getElementById("1st_arg_td");
- td.childNodes[0].src = 'images/themes/default/EnableArgument.png';
- td.childNodes[0].title = g_lang_strargenableargs;
- td.childNodes[0].id = "1st_arg_iag";
- g_no_args = true;
- g_args--;
+ disableArgTR(tr);
+ var td = document.getElementById('1st_arg_td');
+ td.childNodes[0].src = 'images/themes/default/EnableArgument.png';
+ td.childNodes[0].title = g_lang_strargenableargs;
+ td.childNodes[0].id = '1st_arg_iag';
+ g_no_args = true;
+ g_args--;
}
function swapArgTR(first, second) {
- var tmp = null;
- tmp = second;
- second = first;
- first = tmp;
- if (first.className == 'arg_tr_pc' && second.className == 'arg_tr_pc') {
- document.getElementById("args_table").insertBefore(first, second);
- } else if (first.className == 'arg_tr_pc' && second.className != 'arg_tr_pc') {
- alert(g_lang_strargnorowabove);
- } else if (first.className != 'arg_tr_pc' && second.className == 'arg_tr_pc') {
- alert(g_lang_strargnorowbelow);
- }
+ var tmp = null;
+ tmp = second;
+ second = first;
+ first = tmp;
+ if (first.className == 'arg_tr_pc' && second.className == 'arg_tr_pc') {
+ document.getElementById('args_table').insertBefore(first, second);
+ } else if (
+ first.className == 'arg_tr_pc' &&
+ second.className != 'arg_tr_pc'
+ ) {
+ alert(g_lang_strargnorowabove);
+ } else if (
+ first.className != 'arg_tr_pc' &&
+ second.className == 'arg_tr_pc'
+ ) {
+ alert(g_lang_strargnorowbelow);
+ }
}
function disableArgTR(tr) {
- var children = (tr.childNodes);
- for (i in children) {
- var secondary_children = children[i].childNodes;
- for (i2 in secondary_children) {
- secondary_children[i2].disabled = true;
- }
- }
+ var children = tr.childNodes;
+ for (i in children) {
+ var secondary_children = children[i].childNodes;
+ for (i2 in secondary_children) {
+ secondary_children[i2].disabled = true;
+ }
+ }
}
function enableArgTR(tr) {
- var children = (tr.childNodes);
- for (i in children) {
- var secondary_children = children[i].childNodes;
- for (i2 in secondary_children) {
- secondary_children[i2].disabled = false;
- }
- }
+ var children = tr.childNodes;
+ for (i in children) {
+ var secondary_children = children[i].childNodes;
+ for (i2 in secondary_children) {
+ secondary_children[i2].disabled = false;
+ }
+ }
}
function RebuildArgTR(mode, arg_name, arg_type, arg_array, subfolder) {
- var tr = document.createElement("tr");
- var td = document.createElement("td");
- var modes_select = buildSelect("formArgModes[]", g_main_modes, mode);
- modes_select.style.width = '100%';
- td.appendChild(modes_select);
- tr.appendChild(td);
- var arg_txt = document.createElement("input");
- arg_txt.type = 'text';
- arg_txt.name = 'formArgName[]';
- arg_txt.style.width = '100%';
- arg_txt.value = arg_name;
- var td = document.createElement("td");
- td.appendChild(arg_txt);
- tr.appendChild(td);
- var td = document.createElement("td");
- td.appendChild(buildSelect("formArgType[]", g_main_types, arg_type));
- if (arg_array == true) {
- var szArr = "[]";
- } else {
- var szArr = "";
- }
- td.appendChild(buildSelect("formArgArray[]", new Array("", "[]"), szArr));
- tr.appendChild(td);
- var td = document.createElement("td");
- td = buildArgImages(td, subfolder);
- td.className = "data3";
- tr.className = 'arg_tr_pc';
- tr.appendChild(td);
- if (document.getElementById("args_table").insertBefore(tr, document.getElementById("parent_add_tr"))) {
- g_args++;
- }
+ var tr = document.createElement('tr');
+ var td = document.createElement('td');
+ var modes_select = buildSelect('formArgModes[]', g_main_modes, mode);
+ modes_select.style.width = '100%';
+ td.appendChild(modes_select);
+ tr.appendChild(td);
+ var arg_txt = document.createElement('input');
+ arg_txt.type = 'text';
+ arg_txt.name = 'formArgName[]';
+ arg_txt.style.width = '100%';
+ arg_txt.value = arg_name;
+ var td = document.createElement('td');
+ td.appendChild(arg_txt);
+ tr.appendChild(td);
+ var td = document.createElement('td');
+ td.appendChild(buildSelect('formArgType[]', g_main_types, arg_type));
+ if (arg_array == true) {
+ var szArr = '[]';
+ } else {
+ var szArr = '';
+ }
+ td.appendChild(buildSelect('formArgArray[]', new Array('', '[]'), szArr));
+ tr.appendChild(td);
+ var td = document.createElement('td');
+ td = buildArgImages(td, subfolder);
+ td.className = 'data3';
+ tr.className = 'arg_tr_pc';
+ tr.appendChild(td);
+ if (
+ document
+ .getElementById('args_table')
+ .insertBefore(tr, document.getElementById('parent_add_tr'))
+ ) {
+ g_args++;
+ }
}
function buildSelect(name, options, selected) {
- var s = document.createElement('select');
- for (i = 0; i < options.length; i++) {
- var o = document.createElement('option');
- o.value = options[i];
- o.text = options[i];
- if (options[i].toLowerCase() == selected.toLowerCase()) {
- o.selected = "selected";
- }
- s.appendChild(o);
- }
- s.name = name;
- return s;
+ var s = document.createElement('select');
+ for (i = 0; i < options.length; i++) {
+ var o = document.createElement('option');
+ o.value = options[i];
+ o.text = options[i];
+ if (options[i].toLowerCase() == selected.toLowerCase()) {
+ o.selected = 'selected';
+ }
+ s.appendChild(o);
+ }
+ s.name = name;
+ return s;
}
function baseArgTR(subfolder) {
- if (g_no_args == false) {
- var tr = document.createElement("tr");
- var td = document.createElement("td");
- var txt = document.createElement("input");
- tr.className = 'arg_tr_pc';
- td.className = 'data3';
- td.innerHTML = g_modes_select;
- tr.appendChild(td);
- txt.type = 'text';
- txt.name = 'formArgName[]';
- txt.style.width = '100%';
- txt.value = g_name;
- var td = document.createElement("td");
- td.className = 'data3';
- td.appendChild(txt);
- tr.appendChild(td);
- var td = document.createElement("td");
- td.className = 'data3';
- td.innerHTML = g_types_select;
- tr.appendChild(td);
- var td = document.createElement("td");
- td = buildArgImages(td, subfolder);
- td.className = "data3";
- tr.appendChild(td);
- if (g_args == 0) {
- tr.id = "1st_arg_tr";
- }
- return tr;
- } else {
- var p_tr = document.getElementById("1st_arg_tr");
- enableArgTR(p_tr.childNodes[4]);
- document.getElementById("1st_arg_iag").src = subfolder + '/images/themes/default/RemoveArgument.png';
- g_args++;
- g_no_args = false;
- }
-} \ No newline at end of file
+ if (g_no_args == false) {
+ var tr = document.createElement('tr');
+ var td = document.createElement('td');
+ var txt = document.createElement('input');
+ tr.className = 'arg_tr_pc';
+ td.className = 'data3';
+ td.innerHTML = g_modes_select;
+ tr.appendChild(td);
+ txt.type = 'text';
+ txt.name = 'formArgName[]';
+ txt.style.width = '100%';
+ txt.value = g_name;
+ var td = document.createElement('td');
+ td.className = 'data3';
+ td.appendChild(txt);
+ tr.appendChild(td);
+ var td = document.createElement('td');
+ td.className = 'data3';
+ td.innerHTML = g_types_select;
+ tr.appendChild(td);
+ var td = document.createElement('td');
+ td = buildArgImages(td, subfolder);
+ td.className = 'data3';
+ tr.appendChild(td);
+ if (g_args == 0) {
+ tr.id = '1st_arg_tr';
+ }
+ return tr;
+ } else {
+ var p_tr = document.getElementById('1st_arg_tr');
+ enableArgTR(p_tr.childNodes[4]);
+ document.getElementById('1st_arg_iag').src =
+ subfolder + '/images/themes/default/RemoveArgument.png';
+ g_args++;
+ g_no_args = false;
+ }
+}
diff --git a/assets/js/indexes.js b/assets/js/indexes.js
index dc85f932..ab762498 100644
--- a/assets/js/indexes.js
+++ b/assets/js/indexes.js
@@ -1,71 +1,68 @@
- // Globals
-
- /*
- * Multiple Selection lists in HTML Document
- */
- var tableColumnList;
- var indexColumnList;
-
- /*
- * Two Array vars
- */
- var indexColumns,
- tableColumns;
-
- function buttonPressed(object) {
-
- if (object.name == "add") {
- from = tableColumnList;
- to = indexColumnList;
- } else {
- to = tableColumnList;
- from = indexColumnList;
- }
-
- var selectedOptions = getSelectedOptions(from);
-
- for (i = 0; i < selectedOptions.length; i++) {
- option = new Option(selectedOptions[i].text);
- addToArray(to, option);
- removeFromArray(from, selectedOptions[i].index);
- }
- }
-
- function doSelectAll() {
- for (var x = 0; x < indexColumnList.options.length; x++) {
- indexColumnList.options[x].selected = true;
- }
- }
-
- function init() {
- indexColumnList = document.getElementById("IndexColumnList");
- if (indexColumnList) {
- indexColumns = indexColumnList.options;
- }
-
- if (document.formIndex) {
- tableColumnList = document.formIndex.TableColumnList;
- tableColumns = tableColumnList.options;
- }
-
- }
-
- function getSelectedOptions(obj) {
- var selectedOptions = [];
-
- for (i = 0; i < obj.options.length; i++) {
- if (obj.options[i].selected) {
- selectedOptions.push(obj.options[i]);
- }
- }
-
- return selectedOptions;
- }
-
- function removeFromArray(obj, index) {
- obj.remove(index);
- }
-
- function addToArray(obj, item) {
- obj.options[obj.options.length] = item;
- } \ No newline at end of file
+// Globals
+
+/*
+ * Multiple Selection lists in HTML Document
+ */
+var tableColumnList;
+var indexColumnList;
+
+/*
+ * Two Array vars
+ */
+var indexColumns, tableColumns;
+
+function buttonPressed(object) {
+ if (object.name == 'add') {
+ from = tableColumnList;
+ to = indexColumnList;
+ } else {
+ to = tableColumnList;
+ from = indexColumnList;
+ }
+
+ var selectedOptions = getSelectedOptions(from);
+
+ for (i = 0; i < selectedOptions.length; i++) {
+ option = new Option(selectedOptions[i].text);
+ addToArray(to, option);
+ removeFromArray(from, selectedOptions[i].index);
+ }
+}
+
+function doSelectAll() {
+ for (var x = 0; x < indexColumnList.options.length; x++) {
+ indexColumnList.options[x].selected = true;
+ }
+}
+
+function init() {
+ indexColumnList = document.getElementById('IndexColumnList');
+ if (indexColumnList) {
+ indexColumns = indexColumnList.options;
+ }
+
+ if (document.formIndex) {
+ tableColumnList = document.formIndex.TableColumnList;
+ tableColumns = tableColumnList.options;
+ }
+}
+
+function getSelectedOptions(obj) {
+ var selectedOptions = [];
+
+ for (i = 0; i < obj.options.length; i++) {
+ if (obj.options[i].selected) {
+ selectedOptions.push(obj.options[i]);
+ }
+ }
+
+ return selectedOptions;
+}
+
+function removeFromArray(obj, index) {
+ obj.remove(index);
+}
+
+function addToArray(obj, item) {
+ obj.options[obj.options.length] = item;
+}
diff --git a/assets/js/insert_or_edit_row.js b/assets/js/insert_or_edit_row.js
index 0d5cdea5..f7dbf12d 100644
--- a/assets/js/insert_or_edit_row.js
+++ b/assets/js/insert_or_edit_row.js
@@ -1,25 +1,23 @@
-$(document).ready(function () {
+$(function () {
+ jQuery('.insert_row_input').on('change blur', function () {
+ const tr = $(this).closest('tr'),
+ checkbox = tr.find('.nullcheckbox');
- jQuery('.insert_row_input').on('change blur', function () {
- var tr = $(this).closest('tr'),
- checkbox = tr.find('.nullcheckbox');
+ if ($(this).val() !== '') {
+ 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 () {
+ const tr = $(this).closest('tr'),
+ checkbox = tr.find('.nullcheckbox');
- if ($(this).val() !== '') {
- checkbox.prop('checked', false);
- }
-
- });
-
- jQuery('input[type=submit]').on('mouseover', function () {
- jQuery('.insert_row_input').each(function () {
- var tr = $(this).closest('tr'),
- checkbox = tr.find('.nullcheckbox');
-
- if ($(this).val() !== '') {
- checkbox.prop('checked', false);
- }
- });
+ if ($(this).val() !== '') {
+ checkbox.prop('checked', false);
+ }
});
-
-
-}); \ No newline at end of file
+ });
+});
diff --git a/assets/js/multiactionform.js b/assets/js/multiactionform.js
index 1950608a..1cbe8c82 100644
--- a/assets/js/multiactionform.js
+++ b/assets/js/multiactionform.js
@@ -1,9 +1,11 @@
function checkAll(bool) {
+ var inputs = document
+ .getElementById('multi_form')
+ .getElementsByTagName('input');
- var inputs = document.getElementById('multi_form').getElementsByTagName('input');
-
- for (var i=0; i<inputs.length; i++) {
- if (inputs[i].type == 'checkbox')
- inputs[i].checked = bool;
- }
+ for (var i = 0; i < inputs.length; i++) {
+ if (inputs[i].type === 'checkbox') {
+ inputs[i].checked = bool;
+ }
+ }
}
diff --git a/assets/js/polyfills.js b/assets/js/polyfills.js
index a05f8d12..11f8d349 100644
--- a/assets/js/polyfills.js
+++ b/assets/js/polyfills.js
@@ -3,11 +3,10 @@
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map#Polyfill
if (!Array.prototype.map) {
Array.prototype.map = function (callback, thisArg) {
-
var T, A, k;
if (this == null) {
- throw new TypeError(" this is null or not defined");
+ throw new TypeError(' this is null or not defined');
}
// 1. Let O be the result of calling ToObject passing the |this| value as the argument.
@@ -19,8 +18,8 @@ if (!Array.prototype.map) {
// 4. If IsCallable(callback) is false, throw a TypeError exception.
// See: http://es5.github.com/#x9.11
- if (typeof callback !== "function") {
- throw new TypeError(callback + " is not a function");
+ if (typeof callback !== 'function') {
+ throw new TypeError(callback + ' is not a function');
}
// 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
@@ -37,7 +36,6 @@ if (!Array.prototype.map) {
// 8. Repeat, while k < len
while (k < len) {
-
var kValue, mappedValue;
// a. Let Pk be ToString(k).
@@ -46,7 +44,6 @@ if (!Array.prototype.map) {
// This step can be combined with c
// c. If kPresent is true, then
if (k in O) {
-
// i. Let kValue be the result of calling the Get internal method of O with argument Pk.
kValue = O[k];
diff --git a/assets/js/tables.js b/assets/js/tables.js
index 866ddeec..2ecc3119 100644
--- a/assets/js/tables.js
+++ b/assets/js/tables.js
@@ -7,12 +7,15 @@ function checkLengths(sValue, idx) {
return item.toString().toUpperCase();
});
// If the type has a predefined length on PostgreSQL, disable the length input field
- if (uppercase_predefined_lengths.indexOf(sValue.toString().toUpperCase()) !== -1) {
- document.getElementById("lengths" + idx).value = '';
- document.getElementById("lengths" + idx).disabled = 'on';
+ if (
+ uppercase_predefined_lengths.indexOf(sValue.toString().toUpperCase()) !==
+ -1
+ ) {
+ document.getElementById('lengths' + idx).value = '';
+ document.getElementById('lengths' + idx).disabled = 'on';
return;
}
- document.getElementById("lengths" + idx).disabled = '';
+ document.getElementById('lengths' + idx).disabled = '';
}
}
diff --git a/assets/sw.dev.js b/assets/sw.dev.js
new file mode 100644
index 00000000..afd1b2f3
--- /dev/null
+++ b/assets/sw.dev.js
@@ -0,0 +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) {
+ workbox.core.skipWaiting();
+
+ workbox.core.clientsClaim();
+
+ 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 8c42716d..8f496f78 100644
--- a/assets/templates/components/common_head.twig
+++ b/assets/templates/components/common_head.twig
@@ -1,7 +1,12 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ {% set development_assets=true %}
+ {% if development_assets==true %}
<link rel="stylesheet/less" href="{{subfolder}}/assets/themes/global.less" type="text/css" id="cssmain" />
+ <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 %}
<script src="{{subfolder}}/assets/js/polyfills.js" type="text/javascript"></script>
- <script src="{{subfolder}}/assets/js/less.min.js" type="text/javascript"></script>
<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" />
@@ -24,11 +29,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 936f9bd1..321017a1 100644
--- a/assets/templates/footer_iframe.twig
+++ b/assets/templates/footer_iframe.twig
@@ -21,6 +21,27 @@ window.onpopstate = function (event) {
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>
</body>
diff --git a/assets/themes/global.css b/assets/themes/global.css
new file mode 100644
index 00000000..c1cb510d
--- /dev/null
+++ b/assets/themes/global.css
@@ -0,0 +1,485 @@
+/**
+ * This is hte mandatory CSS file to include on top of every CSS theme file
+**/
+html {
+ height: 100%;
+ margin: 0;
+}
+html body {
+ /** Browser Tree using XLoadTree 2 **/
+ /** auto-complete on insert **/
+ /** bottom link back to top **/
+ /** FK browsing **/
+ /** Syntax highlighting **/
+}
+html body.sql_edit #sqlform #queryedition {
+ min-height: 80px;
+}
+html body.sql_edit #sqlform #queryedition > .CodeMirror {
+ min-height: 70px;
+}
+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 {
+ text-transform: uppercase;
+}
+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 {
+ width: 0.7em !important;
+}
+html body.sql_edit #sqlform #queryedition #query {
+ min-height: 70px;
+}
+html body.detailbody {
+ padding-top: 90px;
+ margin-left: 10px !important;
+ padding-bottom: 20px;
+}
+html body.detailbody table.tabs {
+ position: fixed;
+ top: 58px;
+ margin-left: -10px;
+ z-index: 50;
+}
+html body.detailbody table.tabs tbody tr td {
+ white-space: nowrap;
+}
+html body.detailbody table#data td {
+ white-space: nowrap;
+}
+html body.detailbody table#data td.opbutton1,
+html body.detailbody table#data td.opbutton2,
+html body.detailbody table#data td.opbutton3 {
+ border: 0 none;
+ padding-left: 1px;
+ padding-right: 1px;
+}
+html body.detailbody table#data td.opbutton1 a,
+html body.detailbody table#data td.opbutton2 a,
+html body.detailbody table#data td.opbutton3 a {
+ margin-left: 2px;
+ margin-right: 2px;
+}
+html body.detailbody table.will_be_datatable td {
+ white-space: nowrap;
+}
+html body.detailbody table.will_be_datatable td.opbutton1,
+html body.detailbody table.will_be_datatable td.opbutton2,
+html body.detailbody table.will_be_datatable td.opbutton3 {
+ border: 0 none;
+ padding-left: 1px;
+ padding-right: 1px;
+}
+html body.detailbody table.will_be_datatable td.opbutton1 a,
+html body.detailbody table.will_be_datatable td.opbutton2 a,
+html body.detailbody table.will_be_datatable td.opbutton3 a {
+ margin-left: 2px;
+ margin-right: 2px;
+}
+html body.detailbody table.will_be_datatable td.comment {
+ white-space: normal;
+}
+html body.detailbody table tr.data1 td.opbutton1 a,
+html body.detailbody table tr.data2 td.opbutton2 a,
+html body.detailbody table tr.data3 td.opbutton3 a {
+ -webkit-background-clip: border-box;
+ -webkit-background-origin: padding-box;
+ -webkit-background-size: auto;
+ -webkit-user-select: none;
+ background-attachment: scroll;
+ background-clip: border-box;
+ background-color: #428bca;
+ background-image: none;
+ background-origin: padding-box;
+ background-size: auto;
+ border: 1px solid #999;
+ border-radius: 1.5px;
+ cursor: pointer;
+ display: inline-block;
+ font-size: 11px;
+ font-weight: normal;
+ height: 15px;
+ line-height: 15px;
+ margin-bottom: 0px;
+ padding-bottom: 1px;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-top: 1px;
+ text-align: center;
+ text-decoration: none;
+ vertical-align: middle;
+ white-space: nowrap;
+ color: #fff !important;
+}
+html body .navlink li a {
+ -webkit-background-clip: border-box;
+ -webkit-background-origin: padding-box;
+ -webkit-background-size: auto;
+ -webkit-user-select: none;
+ background-attachment: scroll;
+ background-clip: border-box;
+ background-color: #428bca;
+ background-image: none;
+ background-origin: padding-box;
+ background-size: auto;
+ border: 1px solid #999;
+ border-radius: 1.5px;
+ cursor: pointer;
+ display: inline-block;
+ font-size: 12px;
+ font-weight: normal;
+ height: 15px;
+ line-height: 15px;
+ margin-bottom: 0px;
+ padding-bottom: 1px;
+ padding-left: 5px;
+ padding-right: 5px;
+ padding-top: 1px;
+ text-align: center;
+ text-decoration: none;
+ vertical-align: middle;
+ white-space: nowrap;
+ color: #fff !important;
+}
+html body.sql_edit #flexbox_wrapper {
+ height: 100%;
+ margin-top: 25px;
+}
+html body.sql_edit table.tabs {
+ top: 0;
+}
+html body.flexbox_body {
+ height: 100%;
+ margin: 0;
+}
+html body.flexbox_body .flexbox_wrapper {
+ display: flex;
+ height: 100%;
+ margin: 0;
+}
+html body.flexbox_body .flexbox_wrapper .ui-resizable-helper {
+ border: 2px dotted #00f;
+}
+html body.flexbox_body .flexbox_wrapper #masking_overlay {
+ position: fixed;
+ top: 0;
+ width: 100%;
+ bottom: 0;
+ z-index: 80;
+ display: none;
+}
+html body.flexbox_body .flexbox_wrapper > .detail_container {
+ height: 100%;
+ width: 100%;
+ margin: 0px;
+ padding: 0px;
+ text-align: left;
+ float: left;
+ flex: 1 1;
+}
+html body.flexbox_body .flexbox_wrapper > #browser_container {
+ height: 100%;
+ margin: 0px;
+ padding: 0px;
+ text-align: left;
+ float: left;
+ flex: 0 0 300px;
+}
+html
+ body.flexbox_body
+ .flexbox_wrapper
+ > #browser_container
+ > .browser_container {
+ height: 100%;
+ margin: 0px;
+ padding: 0px;
+ text-align: left;
+ float: left;
+ width: 100%;
+}
+html body.flexbox_body .flexbox_wrapper > #browser_container.ui-resizable {
+ width: 300px;
+ flex: unset;
+ border-right: 8px solid #cfd8dc;
+}
+html
+ body.flexbox_body
+ .flexbox_wrapper
+ > #browser_container.ui-resizable
+ .ui-resizable-handle.ui-resizable-e {
+ width: 8px;
+ right: -8px;
+ background: #84a0ad;
+ top: 45%;
+ height: 50px;
+}
+html body.flexbox_body.rtl .flexbox_wrapper > .detail_container {
+ float: right;
+ flex-grow: 1;
+}
+html body.flexbox_body.rtl .flexbox_wrapper > #browser_container {
+ float: right;
+ flex: 0 0 300px;
+}
+html body.flexbox_body.rtl .flexbox_wrapper > #browser_container.ui-resizable {
+ flex: unset;
+ 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 {
+ width: 8px;
+ left: -8px;
+ background: #84a0ad;
+ top: 45%;
+ height: 50px;
+}
+html body.browser {
+ height: 100%;
+ margin: 0px;
+ padding: 0px;
+ text-align: left;
+}
+html body.browser .refreshTree {
+ float: right;
+ text-align: right;
+ padding: 0 3px;
+}
+html body.browser .webfx-tree-row {
+ white-space: nowrap;
+}
+html body.browser .webfx-tree-children {
+ background-repeat: repeat-y;
+ background-position-y: 1px !important;
+ /* IE only */
+}
+html body.browser .webfx-tree-row img {
+ vertical-align: middle;
+}
+html body.browser .webfx-tree-item-label {
+ margin-left: 0.5ex;
+}
+html body.browser .webfx-tree-icon {
+ margin-left: 1px;
+}
+html body.browser .webfx-tree-hide-root {
+ display: none;
+}
+html body img {
+ border: none;
+}
+html body p.message {
+ color: blue;
+}
+html body p.comment {
+ font-style: italic;
+}
+html body .left {
+ text-align: left;
+}
+html body .pre {
+ white-space: pre;
+}
+html body .arg_icon {
+ padding-right: 5pt;
+ padding-left: 5pt;
+}
+html body .topbar {
+ position: fixed;
+ z-index: 100;
+ width: 100%;
+ top: 0;
+ margin-left: -10px !important;
+}
+html body .trail {
+ position: fixed;
+ z-index: 100;
+ width: 100%;
+ top: 27px;
+ margin-left: -10px !important;
+}
+html body #fkbg {
+ display: none;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 10;
+}
+html body #fklist {
+ display: none;
+ position: absolute;
+ background: #fff;
+ border: 1px solid #000;
+ overflow: auto;
+ z-index: 15;
+}
+html body #fklist table {
+ border-collapse: collapse;
+ border: 1px solid #aaa;
+}
+html body #fklist th {
+ border: 1px solid #aaa;
+}
+html body #fklist td,
+html body #fklist th {
+ padding: 3px 10px;
+ border-right: 1px solid #aaa;
+ font-size: 12px;
+}
+html body #fklist td a {
+ display: block;
+ color: #000;
+}
+html body #fklist td a.fkval,
+html body p.errmsg {
+ color: red;
+}
+html body .ac_values {
+ width: 100%;
+}
+html body .bottom_link {
+ position: fixed;
+ bottom: 0;
+ right: 0;
+ margin: 0;
+ padding: 4px;
+ background: #eee;
+ border-top: 1px dotted #999;
+ border-left: 1px dotted #999;
+ font-size: smaller;
+}
+html body div#root {
+ position: absolute;
+}
+html body div.fk {
+ margin-left: 20px;
+}
+html body div#fkcontainer {
+ margin: 0;
+ position: relative;
+ width: 100%;
+ background: none;
+ border: 0px;
+}
+html body div.fk_value {
+ display: inline-block;
+}
+html body .highlight {
+ background-color: #ffff00;
+}
+html body .comment {
+ color: #008080;
+}
+html body .keyword {
+ color: #ff8000;
+}
+html body .literal {
+ color: #808080;
+}
+html body .bold {
+ font-weight: bold;
+}
+html body .select2-container {
+ min-width: 250px;
+}
+html body form.sqlform {
+ float: left;
+ width: 100%;
+}
+html body form.sqlform .sqledit_bottom_inputs {
+ padding: 1%;
+ width: 98%;
+ float: left;
+}
+html body form.sqlform .sqledit_bottom_inputs p label {
+ float: left;
+}
+html body form.sqlform .sqledit_bottom_inputs p label #paginate {
+ position: relative;
+ top: 2px;
+}
+html body .searchpath {
+ padding: 5px;
+ clear: both;
+}
+html body .CodeMirror {
+ border: 1px solid #aaa;
+ padding: 3px;
+ font-size: 1.1em;
+ line-height: 1.5em;
+}
+@media print {
+ @page {
+ size: 215.9mm 279.4mm;
+ margin: 5mm 5mm 5mm 5mm;
+ orphans: 100;
+ widows: 0;
+ }
+ html,
+ body {
+ height: 100%;
+ width: 100%;
+ }
+ #browser_container {
+ display: none;
+ }
+ body {
+ margin: 0;
+ background: white;
+ background-color: #ffffff;
+ }
+ body .flexbox_wrapper > .detail_container {
+ height: 100%;
+ width: 100%;
+ margin: 0px;
+ padding: 0px;
+ text-align: left;
+ float: left;
+ flex: 1 1;
+ border: 4px red;
+ }
+ body .topbar {
+ display: none;
+ }
+ body .trail {
+ display: none;
+ }
+ body h2 {
+ display: none;
+ }
+}
diff --git a/assets/js/less.min.js b/assets/vendor/less.min.js
index 6319704f..6319704f 100644
--- a/assets/js/less.min.js
+++ b/assets/vendor/less.min.js
diff --git a/composer-require-checker.json b/composer-require-checker.json
new file mode 100644
index 00000000..0a1356b7
--- /dev/null
+++ b/composer-require-checker.json
@@ -0,0 +1,34 @@
+{
+ "symbol-whitelist": [
+ "array",
+ "bool",
+ "callable",
+ "false",
+ "float",
+ "int",
+ "iterable",
+ "null",
+ "object",
+ "parent",
+ "self",
+ "static",
+ "string",
+ "true",
+ "void",
+ "ADODB_postgres8",
+ "ADORecordSet_assoc_postgres8",
+ "ADORecordSet_postgres8",
+ "dump",
+ "PDO",
+ "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"]
+
+}
diff --git a/composer.json b/composer.json
index 5f8b5590..c831afea 100644
--- a/composer.json
+++ b/composer.json
@@ -1,67 +1,77 @@
{
- "name": "huasofoundries/phppgadmin6",
- "type": "project",
- "description": "Like phpmyadmin but for postgres",
- "license": [
- "MIT",
- "GPL-2.0-OR-LATER",
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "FFFlabs",
- "email": "amenadiel@gmail.com"
- }
- ],
- "require": {
- "php": ">=7.1",
- "ext-pgsql": "*",
- "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"
- },
- "require-dev": {
- "codeception/codeception": "*",
- "codeception/module-asserts": "^1.1",
- "ergebnis/composer-normalize": "^2.2",
- "ergebnis/php-cs-fixer-config": "^2.0",
- "filp/whoops": "^2.7",
- "friendsofphp/php-cs-fixer": "^2.16",
- "kint-php/kint": "~3.3",
- "ocramius/package-versions": "~1.4.0",
- "php-parallel-lint/php-parallel-lint": "^1.2",
- "phpstan/phpstan": "^0.12.14",
- "simpletest/simpletest": "^1.1",
- "vimeo/psalm": "~3.9.3"
- },
- "extra": {
- "version": "6.0.0"
- },
- "autoload": {
- "psr-4": {
- "PHPPgAdmin\\": "src/classes",
- "PHPPgAdmin\\Controller\\": "src/controllers",
- "PHPPgAdmin\\Middleware\\": "src/middleware",
- "PHPPgAdmin\\Database\\": "src/database",
- "PHPPgAdmin\\XHtml\\": "src/xhtml",
- "PHPPgAdmin\\Decorators\\": "src/decorators",
- "PHPPgAdmin\\Traits\\": "src/traits",
- "PHPPgAdmin\\Database\\Traits\\": "src/database/databasetraits",
- "PHPPgAdmin\\Help\\": "src/help",
- "PHPPgAdmin\\Translations\\": "src/translations"
- }
- },
- "scripts": {
- "post-install-cmd": "@clear_twig_cache",
- "post-create-project-cmd": "@clear_twig_cache",
- "clear_twig_cache": [
- "make fix_permissions",
- "php -r \"array_map( 'unlink', array_filter((array) glob('temp/twigcache/**/*.php', GLOB_BRACE)));\"",
- "php -r \"array_map( 'rmdir', array_filter((array) glob('temp/twigcache/*', GLOB_BRACE)));\""
- ],
- "phpstan": "phpstan analyse src "
+ "name": "huasofoundries/phppgadmin6",
+ "type": "project",
+ "description": "Like phpmyadmin but for postgres",
+ "license": [
+ "MIT",
+ "GPL-2.0-OR-LATER",
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "FFFlabs",
+ "email": "amenadiel@gmail.com"
}
+ ],
+ "require": {
+ "php": ">=7.2",
+ "ext-json": "*",
+ "ext-mbstring": "*",
+ "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.1",
+ "twig/twig": "~3"
+ },
+ "require-dev": {
+ "codeception/codeception": "*",
+ "codeception/module-asserts": "^1.1",
+ "ergebnis/composer-normalize": "^2.2",
+ "ergebnis/php-cs-fixer-config": "^2.0",
+ "filp/whoops": "^2.7",
+ "friendsofphp/php-cs-fixer": "^2.16",
+ "kint-php/kint": "~3.3",
+ "ocramius/package-versions": "~1.4.0",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan": "^0.12.14",
+ "rector/rector-prefixed": "^0.8.29",
+ "staabm/annotate-pull-request-from-checkstyle": "^1.4",
+ "vimeo/psalm": "~3.9.3"
+ },
+ "extra": {
+ "version": "6.0.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPPgAdmin\\": "src/classes",
+ "PHPPgAdmin\\Controller\\": "src/controllers",
+ "PHPPgAdmin\\Middleware\\": "src/middleware",
+ "PHPPgAdmin\\Database\\": "src/database",
+ "PHPPgAdmin\\XHtml\\": "src/xhtml",
+ "PHPPgAdmin\\Decorators\\": "src/decorators",
+ "PHPPgAdmin\\Traits\\": "src/traits",
+ "PHPPgAdmin\\Database\\Traits\\": "src/database/databasetraits",
+ "PHPPgAdmin\\Help\\": "src/help",
+ "PHPPgAdmin\\Translations\\": "src/translations"
+ },
+ "files": [
+ "vendor/adodb/adodb-php/drivers/adodb-postgres9.inc.php",
+ "vendor/adodb/adodb-php/drivers/adodb-pdo.inc.php",
+ "vendor/adodb/adodb-php/drivers/adodb-pdo_pgsql.inc.php"
+ ]
+ },
+ "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",
+ "php -r \"array_map( 'unlink', array_filter((array) glob('temp/twigcache/**/*.php', GLOB_BRACE)));\"",
+ "php -r \"array_map( 'rmdir', array_filter((array) glob('temp/twigcache/*', GLOB_BRACE)));\""
+ ],
+ "phpstan": "phpstan analyse src "
+ }
}
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/globals.d.ts b/globals.d.ts
new file mode 100644
index 00000000..1059108a
--- /dev/null
+++ b/globals.d.ts
@@ -0,0 +1,8 @@
+import * as jQuery from 'jquery';
+
+declare global {
+ interface Window {
+ jQuery: typeof jQuery;
+ $: typeof jQuery;
+ }
+} \ No newline at end of file
diff --git a/mk_linters.mk b/mk_linters.mk
new file mode 100644
index 00000000..3e9abfe0
--- /dev/null
+++ b/mk_linters.mk
@@ -0,0 +1,189 @@
+VERSION = $(shell cat composer.json | sed -n 's/.*"version": "\([^"]*\)"/\1/p')
+
+SHELL = /usr/bin/env bash
+
+HAS_PSALM := $(shell ls ./vendor/bin/xpsalm 2> /dev/null)
+XDSWI := $(shell command -v xd_swi 2> /dev/null)
+HAS_PHPMD := $(shell command -v phpmd 2> /dev/null)
+HAS_CSFIXER:= $(shell command -v php-cs-fixer 2> /dev/null)
+XDSWI_STATUS:=$(shell command xd_swi stat 2> /dev/null)
+HAS_PHIVE:=$(shell command phive --version 2> /dev/null)
+CURRENT_BRANCH:=$(shell command git rev-parse --abbrev-ref HEAD 2> /dev/null)
+DATENOW:=`date +'%Y-%m-%d'`
+YELLOW=\033[0;33m
+RED=\033[0;31m
+WHITE=\033[0m
+GREEN=\u001B[32m
+
+
+
+
+disable_xdebug:
+ @if [[ "$(XDSWI)" != "" ]]; then \
+ xd_swi off ;\
+ fi
+
+enable_xdebug:
+ @if [[ "$(XDSWI)" != "" ]]; then \
+ xd_swi $(new_status) ;\
+ fi
+
+abort_suggesting_composer:
+ @if [ "0" != "$(XDSWI_STATUS)" ]; then \
+ $(YELLOW)Warn: $(GREEN)xdebug$(WHITE) is enabled. Just saying... ;\
+ fi
+ @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
+
+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
+
+
+update_baselines:
+ @${MAKE} disable_xdebug --no-print-directory ;\
+ 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/*
+
+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/*
+
+
+
+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 ;\
+ 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 ""
+
+
+.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 1d6a718a..e2f6991b 100644
--- a/package.json
+++ b/package.json
@@ -5,11 +5,26 @@
"repository": "git@github.com:HuasoFoundries/phpPgAdmin6.git",
"author": "ffflabs <amenadiel@gmail.com>",
"license": "MIT",
+ "scripts": {
+ "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": "prettier -c --config .prettierrc assets/{js,themes}/*"
+ },
"devDependencies": {
- "babel-eslint": "^10.0.3",
- "eslint": "^6.8.0",
- "eslint-config-prettier": "^6.10.0",
- "eslint-plugin-prettier": "^3.1.2",
- "prettier": "^1.19.1"
- }
+ "@types/jquery": "^3.5.1",
+ "babel-eslint": "^10.1.0",
+ "eslint": "^7.8.1",
+ "eslint-config-prettier": "^6.11.0",
+ "eslint-plugin-prettier": "^3.1.4",
+ "lessc": "^1.0.2",
+ "melody-idom": "^1.7.5",
+ "melody-runtime": "^1.7.5",
+ "prettier": "^2.1.1",
+ "prettier-plugin-twig-melody": "^0.4.6",
+ "tslib": "^2.0.1",
+ "typescript": "^4.0.3"
+ },
+ "dependencies": {}
}
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
new file mode 100644
index 00000000..14526e88
--- /dev/null
+++ b/phpstan-baseline.neon
@@ -0,0 +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: "#^Call to an undefined method PHPPgAdmin\\\\Controller\\\\ConstraintsController\\:\\:doTree\\(\\)\\.$#"
+ count: 1
+ path: src/controllers/ConstraintsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\ConstraintsController\\:\\:doDefault\\(\\) \\(void\\) is used\\.$#"
+ count: 7
+ path: src/controllers/ConstraintsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\ConstraintsController\\:\\:formPrimaryOrUniqueKey\\(\\) \\(void\\) is used\\.$#"
+ count: 2
+ path: src/controllers/ConstraintsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\ConstraintsController\\:\\:formAddForeignKey\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/ConstraintsController.php
+
+ -
+ message: "#^Result of method PHPPgAdmin\\\\Controller\\\\DatabaseController\\:\\:currentLocks\\(\\) \\(void\\) is used\\.$#"
+ count: 1
+ path: src/controllers/DatabaseController.php
+
+ -
+ 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 7ea93f06..12731493 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,5 +1,5 @@
-#includes:
-# - .build/phpstan/phpstan.baseline.neon
+includes:
+ - phpstan-baseline.neon
parameters:
@@ -10,9 +10,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
@@ -29,37 +29,3 @@ parameters:
- src/router.php
treatPhpDocTypesAsCertain: false
-
-
-
-
- ignoreErrors:
-
-# -
-# 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: "#^Access to an undefined property Psr\\\\[a-zA-Z0-9_]+\\\\[a-zA-Z0-9_]+\\:\\:\\$[a-zA-Z0-9_]+\\.$#"
- path: src/*
-
- -
- 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\\\\[a-zA-Z0-9_]+\\\\[a-zA-Z0-9_]+\\:\\:[a-zA-Z0-9_]+\\(\\) \\(void\\) is used\\.$#"
- path: src/*
-
- -
- message: "#^Call to static method br2ln\\(\\) on trait PHPPgAdmin\\Traits\\HelperTrait\\.#"
- path: src/*
-
- -
- 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_]+\(\)#'
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
new file mode 100644
index 00000000..030d4cf4
--- /dev/null
+++ b/psalm-baseline.xml
@@ -0,0 +1,599 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/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>$this-&gt;conn</code>
+ <code>$this-&gt;conn</code>
+ </UndefinedDocblockClass>
+ </file>
+ <file src="src/classes/ContainerUtils.php">
+ <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">
+ <InvalidNullableReturnType occurrences="1">
+ <code>string</code>
+ </InvalidNullableReturnType>
+ <NullableReturnStatement occurrences="1">
+ <code>$this-&gt;_server_id</code>
+ </NullableReturnStatement>
+ </file>
+ <file src="src/controllers/AggregatesController.php">
+ <NullReference occurrences="1">
+ <code>$_REQUEST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/AlldbController.php">
+ <NullReference occurrences="3">
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/BaseController.php">
+ <UndefinedThisPropertyAssignment occurrences="1">
+ <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>
+ </NullArgument>
+ <NullReference occurrences="1">
+ <code>$_REQUEST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/ConstraintsController.php">
+ <NullReference occurrences="5">
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ </NullReference>
+ <UndefinedMethod occurrences="1">
+ <code>doTree</code>
+ </UndefinedMethod>
+ </file>
+ <file src="src/controllers/DatabaseController.php">
+ <NullReference occurrences="1">
+ <code>$_REQUEST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/DbexportController.php">
+ <EmptyArrayAccess occurrences="1">
+ <code>$version[1]</code>
+ </EmptyArrayAccess>
+ </file>
+ <file src="src/controllers/DisplayController.php">
+ <EmptyArrayAccess occurrences="1">
+ <code>$urlvars['search_path']</code>
+ </EmptyArrayAccess>
+ <InvalidArgument occurrences="1">
+ <code>$resultset-&gt;recordCount()</code>
+ </InvalidArgument>
+ <InvalidArrayOffset occurrences="2">
+ <code>$_gets['subject']</code>
+ <code>$fields['schema']</code>
+ </InvalidArrayOffset>
+ <NullReference occurrences="5">
+ <code>$_REQUEST</code>
+ <code>$_REQUEST</code>
+ <code>$_REQUEST</code>
+ <code>$_REQUEST</code>
+ <code>$_POST</code>
+ </NullReference>
+ <UndefinedDocblockClass occurrences="7">
+ <code>$resultset-&gt;recordCount()</code>
+ <code>$resultset-&gt;recordCount()</code>
+ <code>$resultset-&gt;fetchField($index)</code>
+ <code>$finfo-&gt;name</code>
+ <code>$finfo-&gt;name</code>
+ <code>$resultset-&gt;fetchField($j++)</code>
+ <code>$finfo-&gt;type</code>
+ </UndefinedDocblockClass>
+ </file>
+ <file src="src/controllers/DomainsController.php">
+ <NullReference occurrences="3">
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/FulltextController.php">
+ <InvalidArgument occurrences="1">
+ <code>$items</code>
+ </InvalidArgument>
+ <NullReference occurrences="6">
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <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>
+ <NullableReturnStatement occurrences="2">
+ <code>$this-&gt;_printNavLinks('functions-properties', $func_full)</code>
+ <code>$this-&gt;_printNavLinks('functions-properties', $func_full)</code>
+ </NullableReturnStatement>
+ <TooFewArguments occurrences="1">
+ <code>showDefinition</code>
+ </TooFewArguments>
+ <UndefinedVariable occurrences="1">
+ <code>$f</code>
+ </UndefinedVariable>
+ </file>
+ <file src="src/controllers/GroupsController.php">
+ <NullReference occurrences="3">
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ </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>
+ <code>$_REQUEST</code>
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/InfoController.php">
+ <UndefinedThisPropertyAssignment occurrences="1">
+ <code>$this-&gt;shownull</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="4">
+ <code>$this-&gt;shownull</code>
+ <code>$this-&gt;shownull</code>
+ <code>$this-&gt;shownull</code>
+ <code>$this-&gt;shownull</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/controllers/MaterializedviewpropertiesController.php">
+ <NullReference occurrences="2">
+ <code>$_REQUEST</code>
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/MaterializedviewsController.php">
+ <NullReference occurrences="2">
+ <code>$_REQUEST</code>
+ <code>$_REQUEST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/PrivilegesController.php">
+ <NullReference occurrences="2">
+ <code>$_REQUEST</code>
+ <code>$_REQUEST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/RolesController.php">
+ <NullReference occurrences="4">
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/RulesController.php">
+ <NullReference occurrences="1">
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/SchemasController.php">
+ <NullReference occurrences="2">
+ <code>$_POST</code>
+ <code>$_POST</code>
+ </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">
+ <code>$_REQUEST</code>
+ <code>$_REQUEST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/TablesController.php">
+ <NullReference occurrences="3">
+ <code>$_REQUEST</code>
+ <code>$_POST</code>
+ <code>$_POST</code>
+ </NullReference>
+ <UndefinedDocblockClass occurrences="1">
+ <code>$tables-&gt;recordCount()</code>
+ </UndefinedDocblockClass>
+ </file>
+ <file src="src/controllers/TablespacesController.php">
+ <NullReference occurrences="2">
+ <code>$_POST</code>
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/TblpropertiesController.php">
+ <NullReference occurrences="4">
+ <code>$_POST</code>
+ <code>$_POST</code>
+ <code>$_REQUEST</code>
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/TreeController.php">
+ <InvalidReturnStatement occurrences="1">
+ <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">
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/TypesController.php">
+ <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">
+ <code>$_POST</code>
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/ViewpropertiesController.php">
+ <NullReference occurrences="2">
+ <code>$_REQUEST</code>
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/controllers/ViewsController.php">
+ <NullReference occurrences="2">
+ <code>$_REQUEST</code>
+ <code>$_REQUEST</code>
+ </NullReference>
+ </file>
+ <file src="src/database/ADOdbBase.php">
+ <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>
+ <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>
+ </file>
+ <file src="src/database/databasetraits/FtsTrait.php">
+ <InvalidArrayOffset occurrences="4">
+ <code>$template['schema']</code>
+ <code>$template['name']</code>
+ <code>$template['schema']</code>
+ <code>$template['name']</code>
+ </InvalidArrayOffset>
+ </file>
+ <file src="src/database/databasetraits/FunctionTrait.php">
+ <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/SchemaTrait.php">
+ <InvalidReturnType occurrences="1">
+ <code>int</code>
+ </InvalidReturnType>
+ </file>
+ <file src="src/database/databasetraits/SequenceTrait.php">
+ <UndefinedDocblockClass occurrences="2">
+ <code>$seq-&gt;recordCount()</code>
+ <code>$data-&gt;recordCount()</code>
+ </UndefinedDocblockClass>
+ </file>
+ <file src="src/database/databasetraits/TableTrait.php">
+ <InvalidArgument occurrences="1">
+ <code>$privs</code>
+ </InvalidArgument>
+ <InvalidReturnType occurrences="2">
+ <code>\PHPPgAdmin\ADORecordSet</code>
+ <code>bool</code>
+ </InvalidReturnType>
+ </file>
+ <file src="src/database/databasetraits/TriggerTrait.php">
+ <InvalidReturnType occurrences="1">
+ <code>int</code>
+ </InvalidReturnType>
+ </file>
+ <file src="src/decorators/ActionUrlDecorator.php">
+ <UndefinedThisPropertyAssignment occurrences="4">
+ <code>$this-&gt;base</code>
+ <code>$this-&gt;queryVars</code>
+ <code>$this-&gt;base</code>
+ <code>$this-&gt;queryVars</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="1">
+ <code>$this-&gt;base</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/decorators/ArrayMergeDecorator.php">
+ <UndefinedThisPropertyAssignment occurrences="1">
+ <code>$this-&gt;m</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="1">
+ <code>$this-&gt;m</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/decorators/BranchUrlDecorator.php">
+ <UndefinedThisPropertyAssignment occurrences="4">
+ <code>$this-&gt;base</code>
+ <code>$this-&gt;queryVars</code>
+ <code>$this-&gt;base</code>
+ <code>$this-&gt;queryVars</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="1">
+ <code>$this-&gt;base</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/decorators/CallbackDecorator.php">
+ <UndefinedThisPropertyAssignment occurrences="2">
+ <code>$this-&gt;fn</code>
+ <code>$this-&gt;p</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="2">
+ <code>$this-&gt;fn</code>
+ <code>$this-&gt;p</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/decorators/ConcatDecorator.php">
+ <UndefinedThisPropertyAssignment occurrences="1">
+ <code>$this-&gt;c</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="1">
+ <code>$this-&gt;c</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/decorators/Decorator.php">
+ <UndefinedThisPropertyAssignment occurrences="1">
+ <code>$this-&gt;val</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="1">
+ <code>$this-&gt;val</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/decorators/FieldDecorator.php">
+ <UndefinedThisPropertyAssignment occurrences="2">
+ <code>$this-&gt;f</code>
+ <code>$this-&gt;d</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="2">
+ <code>$this-&gt;f</code>
+ <code>$this-&gt;d</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/decorators/IfEmptyDecorator.php">
+ <UndefinedThisPropertyAssignment occurrences="6">
+ <code>$this-&gt;val</code>
+ <code>$this-&gt;empty</code>
+ <code>$this-&gt;full</code>
+ <code>$this-&gt;val</code>
+ <code>$this-&gt;empty</code>
+ <code>$this-&gt;full</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="2">
+ <code>$this-&gt;val</code>
+ <code>$this-&gt;empty</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/decorators/RedirectUrlDecorator.php">
+ <UndefinedThisPropertyAssignment occurrences="4">
+ <code>$this-&gt;base</code>
+ <code>$this-&gt;queryVars</code>
+ <code>$this-&gt;base</code>
+ <code>$this-&gt;queryVars</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="1">
+ <code>$this-&gt;base</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/decorators/ReplaceDecorator.php">
+ <UndefinedThisPropertyAssignment occurrences="2">
+ <code>$this-&gt;s</code>
+ <code>$this-&gt;p</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="2">
+ <code>$this-&gt;s</code>
+ <code>$this-&gt;p</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/decorators/UrlDecorator.php">
+ <UndefinedThisPropertyAssignment occurrences="4">
+ <code>$this-&gt;base</code>
+ <code>$this-&gt;queryVars</code>
+ <code>$this-&gt;base</code>
+ <code>$this-&gt;queryVars</code>
+ </UndefinedThisPropertyAssignment>
+ <UndefinedThisPropertyFetch occurrences="1">
+ <code>$this-&gt;base</code>
+ </UndefinedThisPropertyFetch>
+ </file>
+ <file src="src/router.php">
+ <InvalidScope occurrences="7">
+ <code>$this</code>
+ <code>$this</code>
+ <code>$this</code>
+ <code>$this</code>
+ <code>$this</code>
+ <code>$this</code>
+ <code>$this</code>
+ </InvalidScope>
+ </file>
+ <file src="src/traits/AdminTrait.php">
+ <InvalidArrayOffset occurrences="2">
+ <code>$actions['edit']['vars']</code>
+ <code>$actions['delete']['vars']</code>
+ </InvalidArrayOffset>
+ <ParadoxicalCondition occurrences="1">
+ <code>empty($_REQUEST['table'])</code>
+ </ParadoxicalCondition>
+ <UndefinedDocblockClass occurrences="1">
+ <code>$autovac-&gt;recordCount()</code>
+ </UndefinedDocblockClass>
+ </file>
+ <file src="src/traits/HelperTrait.php">
+ <UndefinedDocblockClass occurrences="1">
+ <code>$set-&gt;recordCount()</code>
+ </UndefinedDocblockClass>
+ </file>
+ <file src="src/traits/ViewsMatviewsTrait.php">
+ <EmptyArrayAccess occurrences="1">
+ <code>$formLink[$i]['operator']</code>
+ </EmptyArrayAccess>
+ <NullReference occurrences="1">
+ <code>$_POST</code>
+ </NullReference>
+ </file>
+ <file src="src/xhtml/HTMLController.php">
+ <ConflictingReferenceConstraint occurrences="1">
+ <code>else {</code>
+ </ConflictingReferenceConstraint>
+ </file>
+</files>
diff --git a/psalm.xml b/psalm.xml
index bbc56be6..d2938f69 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -3,18 +3,18 @@
totallyTyped="false"
errorLevel="3"
resolveFromConfigFile="true"
+ autoloader="src/lib.inc.php"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
- errorBaseline=".build/psalm/psalm-baseline.xml"
->
+ errorBaseline="psalm-baseline.xml">
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
<directory name="temp" />
- <directory name="tests" />
+ <directory name="src/translations" />
</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 cb3cd9df..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
@@ -25,6 +20,16 @@ class ADORecordSet extends \ADORecordSet implements \Countable
}
/**
+ * synonyms RecordCount and RowCount.
+ *
+ * @return int number of rows or -1 if this is not supported
+ */
+ public function recordCount()
+ {
+ return $this->count();
+ }
+
+ /**
* Returns the recordCount.
*
* @param int $fieldoffset
diff --git a/src/classes/ADOdbException.php b/src/classes/ADOdbException.php
index 59456343..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 number $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 number $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/ArrayRecordSet.php b/src/classes/ArrayRecordSet.php
index 692d8236..23a3e84a 100644
--- a/src/classes/ArrayRecordSet.php
+++ b/src/classes/ArrayRecordSet.php
@@ -6,6 +6,8 @@
namespace PHPPgAdmin;
+use Countable;
+
/**
* @file
* Really simple RecordSet to allow printTable of arrays.
@@ -19,7 +21,7 @@ namespace PHPPgAdmin;
*
* Id: ArrayRecordSet.php,v 1.3 2007/01/10 01:46:28 soranzo Exp $
*/
-class ArrayRecordSet
+class ArrayRecordSet implements Countable
{
public $EOF = false;
@@ -27,8 +29,6 @@ class ArrayRecordSet
private $_array;
- private $_count;
-
/**
* Constructor.
*
@@ -37,7 +37,6 @@ class ArrayRecordSet
public function __construct($data)
{
$this->_array = $data;
- $this->_count = \count($this->_array);
$this->fields = \reset($this->_array);
if (false === $this->fields) {
@@ -46,13 +45,21 @@ class ArrayRecordSet
}
/**
+ * Returns the recordCount.
+ */
+ public function count(): int
+ {
+ return \count($this->_array);
+ }
+
+ /**
* Counts the records in the instance array.
*
* @return int number of records in the instance array
*/
public function recordCount()
{
- return $this->_count;
+ return $this->count();
}
/**
diff --git a/src/database/Connection.php b/src/classes/Connection.php
index 4f50cd49..7654d503 100644
--- a/src/database/Connection.php
+++ b/src/classes/Connection.php
@@ -4,7 +4,7 @@
* PHPPgAdmin 6.0.0
*/
-namespace PHPPgAdmin\Database;
+namespace PHPPgAdmin;
/**
* @file
@@ -20,6 +20,11 @@ class Connection
public $platform = 'UNKNOWN';
+ /**
+ * @var string
+ */
+ public $driver;
+
protected $container;
protected $server_info;
@@ -37,25 +42,30 @@ class Connection
'9.2' => 'Postgres92',
'9.1' => 'Postgres91',
'9.0' => 'Postgres90',
- '8.4' => 'Postgres84',
- '8.3' => 'Postgres83',
- '8.2' => 'Postgres82',
- '8.1' => 'Postgres81',
- '8.0' => 'Postgres80',
- '7.5' => 'Postgres80',
- '7.4' => 'Postgres74',
];
+ /**
+ * @var string
+ */
+ private $pgVersion;
+
+ /**
+ * @var string
+ */
+ private $_captured_error;
+
+ private $adodb_driver = 'postgres9';
+
// 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)
{
@@ -69,45 +79,17 @@ class Connection
$this->container = $container;
- $this->conn = ADONewConnection('postgres9');
- //$this->conn->debug = true;
+ $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->conn->setFetchMode($fetchMode);
- // Ignore host if null
- if (null === $host || '' === $host) {
- if (null !== $port && '' !== $port) {
- $pghost = ':' . $port;
- } else {
- $pghost = '';
- }
- } else {
- $pghost = "{$host}:{$port}";
- }
-
- // Add sslmode to $pghost as needed
- if (('disable' === $sslmode) || ('allow' === $sslmode) || ('prefer' === $sslmode) || ('require' === $sslmode)) {
- $pghost .= ':' . $sslmode;
- } elseif ('legacy' === $sslmode) {
- $pghost .= ' requiressl=1';
- }
-
- /*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->conn->connect($pghost, $user, $password, $database);
- //$this->prtrace($this->conn);
- } catch (\Exception $e) {
- $this->prtrace($e->getMessage(), $e->getTrace());
- }
+ //$this->prtrace($this->conn);
}
- public function getConnectionResult()
+ public function getVersion(): string
{
- return $this->_connection_result;
+ return $this->pgVersion;
}
/**
@@ -120,38 +102,15 @@ class Connection
*/
public function getDriver(&$description)
{
- $v = \pg_version($this->conn->_connectionID);
-
- //\PhpConsole\Handler::getInstance()->debug($v, 'pg_version');
-
- if (isset($v['server'])) {
- $version = $v['server'];
- }
-
- // If we didn't manage to get the version without a query, query...
- if (!isset($version)) {
- $adodb = new ADOdbBase($this->conn, $this->container, $this->server_info);
-
- $sql = 'SELECT VERSION() AS version';
- $field = $adodb->selectField($sql, 'version');
-
- // Check the platform, if it's mingw, set it
- if (\preg_match('/ mingw /i', $field)) {
- $this->platform = 'MINGW';
- }
-
- $params = \explode(' ', $field);
-
- if (!isset($params[1])) {
- return -3;
- }
-
- $version = $params[1]; // eg. 8.4.4
+ if (!$this->conn->IsConnected()) {
+ return null;
}
+ $serverInfo = $this->conn->ServerInfo();
+ $this->dump($serverInfo);
+ $this->pgVersion = $serverInfo['version'];
+ $description = "PostgreSQL {$this->pgVersion}";
- $description = "PostgreSQL {$version}";
-
- $version_parts = \explode('.', $version);
+ $version_parts = \explode('.', $this->pgVersion);
if ((int) (10 <= $version_parts[0])) {
$major_version = $version_parts[0];
@@ -159,21 +118,22 @@ class Connection
$major_version = \implode('.', [$version_parts[0], $version_parts[1]]);
}
+ // if major version is less than 9 return null, we don't support it
+ if (9 > (float) $major_version) {
+ $this->driver = null;
+
+ return null;
+ }
+
+ $this->driver = 'Postgres';
//$this->prtrace(['pg_version' => pg_version($this->conn->_connectionID), 'version' => $version, 'major_version' => $major_version]);
// Detect version and choose appropriate database driver
if (\array_key_exists($major_version, $this->version_dictionary)) {
- return $this->version_dictionary[$major_version];
- }
-
- /* All <7.4 versions are not supported */
- // if major version is 7 or less and wasn't cought in the
- // switch/case block, we have an unsupported version.
- if (8 > (int) \mb_substr($version, 0, 1)) {
- return null;
+ $this->driver = $this->version_dictionary[$major_version];
}
// If unknown version, then default to latest driver
- return 'Postgres';
+ return $this->driver;
}
/**
@@ -183,6 +143,59 @@ class Connection
*/
public function getLastError()
{
- return \pg_last_error($this->conn->_connectionID);
+ return $this->conn->ErrorMsg();
+ }
+
+ private function getPG9Connection(
+ string $host,
+ int $port,
+ string $sslmode,
+ ?string $database,
+ ?string $user,
+ ?string $password,
+ int $fetchMode = \ADODB_FETCH_ASSOC
+ ): \ADODB_postgres9 {
+ $this->conn = ADONewConnection('postgres9');
+ $this->conn->setFetchMode($fetchMode);
+ // Ignore host if null
+ if (null === $host || '' === $host) {
+ if (null !== $port && '' !== $port) {
+ $pghost = ':' . $port;
+ } else {
+ $pghost = '';
+ }
+ } else {
+ $pghost = "{$host}:{$port}";
+ }
+
+ // Add sslmode to $pghost as needed
+ if (('disable' === $sslmode) || ('allow' === $sslmode) || ('prefer' === $sslmode) || ('require' === $sslmode)) {
+ $pghost .= ':' . $sslmode;
+ } elseif ('legacy' === $sslmode) {
+ $pghost .= ' requiressl=1';
+ }
+ \ob_start();
+ $this->_connection_result = $this->conn->connect($pghost, $user, $password, $database);
+
+ $this->_captured_error = \ob_get_clean();
+
+ return $this->conn;
+ }
+
+ private function getPDOConnection(
+ string $host,
+ int $port,
+ string $sslmode,
+ ?string $database,
+ ?string $user,
+ ?string $password,
+ int $fetchMode = \ADODB_FETCH_ASSOC
+ ): \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 36e4b2a6..dffc30e0 100644
--- a/src/classes/ContainerUtils.php
+++ b/src/classes/ContainerUtils.php
@@ -7,238 +7,143 @@
namespace PHPPgAdmin;
use Psr\Container\ContainerInterface;
-use Slim\App;
-
-\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 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 ContainerInterface
+ * @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,
- ];
-
- $this->_app = new App($config);
+ parent::__construct($values);
- // Fetch DI Container
- $container = $this->_app->getContainer();
- $container['utils'] = $this;
- $container['version'] = 'v' . $appVersion;
- $container['errors'] = [];
- $container['requestobj'] = $container['request'];
- $container['responseobj'] = $container['response'];
+ $userSettings = $values['settings'] ?? [];
+ $this->registerDefaultServices($userSettings);
- $this->container = $container;
+ self::$instance = $this;
}
/**
- * Gets the container instance.
+ * Gets the subfolder.
*
- * @throws \Exception (description)
+ * @param string $path The path
*
- * @return ContainerInterface 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.
- *
- * @return self the instance
- */
- public static function getInstance()
+ public static function getAppInstance(array $config = []): \Slim\App
{
- if (!self::$_instance) {
- self::$_instance = new self();
- }
+ $config = \array_merge(self::getDefaultConfig($config['debugmode'] ?? false), $config);
- return self::$_instance;
- }
+ $container = self::getContainerInstance($config);
- /**
- * Creates a container.
- *
- * @param array $conf The conf
- *
- * @return [ContainerInterface,App] ( description_of_the_return_value )
- */
- public static function createContainer($conf)
- {
- $_instance = self::getInstance();
-
- $_instance
- ->setConf($conf)
- ->setExtra()
- ->setMisc()
- ->setViews();
+ if (!self::$appInstance) {
+ self::$appInstance = new \Slim\App($container);
+ }
- //ddd($container->subfolder);
- return [$_instance->container, self::$_instance->_app];
+ return self::$appInstance;
}
- public function maybeRenderIframes($response, $subject, $query_string)
+ public static function getContainerInstance(array $config = []): self
{
- $c = self::getContainerInstance();
-
- $in_test = $c->view->offsetGet('in_test');
-
- if ('1' === $in_test) {
- $className = '\PHPPgAdmin\Controller\\' . \ucfirst($subject) . 'Controller';
- $controller = new $className($c);
+ 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' => [],
+ ];
- return $controller->render();
- }
+ self::$envConfig = \array_merge(self::$envConfig, $config);
- $viewVars = [
- 'url' => '/src/views/' . $subject . ($query_string ? '?' . $query_string : ''),
- 'headertemplate' => 'header.twig',
- ];
+ if (!self::$instance) {
+ self::$instance = new static(self::$envConfig);
- return $c->view->render($response, 'iframe_view.twig', $viewVars);
- }
+ self::$instance
+ ->withConf(self::$envConfig);
- /**
- * Gets the theme from
- * 1. The $_REQUEST global (when it's chosen from start screen)
- * 2. Server specific config theme 3.- $_SESSION global (subsequent requests after 1.) 4.- $_COOKIE global (mostly
- * fallback for $_SESSION after 1.- and 3.-) 5.- theme as set in config 6.- 'default' theme.
- *
- * @param array $conf The conf
- * @param null|mixed $_server_info
- *
- * @return string the theme
- */
- public function getTheme(array $conf, $_server_info = null)
- {
- $_theme = null;
- // 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)) {
- $_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)) {
- $_theme = $_server_info['theme'];
- } elseif (\array_key_exists('ppaTheme', $_SESSION) &&
- \array_key_exists($_SESSION['ppaTheme'], $themefolders)) {
- // otherwise check $_SESSION
- $_theme = $_SESSION['ppaTheme'];
- } elseif (\array_key_exists('ppaTheme', $_SESSION) &&
- \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)) {
- $_theme = $conf['theme'];
- } else {
- // okay then, use default theme
- $_theme = 'default';
+ $handlers = new ContainerHandlers(self::$instance);
+ $handlers->setExtra()
+ ->setMisc()
+ ->setViews()
+ ->storeMainRequestParams()
+ ->setHaltHandler();
}
-
- return $_theme;
+ //ddd($container->subfolder);
+ return self::$instance;
}
/**
@@ -248,14 +153,15 @@ class ContainerUtils
*/
public function getRedirectUrl()
{
- $query_string = $this->container->requestobj->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 === $this->container->requestobj->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;
@@ -273,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);
}
}
@@ -289,33 +196,37 @@ 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 = $container->misc->getLastTabURL($subject) ?? ['url' => 'alldb', 'urlvars' => ['subject' => 'server']];
+ $destinationurl = $this->getRedirectUrl();
+
if (!isset($_server_info['username'])) {
- $destinationurl = $this->getRedirectUrl();
- } else {
- $url = $this->container->misc->getLastTabURL($subject);
- $this->addFlash($url, 'getLastTabURL for ' . $subject);
- // Load query vars into superglobal arrays
- if (isset($url['urlvars'])) {
- $urlvars = [];
-
- foreach ($url['urlvars'] as $key => $urlvar) {
- //$this->prtrace($key, $urlvar);
- $urlvars[$key] = \PHPPgAdmin\Decorators\Decorator::get_sanitized_value($urlvar, $_REQUEST);
- }
- $_REQUEST = \array_merge($_REQUEST, $urlvars);
- $_GET = \array_merge($_GET, $urlvars);
- }
+ return $destinationurl;
+ }
- $actionurl = \PHPPgAdmin\Decorators\Decorator::actionurl($url['url'], $_GET);
- $destinationurl = $actionurl->value($_GET);
+ if (!\is_array($url)) {
+ return $this->getRedirectUrl($subject);
}
- $destinationurl = \str_replace('views/?', "views/{$subject}?", $destinationurl);
- // $this->prtrace('destinationurl for ' . $subject, $destinationurl);
- return $destinationurl;
+ $this->addFlash($url, 'getLastTabURL for ' . $subject);
+ // Load query vars into superglobal arrays
+ if (isset($url['urlvars'])) {
+ $urlvars = [];
+
+ foreach ($url['urlvars'] as $key => $urlvar) {
+ //$this->prtrace($key, $urlvar);
+ $urlvars[$key] = \PHPPgAdmin\Decorators\Decorator::get_sanitized_value($urlvar, $_REQUEST);
+ }
+ $_REQUEST = \array_merge($_REQUEST, $urlvars);
+ $_GET = \array_merge($_GET, $urlvars);
+ }
+ $actionurl = \PHPPgAdmin\Decorators\Decorator::actionurl($url['url'], $_GET);
+ $destinationurl = $actionurl->value($_GET);
+
+ return \str_replace('views/?', "views/{$subject}?", $destinationurl);
}
/**
@@ -323,24 +234,60 @@ class ContainerUtils
*
* @param string $errormsg The error msg
*
- * @return ContainerInterface The app container
+ * @return\Slim\Container The app container
*/
- public function addError(string $errormsg): ContainerInterface
+ 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;
+ }
- return $this->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);
}
- private function setConf($conf)
+ 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',
+ ],
+ ];
+ }
+
+ /**
+ * @param array $conf
+ */
+ private function withConf($conf): self
{
$container = self::getContainerInstance();
$conf['plugins'] = [];
- $container['conf'] = static function ($c) use ($conf) {
+ $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'];
if (\is_array($display_sizes)) {
@@ -371,115 +318,34 @@ class ContainerUtils
return $conf;
};
- $container->subfolder = self::SUBFOLDER;
+
+ $container->subFolder = $conf['subfolder'];
return $this;
}
/**
- * Sets the views.
+ * This function registers the default services that Slim needs to work.
*
- * @return self ( description_of_the_return_value )
+ * All services are shared, they are registered such that the
+ * same instance is returned on subsequent calls.
+ *
+ * @param array $userSettings Associative array of application settings
*/
- private function setViews()
+ private function registerDefaultServices($userSettings): void
{
- $container = self::getContainerInstance();
+ $defaultSettings = $this->defaultSettings;
/**
- * return ViewManager.
+ * This service MUST return an array or an instance of ArrayAccess.
+ *
+ * @return array|ArrayAccess
*/
- $container['view'] = static function ($c) {
- $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 )
- */
- private function setMisc()
- {
- $container = self::getContainerInstance();
- $container['misc'] = static function ($c) {
- $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;
+ $this['settings'] = static function () use ($userSettings, $defaultSettings): \Slim\Collection {
+ return new Collection(\array_merge($defaultSettings, $userSettings));
};
- return $this;
- }
-
- private function setExtra()
- {
- $container = self::getContainerInstance();
- $container['flash'] = static function () {
- return new \Slim\Flash\Messages();
- };
-
- $container['lang'] = static function ($c) {
- $translations = new \PHPPgAdmin\Translations($c);
-
- return $translations->lang;
- };
-
- return $this;
- }
-
- /**
- * Traverse THEME_PATH, consider as theme folders those which
- * contain a `global.css` stylesheet.
- *
- * @return array the theme folders
- */
- private function getThemeFolders()
- {
- // no THEME_PATH (how?) then return empty array
- if (!$gestor = \opendir(self::THEME_PATH)) {
- \closedir($gestor);
-
- return [];
- }
- $themefolders = [];
-
- /* This is the right way to iterate on a folder */
- while (false !== ($foldername = \readdir($gestor))) {
- if ('.' === $foldername || '..' === $foldername) {
- continue;
- }
-
- $folderpath = \sprintf('%s%s%s', self::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)) {
- $themefolders[$foldername] = $folderpath;
- }
- }
-
- \closedir($gestor);
-
- return $themefolders;
+ $defaultProvider = new DefaultServicesProvider();
+ $defaultProvider->register($this);
}
}
diff --git a/src/classes/Misc.php b/src/classes/Misc.php
index ad4302aa..841a0ace 100644
--- a/src/classes/Misc.php
+++ b/src/classes/Misc.php
@@ -26,63 +26,96 @@ class Misc
use \PHPPgAdmin\Traits\MiscTrait;
/**
- * @var string
+ * @var array
*/
- const BASE_PATH = ContainerUtils::BASE_PATH;
+ public $appLangFiles = [];
+
/**
* @var string
*/
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
+ public $appName = '';
+
/**
* @var string
*/
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
-
- public $appLangFiles = [];
-
- public $appName = '';
-
public $appVersion = '';
public $form = '';
+ /**
+ * @var string
+ */
public $href = '';
+ /**
+ * @var array
+ */
public $lang = [];
+ /**
+ * @var array
+ */
public $conf;
+ /**
+ * @var string
+ */
public $phpMinVer;
+ /**
+ * @var string
+ */
public $postgresqlMinVer;
+ /**
+ * @var \PHPPgAdmin\ViewManager
+ */
public $view;
+ /**
+ * @var \PHPPgAdmin\ContainerUtils
+ */
protected $container;
+ /**
+ * @var null|\PHPPgAdmin\Connection
+ */
private $_connection;
+ /**
+ * @var bool
+ */
private $_no_db_connection = false;
- private $_reload_browser = false;
-
/**
- * @var Postgres
+ * @var null|Postgres
*/
private $_data;
+ /**
+ * @var null|string
+ */
private $_database;
+ /**
+ * @var null|string
+ */
private $_server_id;
+ /**
+ * @var null|array
+ */
private $_server_info;
+ /**
+ * @var string
+ */
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;
@@ -102,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);
@@ -154,9 +187,12 @@ class Misc
return $this;
}
+ /**
+ * @return null|string
+ */
public function serverToSha()
{
- $request_server = $this->container->requestobj->getParam('server');
+ $request_server = $this->container->request->getParam('server');
if (null === $request_server) {
return null;
@@ -170,6 +206,9 @@ class Misc
return $request_server;
}
+ /**
+ * @return string
+ */
public function getServerId()
{
if ($this->_server_id) {
@@ -193,36 +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;
- }
-
- public function getReloadBrowser()
- {
- return $this->_reload_browser;
- }
-
public function getContainer()
{
return $this->container;
@@ -284,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;
@@ -296,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;
}
@@ -312,7 +332,7 @@ class Misc
}
if (!$_connection) {
- $this->container->utils->addError($lang['strloginfailed']);
+ $this->container->addError($lang['strloginfailed']);
$this->setErrorMsg($lang['strloginfailed']);
return null;
@@ -322,17 +342,20 @@ 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->conn->pgVersion, $this->_server_id);
+ $this->setServerInfo('pgVersion', $_connection->getVersion(), $this->_server_id);
// Create a database wrapper class for easy manipulation of the
// connection.
@@ -350,24 +373,32 @@ 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;
}
- public function getConnection(string $database = '', $server_id = null)
+ /**
+ * Undocumented function.
+ *
+ * @param string $database
+ * @param string $server_id
+ *
+ * @return null|\PHPPgAdmin\Connection
+ */
+ public function getConnection(string $database = '', $server_id = null): ?\PHPPgAdmin\Connection
{
$lang = $this->lang;
@@ -408,7 +439,7 @@ class Misc
try {
// Create the connection object and make the connection
- $this->_connection = new \PHPPgAdmin\Database\Connection(
+ $this->_connection = new \PHPPgAdmin\Connection(
$server_info,
$database_to_use,
$this->container
@@ -457,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;
@@ -472,7 +503,7 @@ class Misc
return $this->_server_info;
}
-// //$this->prtrace('Invalid server param');
+ // //$this->prtrace('Invalid server param');
$this->_server_info = null;
// Unable to find a matching server, are we being hacked?
$this->halt($this->lang['strinvalidserverparam']);
@@ -491,7 +522,7 @@ class Misc
public function setServerInfo($key, $value, $server_id = null): void
{
if (null === $server_id) {
- $server_id = $this->container->requestobj->getParam('server');
+ $server_id = $this->container->request->getParam('server');
}
if (null === $key) {
diff --git a/src/classes/Translations.php b/src/classes/Translations.php
index 31f85441..e8322939 100644
--- a/src/classes/Translations.php
+++ b/src/classes/Translations.php
@@ -11,10 +11,16 @@ namespace PHPPgAdmin;
*/
class Translations
{
+ /**
+ * @var array
+ */
public $lang;
// List of language files, and encoded language name.
+ /**
+ * @var array
+ */
public $appLangFiles = [
'afrikaans' => 'Afrikaans',
'arabic' => '&#1593;&#1585;&#1576;&#1610;',
@@ -50,6 +56,9 @@ class Translations
'ukrainian' => '&#1059;&#1082;&#1088;&#1072;&#9558;&#1085;&#1089;&#1100;&#1082;&#1072;',
];
+ /**
+ * @var array
+ */
public $appClasses = [
'afrikaans' => 'Afrikaans',
'arabic' => 'Arabic',
@@ -91,7 +100,8 @@ class Translations
* If it's available 'language-country', but not general
* 'language' translation (eg. 'portuguese-br', but not 'portuguese')
* specify both 'la' => 'language-country' and 'la-co' => 'language-country'.
- */
+ *
+ * @var array */
public $availableLanguages = [
'af' => 'afrikaans',
'ar' => 'arabic',
@@ -126,6 +136,9 @@ class Translations
'uk' => 'ukrainian',
];
+ /**
+ * @var array
+ */
public $languages_iso_code = [
'afrikaans' => 'af',
'arabic' => 'ar',
diff --git a/src/classes/ViewManager.php b/src/classes/ViewManager.php
index 785096a3..1e79f53d 100644
--- a/src/classes/ViewManager.php
+++ b/src/classes/ViewManager.php
@@ -23,75 +23,110 @@ class ViewManager extends \Slim\Views\Twig
use \PHPPgAdmin\Traits\HelperTrait;
/**
- * @var string
+ * @var array
*/
- const BASE_PATH = ContainerUtils::BASE_PATH;
+ public $appLangFiles = [];
/**
* @var string
*/
- const THEME_PATH = ContainerUtils::THEME_PATH;
+ public $appName = '';
+
/**
* @var string
*/
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
+ public $appVersion = '';
+
/**
* @var string
*/
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
-
- public $appLangFiles = [];
-
- public $appName = '';
-
- public $appVersion = '';
-
public $form = '';
+ /**
+ * @var string
+ */
public $href = '';
+ /**
+ * @var array
+ */
public $lang = [];
+ /**
+ * @var array
+ */
public $conf;
+ /**
+ * @var string
+ * @psalm-suppress PropertyNotSetInConstructor
+ */
public $phpMinVer;
+ /**
+ * @var string
+ * @psalm-suppress PropertyNotSetInConstructor
+ */
public $postgresqlMinVer;
- public $view;
-
/**
* @var \PHPPgAdmin\Misc
*/
public $misc;
+ /**
+ * @var \PHPPgAdmin\ContainerUtils
+ */
protected $container;
+ /**
+ * Undocumented variable.
+ *
+ * @var array
+ */
+ private static $themeFolders = [];
+
private $_connection;
+ /**
+ * @var bool
+ */
private $_no_db_connection = false;
+ /**
+ * @var bool
+ */
private $_reload_browser = false;
private $_data;
private $_database;
+ /**
+ * @var string
+ */
private $_server_id;
private $_server_info;
+ /**
+ * @var string
+ */
private $_error_msg = '';
- private static $instance = null;
+ /**
+ * Undocumented variable.
+ *
+ * @var self
+ */
+ 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');
@@ -106,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'));
@@ -118,22 +153,53 @@ class ViewManager extends \Slim\Views\Twig
$_theme = $this->getTheme($this->conf, $this->misc->getServerInfo());
- if (null !== $_theme && isset($_SESSION)) {
+ // 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($response, $subject, $query_string)
+ /**
+ * 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();
$in_test = $this->offsetGet('in_test');
if ('1' === $in_test) {
- $className = '\PHPPgAdmin\Controller\\' . \ucfirst($subject) . 'Controller';
+ $className = self::getControllerClassName($subject);
$controller = new $className($c);
return $controller->render();
@@ -160,36 +226,39 @@ class ViewManager extends \Slim\Views\Twig
*/
public function getTheme(array $conf, $_server_info = null)
{
- $_theme = null;
+ $_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'];
- } else {
- // okay then, use default theme
- $_theme = 'default';
}
return $_theme;
@@ -198,7 +267,7 @@ class ViewManager extends \Slim\Views\Twig
/**
* Sets the form tracking variable.
*/
- public function setForm()
+ public function setForm(): string
{
$form = [];
@@ -236,6 +305,8 @@ class ViewManager extends \Slim\Views\Twig
* @param string $str the string that the context help is related to (already escaped)
* @param string $help help section identifier
* @param bool $do_print true to echo, false to return
+ *
+ * @return string|void
*/
public function printHelp($str, $help = null, $do_print = true)
{
@@ -262,51 +333,108 @@ 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())
);
}
- public function icon($icon)
+ /**
+ * @param string $icon
+ *
+ * @return string
+ */
+ public function icon($icon = ''): string
{
- if (!\is_string($icon)) {
- return '';
- }
+ $icon = (string) ($icon ?? '');
$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 getContainer()
+ 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.
+ *
+ * @param string $subject
+ * @psalm-suppress LessSpecificReturnStatement
+ * @psalm-suppress MoreSpecificReturnType
+ *
+ * @return class-string
+ */
+ private static function getControllerClassName(string $subject): string
+ {
+ return '\PHPPgAdmin\Controller\\' . \ucfirst($subject) . 'Controller';
+ }
+
+ private function getContainer(): \PHPPgAdmin\ContainerUtils
{
return $this->container;
}
@@ -317,10 +445,13 @@ class ViewManager extends \Slim\Views\Twig
*
* @return array the theme folders
*/
- private function getThemeFolders()
+ 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 [];
@@ -333,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 cc89bf1a..c8be5ca6 100644
--- a/src/controllers/AggregatesController.php
+++ b/src/controllers/AggregatesController.php
@@ -34,7 +34,7 @@ class AggregatesController extends BaseController
break;
case 'save_create':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doSaveCreate();
@@ -46,7 +46,7 @@ class AggregatesController extends BaseController
break;
case 'save_alter':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doSaveAlter();
} else {
$this->doProperties();
@@ -54,7 +54,7 @@ class AggregatesController extends BaseController
break;
case 'drop':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDrop(false);
} else {
$this->doDefault();
@@ -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=\"",
@@ -305,9 +305,9 @@ class AggregatesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
@@ -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()) {
@@ -378,14 +378,14 @@ class AggregatesController extends BaseController
\htmlspecialchars($aggrdata->fields['aggrcomment']), "</textarea></td>\n\t</tr>" . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_alter" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="aggrname" value="', \htmlspecialchars($_REQUEST['aggrname']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="aggrtype" value="', \htmlspecialchars($_REQUEST['aggrtype']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="aggrowner" value="', \htmlspecialchars($aggrdata->fields['usename']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="aggrschema" value="', \htmlspecialchars($_REQUEST['schema']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="aggrcomment" value="', \htmlspecialchars($aggrdata->fields['aggrcomment']), '" />' . \PHP_EOL;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strback']}\" /></p>" . \PHP_EOL;
@@ -408,20 +408,20 @@ 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;
echo '<input type="hidden" name="aggrtype" value="', \htmlspecialchars($_REQUEST['aggrtype']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
$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 5aae9e69..f4fa9d3b 100644
--- a/src/controllers/AlldbController.php
+++ b/src/controllers/AlldbController.php
@@ -38,7 +38,7 @@ class AlldbController extends BaseController
break;
case 'save_create':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doSaveCreate();
@@ -103,16 +103,16 @@ class AlldbController extends BaseController
$databases = $data->getDatabases();
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$href = $this->misc->getHREF();
- $redirecturl = $this->container->utils->getDestinationWithLastTab('database');
+ $redirecturl = $this->container->getDestinationWithLastTab('database');
$columns = [
'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">';
@@ -303,7 +303,7 @@ class AlldbController extends BaseController
}
echo '</table>' . \PHP_EOL;
echo '<input type="hidden" name="action" value="alter" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="oldname" value="',
\htmlspecialchars($_REQUEST['alterdatabase']), '" />' . \PHP_EOL;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
@@ -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) {
@@ -355,7 +355,8 @@ class AlldbController extends BaseController
}
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
- echo $this->misc->form;
+
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
echo "</form>\n"; // END confirm
@@ -368,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;
}
@@ -426,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=\"",
@@ -495,7 +505,7 @@ class AlldbController extends BaseController
('' === $_POST['formSpc']) ? ' selected="selected"' : '', '></option>' . \PHP_EOL;
// Display all other tablespaces
while (!$tablespaces->EOF) {
- $spcname = \htmlspecialchars($tablespaces->fields['spcname']);
+ $spcname = \htmlspecialchars($tablespaces->fields['spcname'] ?? '');
echo "\t\t\t\t<option value=\"{$spcname}\"",
($spcname === $_POST['formSpc']) ? ' selected="selected"' : '', ">{$spcname}</option>" . \PHP_EOL;
$tablespaces->moveNext();
@@ -512,9 +522,9 @@ class AlldbController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
@@ -552,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 8a03ea5a..4db575d8 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 = [];
@@ -63,19 +49,26 @@ class BaseController
public $msg = '';
+ /**
+ * @var \PHPPgAdmin\ViewManager
+ */
public $view;
+ /**
+ * @var \PHPPgAdmin\Misc
+ */
public $misc;
public $conf;
public $phpMinVer;
- protected $script;
-
+ /**
+ * @var \PHPPgAdmin\ContainerUtils
+ */
protected $container;
- protected $app;
+ protected $script;
protected $data;
@@ -85,26 +78,31 @@ class BaseController
/**
* @var XHtml\HTMLTableController
+ * @psalm-suppress PropertyNotSetInConstructor
*/
protected $_table_controller;
/**
* @var XHtml\HTMLFooterController
+ * @psalm-suppress PropertyNotSetInConstructor
*/
protected $_footer_controller;
/**
* @var XHtml\HTMLHeaderController
+ * @psalm-suppress PropertyNotSetInConstructor
*/
protected $_header_controller;
/**
* @var XHtml\HTMLNavbarController
+ * @psalm-suppress PropertyNotSetInConstructor
*/
protected $_trail_controller;
/**
* @var TreeController
+ * @psalm-suppress PropertyNotSetInConstructor
*/
protected $_tree_controller;
@@ -115,10 +113,10 @@ class BaseController
/**
* Constructs the base controller (common for almost all controllers).
*
- * @param \Slim\Container $container the $app container
- * @param bool $no_db_connection [optional] if true, sets $this->misc->setNoDBConnection(true);
+ * @param \PHPPgAdmin\ContainerUtils $container the $app container
+ * @param bool $no_db_connection [optional] if true, sets $this->misc->setNoDBConnection(true);
*/
- public function __construct(\Slim\Container $container)
+ public function __construct(\PHPPgAdmin\ContainerUtils $container)
{
$this->container = $container;
$this->lang = $container->get('lang');
@@ -153,16 +151,17 @@ class BaseController
if (null === $this->misc->getServerId()) {
$servers_controller = new \PHPPgAdmin\Controller\ServersController($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($container);
+ $servers_controller = new \PHPPgAdmin\Controller\ServersController($container);
- return $servers_controller->render();
+ $servers_controller->render();
+ }
}
}
}
@@ -245,7 +244,7 @@ class BaseController
*
* @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)
{
@@ -257,10 +256,10 @@ class BaseController
/**
* 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
*/
@@ -429,26 +428,45 @@ class BaseController
}
/**
- * @param null|string $default
* @param string $key
+ * @param null|string $default
*/
public function getRequestParam(string $key, ?string $default = null)
{
- return $this->container->requestobj->getParam($key, $default);
+ return \requestInstance()->getParam($key, $default);
}
/**
- * @param null|array|string $default
- * @param string $key
+ * @param string $key
+ * @param null|array|bool|float|int|string $default
+ *
+ * @return bool| null|array|string|int|float
*/
public function getPostParam(string $key, $default = null)
{
- return $this->container->requestobj->getParsedBodyParam($key, $default);
+ return \requestInstance()->getParsedBodyParam($key, $default);
}
- public function getQueryParam($key, $default = null)
+ /**
+ * @param string $key
+ * @param null|array|float|int|string $default
+ *
+ * @return null|array|float|int|string
+ */
+ public function getQueryStrinParam($key, $default = null)
+ {
+ return \requestInstance()->getQueryParam($key, $default);
+ }
+
+ /**
+ * @return array
+ */
+ public function getAllParams(): array
{
- return $this->container->requestobj->getQueryParam($key, $default);
+ return \array_merge(
+ \requestInstance()->getQueryParams() ?? [],
+ \requestInstance()->getParsedBody() ?? []
+ );
}
/**
@@ -462,7 +480,7 @@ class BaseController
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 e7bb059a..915e10d6 100644
--- a/src/controllers/ColpropertiesController.php
+++ b/src/controllers/ColpropertiesController.php
@@ -42,7 +42,7 @@ class ColpropertiesController extends BaseController
} else {
switch ($this->action) {
case 'properties':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doAlter();
@@ -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);
@@ -336,8 +336,8 @@ class ColpropertiesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="properties" />' . \PHP_EOL;
echo '<input type="hidden" name="stage" value="2" />' . \PHP_EOL;
- echo $this->misc->form;
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
+ echo $this->view->form;
+ 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;
echo '<input type="hidden" name="olddefault" value="', \htmlspecialchars($_REQUEST['olddefault']), '" />' . \PHP_EOL;
@@ -353,7 +353,7 @@ class ColpropertiesController extends BaseController
echo '<input type="hidden" name="array" value="', \htmlspecialchars($_REQUEST['array']), '" />' . \PHP_EOL;
}
echo "<input type=\"submit\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
echo '<script type="text/javascript">predefined_lengths = new Array(' . \implode(',', $escaped_predef_types) . ");checkLengths(document.getElementById('type').value,'');</script>" . \PHP_EOL;
@@ -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 0f61acf9..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
@@ -214,7 +214,7 @@ class DatabaseController extends BaseController
echo '</select>' . \PHP_EOL;
echo "<input type=\"submit\" value=\"{$this->lang['strfind']}\" />" . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="action" value="find" /></p>' . \PHP_EOL;
echo '<input type="hidden" name="confirm" value="true" /></p>' . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -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;
@@ -564,7 +564,7 @@ class DatabaseController extends BaseController
echo '<p><input type="checkbox" id="paginate" name="paginate"', (isset($_REQUEST['paginate']) ? ' checked="checked"' : ''), " /><label for=\"paginate\">{$this->lang['strpaginate']}</label></p>" . \PHP_EOL;
echo "<p><input type=\"submit\" name=\"execute\" accesskey=\"r\" value=\"{$this->lang['strexecute']}\" />" . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"reset\" accesskey=\"q\" value=\"{$this->lang['strreset']}\" /></p>" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -642,8 +642,8 @@ class DatabaseController extends BaseController
switch ($curr) {
case 'SCHEMA':
- $destination = $this->container->utils->getDestinationWithLastTab('schema');
- echo '<li><a href="' . self::SUBFOLDER . "{$destination}";
+ $destination = $this->container->getDestinationWithLastTab('schema');
+ 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;
@@ -652,16 +652,16 @@ class DatabaseController extends BaseController
case 'TABLE':
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->utils->getDestinationWithLastTab('table');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;table=',
+ $destination = $this->container->getDestinationWithLastTab('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;
case 'VIEW':
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->utils->getDestinationWithLastTab('view');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '&amp;view=',
+ $destination = $this->container->getDestinationWithLastTab('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;
@@ -674,8 +674,8 @@ class DatabaseController extends BaseController
break;
case 'COLUMNTABLE':
echo '<li>';
- $destination = $this->container->utils->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ $destination = $this->container->getDestinationWithLastTab('schema');
+ 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']), '">',
@@ -684,8 +684,8 @@ class DatabaseController extends BaseController
break;
case 'COLUMNVIEW':
echo '<li>';
- $destination = $this->container->utils->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ $destination = $this->container->getDestinationWithLastTab('schema');
+ 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']), '">',
@@ -694,19 +694,19 @@ class DatabaseController extends BaseController
break;
case 'INDEX':
echo '<li>';
- $destination = $this->container->utils->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
- $destination = $this->container->utils->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>.';
+ $destination = $this->container->getDestinationWithLastTab('schema');
+ 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="' . \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->utils->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
- $destination = $this->container->utils->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>.';
+ $destination = $this->container->getDestinationWithLastTab('schema');
+ 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="' . \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;
@@ -720,30 +720,30 @@ class DatabaseController extends BaseController
break;
case 'TRIGGER':
echo '<li>';
- $destination = $this->container->utils->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
- $destination = $this->container->utils->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>.';
+ $destination = $this->container->getDestinationWithLastTab('schema');
+ 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="' . \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;
break;
case 'RULETABLE':
echo '<li>';
- $destination = $this->container->utils->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
- $destination = $this->container->utils->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>.';
+ $destination = $this->container->getDestinationWithLastTab('schema');
+ 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="' . \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;
break;
case 'RULEVIEW':
echo '<li>';
- $destination = $this->container->utils->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
- $destination = $this->container->utils->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>.';
+ $destination = $this->container->getDestinationWithLastTab('schema');
+ 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="' . \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;
@@ -797,8 +797,8 @@ class DatabaseController extends BaseController
break;
case 'OPCLASS':
echo '<li>';
- $destination = $this->container->utils->getDestinationWithLastTab('schema');
- echo '<a href="' . self::SUBFOLDER . "{$destination}?{$this->misc->href}&schema=", \urlencode($rs->fields['schemaname']), '">', $this->misc->printVal($rs->fields['schemaname']), '</a>.';
+ $destination = $this->container->getDestinationWithLastTab('schema');
+ 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 93f40eaf..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
@@ -133,7 +133,7 @@ class DataexportController extends BaseController
if (isset($_REQUEST['table'])) {
echo '<input type="hidden" name="subject" value="table" />' . \PHP_EOL;
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
+ echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
} else {
echo '<input type="hidden" name="subject" value="table" />' . \PHP_EOL;
}
@@ -144,7 +144,7 @@ class DataexportController extends BaseController
if (isset($_REQUEST['search_path'])) {
echo '<input type="hidden" name="search_path" value="', \htmlspecialchars($_REQUEST['search_path']), '" />' . \PHP_EOL;
}
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strexport']}\" /></p>" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -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 d8b6ec6f..11e75cfb 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
);
@@ -227,7 +229,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']);
@@ -240,7 +242,7 @@ class DisplayController extends BaseController
//die(htmlspecialchars($query));
echo '<form method="post" id="sqlform" action="' . $_SERVER['REQUEST_URI'] . '">';
- echo $this->misc->form;
+ echo $this->view->form;
if ($object) {
echo '<input type="hidden" name="' . $subject . '" value="', \htmlspecialchars($object), '" />' . \PHP_EOL;
@@ -471,7 +473,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);
@@ -622,7 +624,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;
@@ -711,16 +713,21 @@ class DisplayController extends BaseController
}
echo '<input type="hidden" name="action" value="editrow" />' . \PHP_EOL;
- echo $this->misc->form;
+ // 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;
@@ -746,7 +753,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>';
}
/**
@@ -797,8 +804,8 @@ class DisplayController extends BaseController
$resultset = $data->browseRow($_REQUEST['table'], $_REQUEST['key']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/display" method="post">' . \PHP_EOL;
- echo $this->misc->form;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/display" method="post">' . \PHP_EOL;
+ echo $this->view->form;
if (1 === $resultset->recordCount()) {
echo "<p>{$this->lang['strconfdeleterow']}</p>" . \PHP_EOL;
@@ -825,7 +832,7 @@ class DisplayController extends BaseController
}
if (isset($_REQUEST['table'])) {
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
+ echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
}
if (isset($_REQUEST['subject'])) {
@@ -968,9 +975,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 0dc7e8f2..4be8c1cf 100644
--- a/src/controllers/DomainsController.php
+++ b/src/controllers/DomainsController.php
@@ -33,7 +33,7 @@ class DomainsController extends BaseController
break;
case 'save_add_check':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doProperties();
} else {
$this->addCheck(false);
@@ -41,7 +41,7 @@ class DomainsController extends BaseController
break;
case 'drop_con':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDropConstraint(false);
} else {
$this->doProperties();
@@ -53,7 +53,7 @@ class DomainsController extends BaseController
break;
case 'save_create':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doSaveCreate();
@@ -65,7 +65,7 @@ class DomainsController extends BaseController
break;
case 'drop':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDrop(false);
} else {
$this->doDefault();
@@ -77,7 +77,7 @@ class DomainsController extends BaseController
break;
case 'save_alter':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doSaveAlter();
} else {
$this->doProperties();
@@ -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;
@@ -308,9 +308,9 @@ class DomainsController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_alter" />' . \PHP_EOL;
echo '<input type="hidden" name="domain" value="', \htmlspecialchars($_REQUEST['domain']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \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;
@@ -350,9 +350,9 @@ class DomainsController extends BaseController
echo '<p><input type="hidden" name="action" value="save_add_check" />' . \PHP_EOL;
echo '<input type="hidden" name="domain" value="', \htmlspecialchars($_REQUEST['domain']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"add\" value=\"{$this->lang['stradd']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
if ('' === \trim($_POST['definition'])) {
@@ -393,11 +393,11 @@ 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;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
@@ -560,13 +560,13 @@ 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;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
$status = $data->dropDomain($_POST['domain'], isset($_POST['cascade']));
@@ -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=\"",
@@ -647,9 +647,9 @@ class DomainsController extends BaseController
}
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
diff --git a/src/controllers/FulltextController.php b/src/controllers/FulltextController.php
index 157f98bb..0f13a5ac 100644
--- a/src/controllers/FulltextController.php
+++ b/src/controllers/FulltextController.php
@@ -31,7 +31,7 @@ class FulltextController extends BaseController
$this->printHeader();
$this->printBody();
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
if (isset($_POST['prev_action'])) {
$this->action = $_POST['prev_action'];
} else {
@@ -41,7 +41,7 @@ class FulltextController extends BaseController
switch ($this->action) {
case 'createconfig':
- if (isset($_POST['create'])) {
+ if (null !== $this->getPostParam('create')) {
$this->doSaveCreateConfig();
} else {
$this->doCreateConfig();
@@ -49,7 +49,7 @@ class FulltextController extends BaseController
break;
case 'alterconfig':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doSaveAlterConfig();
} else {
$this->doAlterConfig();
@@ -57,7 +57,7 @@ class FulltextController extends BaseController
break;
case 'dropconfig':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDropConfig(false);
} else {
$this->doDropConfig(true);
@@ -77,7 +77,7 @@ class FulltextController extends BaseController
break;
case 'createdict':
- if (isset($_POST['create'])) {
+ if (null !== $this->getPostParam('create')) {
$this->doSaveCreateDict();
} else {
$this->doCreateDict();
@@ -85,7 +85,7 @@ class FulltextController extends BaseController
break;
case 'alterdict':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doSaveAlterDict();
} else {
$this->doAlterDict();
@@ -93,7 +93,7 @@ class FulltextController extends BaseController
break;
case 'dropdict':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDropDict(false);
} else {
$this->doDropDict(true);
@@ -101,7 +101,7 @@ class FulltextController extends BaseController
break;
case 'dropmapping':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDropMapping(false);
} else {
$this->doDropMapping(true);
@@ -109,7 +109,7 @@ class FulltextController extends BaseController
break;
case 'altermapping':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doSaveAlterMapping();
} else {
$this->doAlterMapping();
@@ -308,20 +308,20 @@ 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;
echo '<input type="hidden" name="ftscfg" value="', \htmlspecialchars($_REQUEST['ftscfg']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
$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,22 +339,22 @@ 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;
echo '<input type="hidden" name="ftsdict" value="', \htmlspecialchars($_REQUEST['ftsdict']), '" />' . \PHP_EOL;
//echo "<input type=\"hidden\" name=\"ftscfg\" value=\"", htmlspecialchars($_REQUEST['ftscfg']), "\" />".PHP_EOL;
echo '<input type="hidden" name="prev_action" value="viewdicts" /></p>' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
$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;
@@ -454,7 +454,7 @@ class FulltextController extends BaseController
echo '<p>' . \PHP_EOL;
echo '<input type="hidden" name="action" value="createconfig" />' . \PHP_EOL;
echo '<input type="hidden" name="database" value="', \htmlspecialchars($_REQUEST['database']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"create\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
echo '</p>' . \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;
@@ -550,9 +550,9 @@ class FulltextController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="alterconfig" />' . \PHP_EOL;
echo '<input type="hidden" name="ftscfg" value="', \htmlspecialchars($_POST['ftscfg']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \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=\"",
@@ -880,7 +880,7 @@ class FulltextController extends BaseController
echo '<p>' . \PHP_EOL;
echo '<input type="hidden" name="action" value="createdict" />' . \PHP_EOL;
echo '<input type="hidden" name="database" value="', \htmlspecialchars($_REQUEST['database']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"create\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
echo '</p>' . \PHP_EOL;
@@ -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;
@@ -986,9 +986,9 @@ class FulltextController extends BaseController
echo '<p><input type="hidden" name="action" value="alterdict" />' . \PHP_EOL;
echo '<input type="hidden" name="ftsdict" value="', \htmlspecialchars($_POST['ftsdict']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="prev_action" value="viewdicts" /></p>' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \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'])) {
@@ -1053,7 +1053,7 @@ class FulltextController extends BaseController
echo "<input type=\"hidden\" name=\"ftscfg\" value=\"{$_REQUEST['ftscfg']}\" />" . \PHP_EOL;
echo '<input type="hidden" name="action" value="dropmapping" />' . \PHP_EOL;
echo '<input type="hidden" name="prev_action" value="viewconfig" /></p>' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -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;
@@ -1149,9 +1149,9 @@ class FulltextController extends BaseController
echo '<input type="hidden" name="ftscfg" value="', \htmlspecialchars($_POST['ftscfg']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="prev_action" value="viewconfig" /></p>' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strftsnodictionaries']}</p>" . \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;
@@ -1236,9 +1236,9 @@ class FulltextController extends BaseController
echo '<p><input type="hidden" name="action" value="addmapping" />' . \PHP_EOL;
echo '<input type="hidden" name="ftscfg" value="', \htmlspecialchars($_POST['ftscfg']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="prev_action" value="viewconfig" /></p>' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"add\" value=\"{$this->lang['stradd']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strftsnodictionaries']}</p>" . \PHP_EOL;
diff --git a/src/controllers/FunctionsController.php b/src/controllers/FunctionsController.php
index 891ad444..bc740da2 100644
--- a/src/controllers/FunctionsController.php
+++ b/src/controllers/FunctionsController.php
@@ -32,7 +32,7 @@ class FunctionsController extends BaseController
switch ($this->action) {
case 'save_create':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doSaveCreate();
@@ -45,7 +45,7 @@ class FunctionsController extends BaseController
break;
case 'drop':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDrop(false);
} else {
$this->doDefault();
@@ -57,7 +57,7 @@ class FunctionsController extends BaseController
break;
case 'save_edit':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doSaveEdit();
@@ -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;
@@ -467,9 +467,9 @@ class FunctionsController extends BaseController
echo '<p><input type="hidden" name="action" value="save_edit" />' . \PHP_EOL;
echo '<input type="hidden" name="function" value="', \htmlspecialchars($_REQUEST['function']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="function_oid" value="', \htmlspecialchars($_REQUEST['function_oid']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \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'])) {
@@ -661,7 +661,7 @@ class FunctionsController extends BaseController
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /><label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
@@ -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;
@@ -964,9 +973,9 @@ class FunctionsController extends BaseController
echo '</tbody></table>' . \PHP_EOL;
echo $szJSTRArg;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
echo $szJS;
}
@@ -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 b389aece..0f88d4b8 100644
--- a/src/controllers/GroupsController.php
+++ b/src/controllers/GroupsController.php
@@ -180,8 +180,8 @@ 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 $this->misc->form;
+ 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;
echo '<input type="hidden" name="user" value="', \htmlspecialchars($_REQUEST['user']), '" />' . \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) {
@@ -259,7 +259,7 @@ class GroupsController extends BaseController
}
echo '</select>' . \PHP_EOL;
echo "<input type=\"submit\" value=\"{$this->lang['straddmember']}\" />" . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="group" value="', \htmlspecialchars($_REQUEST['group']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="action" value="add_member" />' . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -292,8 +292,8 @@ 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 $this->misc->form;
+ 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;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
@@ -330,7 +330,7 @@ class GroupsController extends BaseController
$this->printMsg($msg);
echo '<form action="" method="post">' . \PHP_EOL;
- echo $this->misc->form;
+ 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;
echo "\t\t<td class=\"data\"><input size=\"32\" maxlength=\"{$data->_maxNameLen}\" name=\"name\" value=\"", \htmlspecialchars($_POST['name']), "\" /></td>\n\t</tr>" . \PHP_EOL;
@@ -353,7 +353,7 @@ class GroupsController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
diff --git a/src/controllers/HistoryController.php b/src/controllers/HistoryController.php
index 6935b27f..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,10 +199,10 @@ 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->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -223,9 +222,9 @@ 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->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
diff --git a/src/controllers/IndexesController.php b/src/controllers/IndexesController.php
index 2b4aa54c..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;
@@ -53,7 +53,7 @@ class IndexesController extends BaseController
break;
case 'save_create_index':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doSaveCreateIndex();
@@ -65,7 +65,7 @@ class IndexesController extends BaseController
break;
case 'drop_index':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDropIndex(false);
} else {
$this->doDefault();
@@ -144,7 +144,7 @@ class IndexesController extends BaseController
],
];
- $url = self::SUBFOLDER . '/src/views/indexes';
+ $url = \containerInstance()->subFolder . '/src/views/indexes';
$actions = [
'cluster' => [
@@ -268,13 +268,13 @@ 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;
echo '<input type="hidden" name="table" value="', \htmlspecialchars($object), '" />' . \PHP_EOL;
echo '<input type="hidden" name="index" value="', \htmlspecialchars($_REQUEST['index']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"cluster\" value=\"{$this->lang['strclusterindex']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -434,11 +434,11 @@ class IndexesController extends BaseController
echo '</table>';
echo '<p><input type="hidden" name="action" value="save_create_index" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="subject" value="', \htmlspecialchars($subject), '" />' . \PHP_EOL;
echo '<input type="hidden" name="' . $subject . '" value="', \htmlspecialchars($object), '" />' . \PHP_EOL;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
@@ -503,11 +503,11 @@ 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;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<p><input type="checkbox" id="cascade" name="cascade" value="1" />';
echo '<label for="cascade">' . $this->lang['strcascade'] . '</label></p>' . \PHP_EOL;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
diff --git a/src/controllers/IntroController.php b/src/controllers/IntroController.php
index c10231f7..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 === $this->container->requestobj->getAttribute('route')) {
- echo $this->doDefault();
- } else {
- $body = $this->container->responseobj->getBody();
- $body->write($this->doDefault());
+ $body = \responseInstance()->getBody();
+ $body->write($this->doDefault());
- return $this->container->responseobj;
- }
+ return \responseInstance();
}
/**
@@ -88,8 +84,8 @@ class IntroController extends BaseController
//$intro_html .= '<li><a href="' . $this->lang['strviewfaq_url'] . '">' . $this->lang['strviewfaq'] . '</a></li>';
$intro_html .= '</ul>';
- if ($this->container->requestobj->getQueryParam('language')) {
- $this->misc->setReloadBrowser(true);
+ if (\requestInstance()->getQueryParam('language')) {
+ $this->view->setReloadBrowser(true);
}
$intro_html .= $this->printFooter(false);
diff --git a/src/controllers/LoginController.php b/src/controllers/LoginController.php
index 9fd9705c..770be030 100644
--- a/src/controllers/LoginController.php
+++ b/src/controllers/LoginController.php
@@ -46,13 +46,13 @@ class LoginController extends BaseController
*/
public function render()
{
- if (null === $this->container->requestobj->getAttribute('route')) {
+ if (null === \requestInstance()->getAttribute('route')) {
echo $this->doLoginForm();
} else {
- $body = $this->container->responseobj->getBody();
+ $body = \responseInstance()->getBody();
$body->write($this->doLoginForm());
- return $this->container->responseobj;
+ return \responseInstance();
}
}
@@ -60,7 +60,7 @@ class LoginController extends BaseController
{
$this->misc->setNoDBConnection(true);
- $server_id = $this->container->requestobj->getQueryParam('server');
+ $server_id = \requestInstance()->getQueryParam('server');
if (null === $server_id) {
$this->prtrace('invalid server param');
@@ -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 c55a18ab..d3a4126d 100644
--- a/src/controllers/MaterializedviewpropertiesController.php
+++ b/src/controllers/MaterializedviewpropertiesController.php
@@ -32,7 +32,7 @@ class MaterializedviewpropertiesController extends BaseController
switch ($this->action) {
case 'save_edit':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefinition();
} else {
$this->doSaveEdit();
@@ -56,7 +56,7 @@ class MaterializedviewpropertiesController extends BaseController
break;
case 'properties':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doProperties();
@@ -64,7 +64,7 @@ class MaterializedviewpropertiesController extends BaseController
break;
case 'alter':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doAlter(false);
} else {
$this->doDefault();
@@ -76,7 +76,7 @@ class MaterializedviewpropertiesController extends BaseController
break;
/*case 'drop':
- if (isset($_POST['drop'])) {
+ if($this->getPostParam('drop')!==null){
$this->doDrop(false);
} else {
$this->doDefault();
@@ -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\">",
@@ -161,9 +161,9 @@ class MaterializedviewpropertiesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_edit" />' . \PHP_EOL;
echo '<input type="hidden" name="matview" value="', \htmlspecialchars($_REQUEST[$this->subject]), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL;
@@ -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;
@@ -214,12 +214,12 @@ class MaterializedviewpropertiesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="properties" />' . \PHP_EOL;
echo '<input type="hidden" name="stage" value="2" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="matview" value="', \htmlspecialchars($_REQUEST[$this->subject]), '" />' . \PHP_EOL;
echo '<input type="hidden" name="column" value="', \htmlspecialchars($_REQUEST['column']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="olddefault" value="', \htmlspecialchars($_REQUEST['olddefault']), '" />' . \PHP_EOL;
echo "<input type=\"submit\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
break;
@@ -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">';
@@ -329,9 +329,9 @@ class MaterializedviewpropertiesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<input type="hidden" name="action" value="alter" />' . \PHP_EOL;
echo '<input type="hidden" name="matview" value="', \htmlspecialchars($_REQUEST[$this->subject]), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL;
@@ -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 f63c231f..35b00836 100644
--- a/src/controllers/MaterializedviewsController.php
+++ b/src/controllers/MaterializedviewsController.php
@@ -64,7 +64,7 @@ class MaterializedviewsController extends BaseController
break;
case 'set_params_create':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doSetParamsCreate();
@@ -84,7 +84,7 @@ class MaterializedviewsController extends BaseController
break;
case 'drop':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDrop(false);
} else {
$this->doDefault();
@@ -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'])) {
@@ -297,7 +297,7 @@ class MaterializedviewsController extends BaseController
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
@@ -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=\"",
@@ -416,9 +425,9 @@ class MaterializedviewsController extends BaseController
\htmlspecialchars($_REQUEST['formComment']), "</textarea></td>\n\t</tr>" . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
@@ -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 ab5a546f..602fbaaf 100644
--- a/src/controllers/OperatorsController.php
+++ b/src/controllers/OperatorsController.php
@@ -29,7 +29,7 @@ class OperatorsController extends BaseController
switch ($this->action) {
/*case 'save_create':
- if (isset($_POST['cancel'])) {
+ if($this->getPostParam('cancel')!==null){
$this->doDefault();
} else {
$this->doSaveCreate();
@@ -41,7 +41,7 @@ class OperatorsController extends BaseController
break;*/
case 'drop':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doDrop(false);
@@ -256,14 +256,14 @@ 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;
echo '<input type="hidden" name="operator_oid" value="', \htmlspecialchars($_REQUEST['operator_oid']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
$status = $data->dropOperator($_POST['operator_oid'], isset($_POST['cascade']));
diff --git a/src/controllers/PrivilegesController.php b/src/controllers/PrivilegesController.php
index 8ae7814d..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->container->utils->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;
@@ -388,7 +388,7 @@ class PrivilegesController extends BaseController
\htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
}
- echo $this->misc->form;
+ echo $this->view->form;
echo \sprintf('<input type="submit" name="%s" value="%s" />%s', $mode, $this->lang['str' . $mode], \PHP_EOL);
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>";
diff --git a/src/controllers/RolesController.php b/src/controllers/RolesController.php
index 583a2e91..653db4c1 100644
--- a/src/controllers/RolesController.php
+++ b/src/controllers/RolesController.php
@@ -29,7 +29,7 @@ class RolesController extends BaseController
break;
case 'save_create':
- if (isset($_POST['create'])) {
+ if (null !== $this->getPostParam('create')) {
$this->doSaveCreate();
} else {
$this->doDefault();
@@ -41,7 +41,7 @@ class RolesController extends BaseController
break;
case 'save_alter':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doSaveAlter();
} else {
$this->doDefault();
@@ -53,7 +53,7 @@ class RolesController extends BaseController
break;
case 'drop':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDrop(false);
} else {
$this->doDefault();
@@ -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;
@@ -315,9 +315,9 @@ class RolesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"create\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \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;
@@ -481,9 +481,9 @@ class RolesController extends BaseController
echo '<input type="hidden" name="memberofold" value="', $_POST['memberofold'] ?? \htmlspecialchars($memberofold), '" />' . \PHP_EOL;
echo '<input type="hidden" name="membersold" value="', $_POST['membersold'] ?? \htmlspecialchars($membersold), '" />' . \PHP_EOL;
echo '<input type="hidden" name="adminmembersold" value="', $_POST['adminmembersold'] ?? \htmlspecialchars($adminmembersold), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
@@ -535,12 +535,12 @@ 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->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
$status = $data->dropRole($_REQUEST['rolename']);
@@ -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=\"",
@@ -771,7 +771,7 @@ class RolesController extends BaseController
echo "\t\t<td><input type=\"password\" name=\"confirm\" size=\"32\" value=\"\" /></td>\n\t</tr>" . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="changepassword" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"ok\" value=\"{$this->lang['strok']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
echo '</p></form>' . \PHP_EOL;
diff --git a/src/controllers/RulesController.php b/src/controllers/RulesController.php
index c1f21758..5975b5af 100644
--- a/src/controllers/RulesController.php
+++ b/src/controllers/RulesController.php
@@ -32,7 +32,7 @@ class RulesController extends BaseController
break;
case 'save_create_rule':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->createRule(false);
@@ -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=\"",
@@ -202,9 +202,9 @@ class RulesController extends BaseController
echo '<input type="hidden" name="subject" value="', \htmlspecialchars($_REQUEST['subject']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="', \htmlspecialchars($_REQUEST['subject']),
'" value="', \htmlspecialchars($_REQUEST[$_REQUEST['subject']]), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"submit\" name=\"ok\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
if ('' === \trim($_POST['name'])) {
@@ -248,13 +248,13 @@ 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']),
'" value="', \htmlspecialchars($_REQUEST[$_REQUEST['reltype']]), '" />' . \PHP_EOL;
echo '<input type="hidden" name="rule" value="', \htmlspecialchars($_REQUEST['rule']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />" . \PHP_EOL;
diff --git a/src/controllers/SchemasController.php b/src/controllers/SchemasController.php
index dd3a45a6..f9fc577c 100644
--- a/src/controllers/SchemasController.php
+++ b/src/controllers/SchemasController.php
@@ -30,7 +30,7 @@ class SchemasController extends BaseController
return $this->doSubTree();
}
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->action = '';
}
@@ -40,7 +40,7 @@ class SchemasController extends BaseController
switch ($this->action) {
case 'create':
- if (isset($_POST['create'])) {
+ if (null !== $this->getPostParam('create')) {
$this->doSaveCreate();
} else {
$this->doCreate();
@@ -48,7 +48,7 @@ class SchemasController extends BaseController
break;
case 'alter':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doSaveAlter();
} else {
$this->doAlter();
@@ -56,7 +56,7 @@ class SchemasController extends BaseController
break;
case 'drop':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDrop(false);
} else {
$this->doDrop(true);
@@ -100,13 +100,13 @@ class SchemasController extends BaseController
// Check that the DB actually supports schemas
$schemas = $data->getSchemas();
- $destination = $this->container->utils->getDestinationWithLastTab('schema');
+ $destination = $this->container->getDestinationWithLastTab('schema');
$columns = [
'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=\"",
@@ -304,7 +304,7 @@ class SchemasController extends BaseController
echo '<p>' . \PHP_EOL;
echo '<input type="hidden" name="action" value="create" />' . \PHP_EOL;
echo '<input type="hidden" name="database" value="', \htmlspecialchars($_REQUEST['database']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"create\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
echo '</p>' . \PHP_EOL;
@@ -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;
@@ -392,9 +392,9 @@ class SchemasController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="alter" />' . \PHP_EOL;
echo '<input type="hidden" name="schema" value="', \htmlspecialchars($_POST['schema']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \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) {
@@ -453,9 +453,9 @@ class SchemasController extends BaseController
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="database" value="', \htmlspecialchars($_REQUEST['database']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
if (\is_array($_POST['nsp'])) {
@@ -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 e6b48773..8b123395 100644
--- a/src/controllers/SequencesController.php
+++ b/src/controllers/SequencesController.php
@@ -35,7 +35,7 @@ class SequencesController extends BaseController
break;
case 'save_create_sequence':
- if (isset($_POST['create'])) {
+ if (null !== $this->getPostParam('create')) {
$this->doSaveCreateSequence();
} else {
$this->doDefault();
@@ -47,7 +47,7 @@ class SequencesController extends BaseController
break;
case 'drop':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDrop(false);
} else {
$this->doDefault();
@@ -83,7 +83,7 @@ class SequencesController extends BaseController
break;
case 'alter':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doSaveAlter();
} else {
$this->doDefault();
@@ -212,21 +212,21 @@ class SequencesController extends BaseController
$data = $this->misc->getDatabaseAccessor();
$sequences = $data->getSequences();
-
$reqvars = $this->misc->getRequestVars('sequence');
+ $actionURL = Decorator::actionurl(
+ 'sequences',
+ $reqvars,
+ [
+ 'action' => 'properties',
+ 'sequence' => Decorator::field('seqname'),
+ ]
+ );
$attrs = [
'text' => Decorator::field('seqname'),
'icon' => 'Sequence',
'toolTip' => Decorator::field('seqcomment'),
- 'action' => Decorator::actionurl(
- 'sequences',
- $reqvars,
- [
- 'action' => 'properties',
- 'sequence' => Decorator::field('seqname'),
- ]
- ),
+ 'action' => $actionURL,
];
return $this->printTree($sequences, $attrs, 'sequences');
@@ -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'])) {
@@ -423,9 +423,9 @@ class SequencesController extends BaseController
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 $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
if (\is_array($_POST['sequence'])) {
@@ -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,42 +501,49 @@ 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;
echo "<td class=\"data1\"><input name=\"formSequenceName\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
- \htmlspecialchars($_POST['formSequenceName']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($_POST['formSequenceName']),
+ '" /></td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\">{$this->lang['strincrementby']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formIncrement" size="5" value="',
- \htmlspecialchars($_POST['formIncrement']), '" /> </td></tr>' . \PHP_EOL;
+ \htmlspecialchars($_POST['formIncrement']),
+ '" /> </td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\">{$this->lang['strminvalue']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formMinValue" size="5" value="',
- \htmlspecialchars($_POST['formMinValue']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($_POST['formMinValue']),
+ '" /></td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\">{$this->lang['strmaxvalue']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formMaxValue" size="5" value="',
- \htmlspecialchars($_POST['formMaxValue']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($_POST['formMaxValue']),
+ '" /></td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\">{$this->lang['strstartvalue']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formStartValue" size="5" value="',
- \htmlspecialchars($_POST['formStartValue']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($_POST['formStartValue']),
+ '" /></td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\">{$this->lang['strcachevalue']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formCacheValue" size="5" value="',
- \htmlspecialchars($_POST['formCacheValue']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($_POST['formCacheValue']),
+ '" /></td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\"><label for=\"formCycledValue\">{$this->lang['strcancycle']}</label></th>" . \PHP_EOL;
echo '<td class="data1"><input type="checkbox" id="formCycledValue" name="formCycledValue" ',
- (isset($_POST['formCycledValue']) ? ' checked="checked"' : ''), ' /></td></tr>' . \PHP_EOL;
+ (isset($_POST['formCycledValue']) ? ' checked="checked"' : ''),
+ ' /></td></tr>' . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create_sequence" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"create\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
@@ -641,18 +657,19 @@ 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">';
echo "<input name=\"nextvalue\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
- $this->misc->printVal($sequence->fields['last_value']), '" /></td></tr>' . \PHP_EOL;
+ $this->misc->printVal($sequence->fields['last_value']),
+ '" /></td></tr>' . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="setval" />' . \PHP_EOL;
echo '<input type="hidden" name="sequence" value="', \htmlspecialchars($_REQUEST['sequence']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"setval\" value=\"{$this->lang['strsetval']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL;
@@ -704,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 {
@@ -750,13 +767,14 @@ 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;
echo '<td class="data1">';
echo "<input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
- \htmlspecialchars($_POST['name']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($_POST['name']),
+ '" /></td></tr>' . \PHP_EOL;
if ($data->isSuperUser()) {
// Fetch all users
@@ -768,7 +786,10 @@ class SequencesController extends BaseController
while (!$users->EOF) {
$uname = $users->fields['usename'];
echo '<option value="', \htmlspecialchars($uname), '"',
- ($uname === $_POST['owner']) ? ' selected="selected"' : '', '>', \htmlspecialchars($uname), '</option>' . \PHP_EOL;
+ ($uname === $_POST['owner']) ? ' selected="selected"' : '',
+ '>',
+ \htmlspecialchars($uname),
+ '</option>' . \PHP_EOL;
$users->moveNext();
}
echo '</select></td></tr>' . \PHP_EOL;
@@ -782,7 +803,10 @@ class SequencesController extends BaseController
while (!$schemas->EOF) {
$schema = $schemas->fields['nspname'];
echo '<option value="', \htmlspecialchars($schema), '"',
- ($schema === $_POST['newschema']) ? ' selected="selected"' : '', '>', \htmlspecialchars($schema), '</option>' . \PHP_EOL;
+ ($schema === $_POST['newschema']) ? ' selected="selected"' : '',
+ '>',
+ \htmlspecialchars($schema),
+ '</option>' . \PHP_EOL;
$schemas->moveNext();
}
echo '</select></td></tr>' . \PHP_EOL;
@@ -791,44 +815,52 @@ class SequencesController extends BaseController
echo "<tr><th class=\"data left\">{$this->lang['strcomment']}</th>" . \PHP_EOL;
echo '<td class="data1">';
echo '<textarea rows="3" cols="32" name="comment">',
- \htmlspecialchars($_POST['comment']), '</textarea></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($_POST['comment']),
+ '</textarea></td></tr>' . \PHP_EOL;
if ($data->hasAlterSequenceStart()) {
echo "<tr><th class=\"data left\">{$this->lang['strstartvalue']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formStartValue" size="5" value="',
- \htmlspecialchars($sequence->fields['start_value']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($sequence->fields['start_value']),
+ '" /></td></tr>' . \PHP_EOL;
}
echo "<tr><th class=\"data left\">{$this->lang['strrestartvalue']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formRestartValue" size="5" value="',
- \htmlspecialchars($sequence->fields['last_value']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($sequence->fields['last_value']),
+ '" /></td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\">{$this->lang['strincrementby']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formIncrement" size="5" value="',
- \htmlspecialchars($sequence->fields['increment_by']), '" /> </td></tr>' . \PHP_EOL;
+ \htmlspecialchars($sequence->fields['increment_by']),
+ '" /> </td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\">{$this->lang['strmaxvalue']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formMaxValue" size="5" value="',
- \htmlspecialchars($sequence->fields['max_value']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($sequence->fields['max_value']),
+ '" /></td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\">{$this->lang['strminvalue']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formMinValue" size="5" value="',
- \htmlspecialchars($sequence->fields['min_value']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($sequence->fields['min_value']),
+ '" /></td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\">{$this->lang['strcachevalue']}</th>" . \PHP_EOL;
echo '<td class="data1"><input name="formCacheValue" size="5" value="',
- \htmlspecialchars($sequence->fields['cache_value']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($sequence->fields['cache_value']),
+ '" /></td></tr>' . \PHP_EOL;
echo "<tr><th class=\"data left\"><label for=\"formCycledValue\">{$this->lang['strcancycle']}</label></th>" . \PHP_EOL;
echo '<td class="data1"><input type="checkbox" id="formCycledValue" name="formCycledValue" ',
- (isset($_POST['formCycledValue']) ? ' checked="checked"' : ''), ' /></td></tr>' . \PHP_EOL;
+ (isset($_POST['formCycledValue']) ? ' checked="checked"' : ''),
+ ' /></td></tr>' . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="alter" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="sequence" value="', \htmlspecialchars($_REQUEST['sequence']), '" />' . \PHP_EOL;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL;
diff --git a/src/controllers/ServersController.php b/src/controllers/ServersController.php
index ade0da25..c02645d3 100644
--- a/src/controllers/ServersController.php
+++ b/src/controllers/ServersController.php
@@ -64,13 +64,13 @@ class ServersController extends BaseController
$server_html .= $this->printFooter(false);
- if (null === $this->container->requestobj->getAttribute('route')) {
+ if (null === \requestInstance()->getAttribute('route')) {
echo $server_html;
} else {
- $body = $this->container->responseobj->getBody();
+ $body = \responseInstance()->getBody();
$body->write($server_html);
- return $this->container->responseobj;
+ return \responseInstance();
}
}
@@ -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 247bd238..3acc3853 100644
--- a/src/controllers/TablesController.php
+++ b/src/controllers/TablesController.php
@@ -43,7 +43,7 @@ class TablesController extends BaseController
switch ($this->action) {
case 'create':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$header_template = 'header_select2.twig';
@@ -57,7 +57,7 @@ class TablesController extends BaseController
break;
case 'confcreatelike':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$header_template = 'header_datatables.twig';
$this->doDefault();
} else {
@@ -106,7 +106,7 @@ class TablesController extends BaseController
break;
case 'drop':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDrop(false);
} else {
$header_template = 'header_datatables.twig';
@@ -157,40 +157,28 @@ class TablesController extends BaseController
$actions = $this->_getActions();
- //\Kint::dump($tables);
-
echo $this->printTable($tables, $columns, $actions, $this->table_place, $this->lang['strnotables']);
-
+ $attr = [
+ 'href' => [
+ 'url' => 'tables',
+ 'urlvars' => [
+ 'action' => 'createlike',
+ 'server' => $this->getRequestParam('server'),
+ 'database' => $this->getRequestParam('database'),
+ 'schema' => $this->getRequestParam('schema'),
+ ],
+ ],
+ ];
$navlinks = [
'create' => [
- 'attr' => [
- 'href' => [
- 'url' => 'tables',
- 'urlvars' => [
- 'action' => 'create',
- 'server' => $_REQUEST['server'],
- 'database' => $_REQUEST['database'],
- 'schema' => $_REQUEST['schema'],
- ],
- ],
- ],
+ 'attr' => $attr,
'content' => $this->lang['strcreatetable'],
],
];
if ((0 < $tables->recordCount()) && $data->hasCreateTableLike()) {
$navlinks['createlike'] = [
- 'attr' => [
- 'href' => [
- 'url' => 'tables',
- 'urlvars' => [
- 'action' => 'createlike',
- 'server' => $_REQUEST['server'],
- 'database' => $_REQUEST['database'],
- 'schema' => $_REQUEST['schema'],
- ],
- ],
- ],
+ 'attr' => $attr,
'content' => $this->lang['strcreatetablelike'],
];
}
@@ -207,7 +195,7 @@ class TablesController extends BaseController
return $this
->container
- ->responseobj
+ ->response
->withStatus(200)
->withJson($all_tables);
}
@@ -272,7 +260,7 @@ class TablesController extends BaseController
*
* @param mixed $msg
*/
- public function doCreate($msg = '')
+ public function doCreate($msg = ''): void
{
$data = $this->misc->getDatabaseAccessor();
@@ -306,15 +294,17 @@ 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;
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
- \htmlspecialchars($_REQUEST['name']), "\" /></td>\n\t</tr>" . \PHP_EOL;
+ \htmlspecialchars($_REQUEST['name']),
+ "\" /></td>\n\t</tr>" . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strnumcols']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data\"><input name=\"fields\" size=\"5\" maxlength=\"{$data->_maxNameLen}\" value=\"",
- \htmlspecialchars($_REQUEST['fields']), "\" /></td>\n\t</tr>" . \PHP_EOL;
+ \htmlspecialchars($_REQUEST['fields']),
+ "\" /></td>\n\t</tr>" . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left\">{$this->lang['stroptions']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data\"><label for=\"withoutoids\"><input type=\"checkbox\" id=\"withoutoids\" name=\"withoutoids\"", isset($_REQUEST['withoutoids']) ? ' checked="checked"' : '', " />WITHOUT OIDS</label></td>\n\t</tr>" . \PHP_EOL;
@@ -324,12 +314,14 @@ class TablesController extends BaseController
echo "\t\t<td class=\"data1\">\n\t\t\t<select name=\"spcname\">" . \PHP_EOL;
// Always offer the default (empty) option
echo "\t\t\t\t<option value=\"\"",
- ('' === $_REQUEST['spcname']) ? ' selected="selected"' : '', '></option>' . \PHP_EOL;
+ ('' === $_REQUEST['spcname']) ? ' selected="selected"' : '',
+ '></option>' . \PHP_EOL;
// Display all other tablespaces
while (!$tablespaces->EOF) {
$spcname = \htmlspecialchars($tablespaces->fields['spcname']);
echo "\t\t\t\t<option value=\"{$spcname}\"",
- ($tablespaces->fields['spcname'] === $_REQUEST['spcname']) ? ' selected="selected"' : '', ">{$spcname}</option>" . \PHP_EOL;
+ ($tablespaces->fields['spcname'] === $_REQUEST['spcname']) ? ' selected="selected"' : '',
+ ">{$spcname}</option>" . \PHP_EOL;
$tablespaces->moveNext();
}
echo "\t\t\t</select>\n\t\t</td>\n\t</tr>" . \PHP_EOL;
@@ -337,14 +329,15 @@ class TablesController extends BaseController
echo "\t<tr>\n\t\t<th class=\"data left\">{$this->lang['strcomment']}</th>" . \PHP_EOL;
echo "\t\t<td><textarea name=\"tblcomment\" rows=\"3\" cols=\"32\">",
- \htmlspecialchars($_REQUEST['tblcomment']), "</textarea></td>\n\t</tr>" . \PHP_EOL;
+ \htmlspecialchars($_REQUEST['tblcomment']),
+ "</textarea></td>\n\t</tr>" . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="create" />' . \PHP_EOL;
echo '<input type="hidden" name="stage" value="2" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strnext']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
break;
@@ -373,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;
@@ -402,14 +395,17 @@ class TablesController extends BaseController
echo "\t<tr>\n\t\t<td>", $i + 1, '.&nbsp;</td>' . \PHP_EOL;
echo "\t\t<td><input name=\"field[{$i}]\" size=\"16\" maxlength=\"{$data->_maxNameLen}\" value=\"",
- \htmlspecialchars($_REQUEST['field'][$i]), '" /></td>' . \PHP_EOL;
+ \htmlspecialchars($_REQUEST['field'][$i]),
+ '" /></td>' . \PHP_EOL;
echo "\t\t<td>\n\t\t\t<select name=\"type[{$i}]\" class=\"select2\" id=\"types{$i}\" onchange=\"checkLengths(this.options[this.selectedIndex].value,{$i});\">" . \PHP_EOL;
// Output any "magic" types
foreach ($data->extraTypes as $v) {
$types_for_js[\mb_strtolower($v)] = 1;
echo "\t\t\t\t<option value=\"", \htmlspecialchars($v), '"',
- (isset($_REQUEST['type'][$i]) && $_REQUEST['type'][$i] === $v) ? ' selected="selected"' : '', '>',
- $this->misc->printVal($v), '</option>' . \PHP_EOL;
+ (isset($_REQUEST['type'][$i]) && $_REQUEST['type'][$i] === $v) ? ' selected="selected"' : '',
+ '>',
+ $this->misc->printVal($v),
+ '</option>' . \PHP_EOL;
}
$types->moveFirst();
@@ -417,8 +413,10 @@ class TablesController extends BaseController
$typname = $types->fields['typname'];
$types_for_js[$typname] = 1;
echo "\t\t\t\t<option value=\"", \htmlspecialchars($typname), '"',
- (isset($_REQUEST['type'][$i]) && $_REQUEST['type'][$i] === $typname) ? ' selected="selected"' : '', '>',
- $this->misc->printVal($typname), '</option>' . \PHP_EOL;
+ (isset($_REQUEST['type'][$i]) && $_REQUEST['type'][$i] === $typname) ? ' selected="selected"' : '',
+ '>',
+ $this->misc->printVal($typname),
+ '</option>' . \PHP_EOL;
$types->moveNext();
}
echo "\t\t\t</select>\n\t\t\n";
@@ -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}'";
}
@@ -440,24 +439,27 @@ class TablesController extends BaseController
echo "\t\t\t</select>\n\t\t</td>" . \PHP_EOL;
echo "\t\t<td><input name=\"length[{$i}]\" id=\"lengths{$i}\" size=\"10\" value=\"",
- \htmlspecialchars($_REQUEST['length'][$i]), '" /></td>' . \PHP_EOL;
+ \htmlspecialchars($_REQUEST['length'][$i]),
+ '" /></td>' . \PHP_EOL;
echo "\t\t<td><input type=\"checkbox\" name=\"notnull[{$i}]\"", (isset($_REQUEST['notnull'][$i])) ? ' checked="checked"' : '', ' /></td>' . \PHP_EOL;
echo "\t\t<td style=\"text-align: center\"><input type=\"checkbox\" name=\"uniquekey[{$i}]\""
- . (isset($_REQUEST['uniquekey'][$i]) ? ' checked="checked"' : '') . ' /></td>' . \PHP_EOL;
+ . (isset($_REQUEST['uniquekey'][$i]) ? ' checked="checked"' : '') . ' /></td>' . \PHP_EOL;
echo "\t\t<td style=\"text-align: center\"><input type=\"checkbox\" name=\"primarykey[{$i}]\" "
- . (isset($_REQUEST['primarykey'][$i]) ? ' checked="checked"' : '')
- . ' /></td>' . \PHP_EOL;
+ . (isset($_REQUEST['primarykey'][$i]) ? ' checked="checked"' : '')
+ . ' /></td>' . \PHP_EOL;
echo "\t\t<td><input name=\"default[{$i}]\" size=\"20\" value=\"",
- \htmlspecialchars($_REQUEST['default'][$i]), '" /></td>' . \PHP_EOL;
+ \htmlspecialchars($_REQUEST['default'][$i]),
+ '" /></td>' . \PHP_EOL;
echo "\t\t<td><input name=\"colcomment[{$i}]\" size=\"40\" value=\"",
- \htmlspecialchars($_REQUEST['colcomment'][$i]), "\" />
+ \htmlspecialchars($_REQUEST['colcomment'][$i]),
+ "\" />
<script type=\"text/javascript\">checkLengths(document.getElementById('types{$i}').value,{$i});</script>
</td>\n\t</tr>" . \PHP_EOL;
}
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="create" />' . \PHP_EOL;
echo '<input type="hidden" name="stage" value="3" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="name" value="', \htmlspecialchars($_REQUEST['name']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="fields" value="', \htmlspecialchars($_REQUEST['fields']), '" />' . \PHP_EOL;
@@ -470,7 +472,7 @@ class TablesController extends BaseController
echo '<input type="hidden" name="spcname" value="', \htmlspecialchars($_REQUEST['spcname']), '" />' . \PHP_EOL;
}
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
break;
@@ -521,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) {
@@ -552,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();
@@ -585,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;
@@ -612,27 +616,27 @@ class TablesController extends BaseController
}
echo "\t<tr>\n\t\t<th class=\"data left\">{$this->lang['stroptions']}</th>\n\t\t<td class=\"data\">";
echo '<label for="withdefaults"><input type="checkbox" id="withdefaults" name="withdefaults"',
- isset($_REQUEST['withdefaults']) ? ' checked="checked"' : '',
+ isset($_REQUEST['withdefaults']) ? ' checked="checked"' : '',
"/>{$this->lang['strcreatelikewithdefaults']}</label>";
if ($data->hasCreateTableLikeWithConstraints()) {
echo '<br /><label for="withconstraints"><input type="checkbox" id="withconstraints" name="withconstraints"',
- isset($_REQUEST['withconstraints']) ? ' checked="checked"' : '',
+ isset($_REQUEST['withconstraints']) ? ' checked="checked"' : '',
"/>{$this->lang['strcreatelikewithconstraints']}</label>";
}
if ($data->hasCreateTableLikeWithIndexes()) {
echo '<br /><label for="withindexes"><input type="checkbox" id="withindexes" name="withindexes"',
- isset($_REQUEST['withindexes']) ? ' checked="checked"' : '',
+ isset($_REQUEST['withindexes']) ? ' checked="checked"' : '',
"/>{$this->lang['strcreatelikewithindexes']}</label>";
}
echo "</td>\n\t</tr>" . \PHP_EOL;
echo '</table>';
echo '<input type="hidden" name="action" value="confcreatelike" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
if ('' === \trim($_REQUEST['name'])) {
@@ -659,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']);
@@ -686,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
@@ -726,7 +732,8 @@ class TablesController extends BaseController
echo "<tr class=\"data{$id}\">" . \PHP_EOL;
echo '<td style="white-space:nowrap;">';
echo '<input type="checkbox" name="show[', \htmlspecialchars($attrs->fields['attname']), ']"',
- isset($_REQUEST['show'][$attrs->fields['attname']]) ? ' checked="checked"' : '', ' /></td>';
+ isset($_REQUEST['show'][$attrs->fields['attname']]) ? ' checked="checked"' : '',
+ ' /></td>';
echo '<td style="white-space:nowrap;">', $this->misc->printVal($attrs->fields['attname']), '</td>';
echo '<td style="white-space:nowrap;">', $this->misc->printVal($data->formatType($attrs->fields['type'], $attrs->fields['atttypmod'])), '</td>';
echo '<td style="white-space:nowrap;">';
@@ -734,7 +741,9 @@ class TablesController extends BaseController
foreach (\array_keys($data->selectOps) as $v) {
echo '<option value="', \htmlspecialchars($v), '"', ($_REQUEST['ops'][$attrs->fields['attname']] === $v) ? ' selected="selected"' : '',
- '>', \htmlspecialchars($v), '</option>' . \PHP_EOL;
+ '>',
+ \htmlspecialchars($v),
+ '</option>' . \PHP_EOL;
}
echo "</select>\n</td>" . \PHP_EOL;
echo '<td style="white-space:nowrap;">', $data->printField(
@@ -754,11 +763,11 @@ class TablesController extends BaseController
}
echo '<p><input type="hidden" name="action" value="selectrows" />' . \PHP_EOL;
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
+ echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo '<input type="hidden" name="subject" value="table" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"select\" accesskey=\"r\" value=\"{$this->lang['strselect']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
return;
@@ -821,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;
@@ -865,7 +874,8 @@ class TablesController extends BaseController
)
);
echo "<input type=\"hidden\" name=\"types[{$attrs->fields['attnum']}]\" value=\"",
- \htmlspecialchars($attrs->fields['type']), '" /></td>';
+ \htmlspecialchars($attrs->fields['type']),
+ '" /></td>';
echo '<td style="white-space:nowrap;">' . \PHP_EOL;
echo "<select name=\"format[{$attrs->fields['attnum']}]\">" . \PHP_EOL;
@@ -927,10 +937,9 @@ class TablesController extends BaseController
echo '<input type="hidden" name="action" value="insertrow" />' . \PHP_EOL;
echo '<input type="hidden" name="fields" value="', \htmlentities(\serialize($fields), \ENT_QUOTES, 'UTF-8'), '" />' . \PHP_EOL;
echo '<input type="hidden" name="protection_counter" value="' . $_SESSION['counter'] . '" />' . \PHP_EOL;
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
+ 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']) {
@@ -942,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->misc->form;
+ 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>';
}
/**
@@ -967,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'] = [];
@@ -986,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) {
@@ -999,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));
@@ -1014,14 +1027,14 @@ 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 '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
+ echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
// END not mutli empty
}
echo "<input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label>";
echo '<input type="hidden" name="action" value="empty" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"empty\" value=\"{$this->lang['strempty']}\" /> <input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
echo "</form>\n"; // END if confirm
} else {
@@ -1034,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;
}
@@ -1047,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
@@ -1064,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) {
@@ -1078,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));
@@ -1091,13 +1119,13 @@ 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 '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \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
}
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
@@ -1113,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
}
}
@@ -1150,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 c1721492..85a0cfbb 100644
--- a/src/controllers/TablespacesController.php
+++ b/src/controllers/TablespacesController.php
@@ -188,8 +188,8 @@ 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 $this->misc->form;
+ 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;
echo '<td class="data1">';
@@ -216,7 +216,7 @@ class TablespacesController extends BaseController
echo '<p><input type="hidden" name="action" value="save_edit" />' . \PHP_EOL;
echo '<input type="hidden" name="tablespace" value="', \htmlspecialchars($_REQUEST['tablespace']), '" />' . \PHP_EOL;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL;
@@ -264,8 +264,8 @@ 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 $this->misc->form;
+ 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;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
@@ -308,8 +308,8 @@ 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 $this->misc->form;
+ 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;
echo "\t\t<td class=\"data1\"><input size=\"32\" name=\"formSpcname\" maxlength=\"{$data->_maxNameLen}\" value=\"", \htmlspecialchars($_POST['formSpcname']), "\" /></td>\n\t</tr>" . \PHP_EOL;
@@ -334,7 +334,7 @@ class TablespacesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
diff --git a/src/controllers/TblpropertiesController.php b/src/controllers/TblpropertiesController.php
index 9a8ca6ae..254c09d3 100644
--- a/src/controllers/TblpropertiesController.php
+++ b/src/controllers/TblpropertiesController.php
@@ -32,7 +32,7 @@ class TblpropertiesController extends BaseController
switch ($this->action) {
case 'alter':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doSaveAlter();
} else {
$this->doDefault();
@@ -52,7 +52,7 @@ class TblpropertiesController extends BaseController
break;
case 'add_column':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$header_template = 'header_select2.twig';
@@ -61,7 +61,7 @@ class TblpropertiesController extends BaseController
break;
/*case 'properties':
- if (isset($_POST['cancel'])) {
+ if($this->getPostParam('cancel')!==null){
$this->doDefault();
} else {
$this->doProperties();
@@ -69,7 +69,7 @@ class TblpropertiesController extends BaseController
break;
case 'drop':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDrop(false);
} else {
$this->doDefault();
@@ -287,8 +287,17 @@ class TblpropertiesController extends BaseController
$this->coalesceArr($_POST, 'tablespace', null);
$this->coalesceArr($_POST, 'newschema', null);
-
- $status = $data->alterTable($_POST['table'], $_POST['name'], $_POST['owner'], $_POST['newschema'], $_POST['comment'], $_POST['tablespace']);
+ $with_oids = (bool) ($this->getPostParam('with_oids', false));
+
+ $status = $data->alterTable(
+ $this->getPostParam('table'),
+ $this->getPostParam('name'),
+ $this->getPostParam('owner'),
+ $this->getPostParam('newschema'),
+ $this->getPostParam('comment'),
+ $this->getPostParam('tablespace'),
+ $with_oids
+ );
if (0 === $status) {
// If table has been renamed, need to change to the new name and
@@ -297,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 {
@@ -348,12 +357,13 @@ 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">';
echo "<input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
- \htmlspecialchars($_POST['name'], \ENT_QUOTES), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($_POST['name'], \ENT_QUOTES),
+ '" /></td></tr>' . \PHP_EOL;
if ($data->isSuperUser()) {
echo "<tr><th class=\"data left required\">{$this->lang['strowner']}</th>" . \PHP_EOL;
@@ -362,7 +372,10 @@ class TblpropertiesController extends BaseController
while (!$users->EOF) {
$uname = $users->fields['usename'];
echo '<option value="', \htmlspecialchars($uname), '"',
- ($uname === $_POST['owner']) ? ' selected="selected"' : '', '>', \htmlspecialchars($uname), '</option>' . \PHP_EOL;
+ ($uname === $_POST['owner']) ? ' selected="selected"' : '',
+ '>',
+ \htmlspecialchars($uname),
+ '</option>' . \PHP_EOL;
$users->moveNext();
}
echo '</select></td></tr>' . \PHP_EOL;
@@ -376,7 +389,10 @@ class TblpropertiesController extends BaseController
while (!$schemas->EOF) {
$schema = $schemas->fields['nspname'];
echo '<option value="', \htmlspecialchars($schema), '"',
- ($schema === $_POST['newschema']) ? ' selected="selected"' : '', '>', \htmlspecialchars($schema), '</option>' . \PHP_EOL;
+ ($schema === $_POST['newschema']) ? ' selected="selected"' : '',
+ '>',
+ \htmlspecialchars($schema),
+ '</option>' . \PHP_EOL;
$schemas->moveNext();
}
echo '</select></td></tr>' . \PHP_EOL;
@@ -388,27 +404,34 @@ class TblpropertiesController extends BaseController
echo "\t\t<td class=\"data1\">\n\t\t\t<select name=\"tablespace\">" . \PHP_EOL;
// Always offer the default (empty) option
echo "\t\t\t\t<option value=\"\"",
- ('' === $_POST['tablespace']) ? ' selected="selected"' : '', '></option>' . \PHP_EOL;
+ ('' === $_POST['tablespace']) ? ' selected="selected"' : '',
+ '></option>' . \PHP_EOL;
// Display all other tablespaces
while (!$tablespaces->EOF) {
$spcname = \htmlspecialchars($tablespaces->fields['spcname']);
echo "\t\t\t\t<option value=\"{$spcname}\"",
- ($spcname === $_POST['tablespace']) ? ' selected="selected"' : '', ">{$spcname}</option>" . \PHP_EOL;
+ ($spcname === $_POST['tablespace']) ? ' selected="selected"' : '',
+ ">{$spcname}</option>" . \PHP_EOL;
$tablespaces->moveNext();
}
echo "\t\t\t</select>\n\t\t</td>\n\t</tr>" . \PHP_EOL;
}
+ echo '<tr><th class="data left"> </th>' . \PHP_EOL;
+ echo '<td class="data1">';
+ echo \sprintf('<input type="checkbox" name="with_oids" value="1" %s /> %s', $data->hasObjectID($table->fields['relname']) ? 'checked' : '', ' WITH OIDS');
+
+ echo '</td></tr>';
echo "<tr><th class=\"data left\">{$this->lang['strcomment']}</th>" . \PHP_EOL;
echo '<td class="data1">';
- echo '<textarea rows="3" cols="32" name="comment">',
- \htmlspecialchars($_POST['comment']), '</textarea></td></tr>' . \PHP_EOL;
- echo '</table>' . \PHP_EOL;
+ echo \sprintf('<textarea rows="3" cols="62" name="comment">%s</textarea>', \htmlspecialchars($_POST['comment']));
+ echo \sprintf('</td></tr>%s</table>%s', \PHP_EOL, \PHP_EOL);
echo '<p><input type="hidden" name="action" value="alter" />' . \PHP_EOL;
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
- echo $misc->form;
+ echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
+
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL;
@@ -459,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;
@@ -480,8 +503,8 @@ class TblpropertiesController extends BaseController
echo "<input type=\"file\" name=\"source\" /></td>\n\t</tr>" . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="import" />' . \PHP_EOL;
- echo $misc->form;
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
+ echo $this->view->form;
+ echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo "<input type=\"submit\" value=\"{$this->lang['strimport']}\" /></p>" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
}
@@ -522,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;
@@ -537,15 +560,18 @@ class TblpropertiesController extends BaseController
echo "<th class=\"data\">{$this->lang['strcomment']}</th></tr>" . \PHP_EOL;
echo "<tr><td><input name=\"field\" size=\"16\" maxlength=\"{$data->_maxNameLen}\" value=\"",
- \htmlspecialchars($_POST['field']), '" /></td>' . \PHP_EOL;
+ \htmlspecialchars($_POST['field']),
+ '" /></td>' . \PHP_EOL;
echo "<td><select class=\"select2\" name=\"type\" id=\"type\" onchange=\"checkLengths(document.getElementById('type').value,'');\">" . \PHP_EOL;
// Output any "magic" types. This came in with the alter column type so we'll check that
if ($data->hasMagicTypes()) {
foreach ($data->extraTypes as $v) {
$types_for_js[] = \mb_strtolower($v);
echo "\t<option value=\"", \htmlspecialchars($v), '"',
- ($v === $_POST['type']) ? ' selected="selected"' : '', '>',
- $misc->printVal($v), '</option>' . \PHP_EOL;
+ ($v === $_POST['type']) ? ' selected="selected"' : '',
+ '>',
+ $misc->printVal($v),
+ '</option>' . \PHP_EOL;
}
}
@@ -553,7 +579,8 @@ class TblpropertiesController extends BaseController
$typname = $types->fields['typname'];
$types_for_js[] = $typname;
echo "\t<option value=\"", \htmlspecialchars($typname), '"', ($typname === $_POST['type']) ? ' selected="selected"' : '', '>',
- $misc->printVal($typname), '</option>' . \PHP_EOL;
+ $misc->printVal($typname),
+ '</option>' . \PHP_EOL;
$types->moveNext();
}
echo '</select></td>' . \PHP_EOL;
@@ -565,32 +592,37 @@ 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}'";
}
echo '<td><input name="length" id="lengths" size="8" value="',
- \htmlspecialchars($_POST['length']), '" /></td>' . \PHP_EOL;
+ \htmlspecialchars($_POST['length']),
+ '" /></td>' . \PHP_EOL;
// Support for adding column with not null and default
if ($data->hasCreateFieldWithConstraints()) {
echo '<td><input type="checkbox" name="notnull"',
- (isset($_REQUEST['notnull'])) ? ' checked="checked"' : '', ' /></td>' . \PHP_EOL;
+ (isset($_REQUEST['notnull'])) ? ' checked="checked"' : '',
+ ' /></td>' . \PHP_EOL;
echo '<td><input name="default" size="20" value="',
- \htmlspecialchars($_POST['default']), '" /></td>' . \PHP_EOL;
+ \htmlspecialchars($_POST['default']),
+ '" /></td>' . \PHP_EOL;
}
echo '<td><input name="comment" size="40" value="',
- \htmlspecialchars($_POST['comment']), '" /></td></tr>' . \PHP_EOL;
+ \htmlspecialchars($_POST['comment']),
+ '" /></td></tr>' . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="add_column" />' . \PHP_EOL;
echo '<input type="hidden" name="stage" value="2" />' . \PHP_EOL;
- echo $misc->form;
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
+ echo $this->view->form;
+ echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
if (!$data->hasCreateFieldWithConstraints()) {
echo '<input type="hidden" name="default" value="" />' . \PHP_EOL;
}
echo "<input type=\"submit\" value=\"{$this->lang['stradd']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
echo '<script type="text/javascript">predefined_lengths = new Array(' . \implode(',', $escaped_predef_types) . ");checkLengths(document.getElementById('type').value,'');</script>" . \PHP_EOL;
@@ -617,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;
@@ -649,11 +681,11 @@ 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 '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \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;
- echo $misc->form;
+ echo $this->view->form;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\"> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
@@ -662,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 29360a23..03ec4af6 100644
--- a/src/controllers/TreeController.php
+++ b/src/controllers/TreeController.php
@@ -42,7 +42,7 @@ class TreeController extends BaseController
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');
@@ -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 9a9c3145..2c1eab77 100644
--- a/src/controllers/TriggersController.php
+++ b/src/controllers/TriggersController.php
@@ -29,7 +29,7 @@ class TriggersController extends BaseController
switch ($this->action) {
case 'alter':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doSaveAlter();
} else {
$this->doDefault();
@@ -49,7 +49,7 @@ class TriggersController extends BaseController
break;
case 'save_create':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doSaveCreate();
@@ -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">';
@@ -281,11 +281,11 @@ class TriggersController extends BaseController
\htmlspecialchars($_POST['name']), '" />' . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="alter" />' . \PHP_EOL;
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \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;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['strok']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL;
@@ -311,11 +311,11 @@ 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 '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \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;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />" . \PHP_EOL;
@@ -350,11 +350,11 @@ 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 '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \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;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -388,11 +388,11 @@ 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 '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \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;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"no\" value=\"{$this->lang['strno']}\" />" . \PHP_EOL;
echo '</form>' . \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;
@@ -473,10 +473,10 @@ class TriggersController extends BaseController
echo '<td class="data1">(<input type="text" name="formTriggerArgs" size="32" />)</td>' . \PHP_EOL;
echo '</tr></table>' . \PHP_EOL;
echo "<p><input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '<input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
+ echo $this->view->form;
echo '</form>' . \PHP_EOL;
}
diff --git a/src/controllers/TypesController.php b/src/controllers/TypesController.php
index 43ddda75..7fb8289b 100644
--- a/src/controllers/TypesController.php
+++ b/src/controllers/TypesController.php
@@ -29,7 +29,7 @@ class TypesController extends BaseController
switch ($this->action) {
case 'create_comp':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doCreateComposite();
@@ -37,7 +37,7 @@ class TypesController extends BaseController
break;
case 'create_enum':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doCreateEnum();
@@ -45,7 +45,7 @@ class TypesController extends BaseController
break;
case 'save_create':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doSaveCreate();
@@ -57,7 +57,7 @@ class TypesController extends BaseController
break;
case 'drop':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doDrop(false);
@@ -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,13 +342,13 @@ 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;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
$status = $data->dropType($_POST['type'], isset($_POST['cascade']));
@@ -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=\"",
@@ -402,9 +400,9 @@ class TypesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="create_comp" />' . \PHP_EOL;
echo '<input type="hidden" name="stage" value="2" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strnext']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
break;
@@ -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;
@@ -481,12 +479,12 @@ class TypesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="create_comp" />' . \PHP_EOL;
echo '<input type="hidden" name="stage" value="3" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="name" value="', \htmlspecialchars($_REQUEST['name']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="fields" value="', \htmlspecialchars($_REQUEST['fields']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="typcomment" value="', \htmlspecialchars($_REQUEST['typcomment']), '" />' . \PHP_EOL;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
break;
@@ -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=\"",
@@ -579,9 +577,9 @@ class TypesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="create_enum" />' . \PHP_EOL;
echo '<input type="hidden" name="stage" value="2" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strnext']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
break;
@@ -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;
@@ -625,12 +623,12 @@ class TypesController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="create_enum" />' . \PHP_EOL;
echo '<input type="hidden" name="stage" value="3" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="name" value="', \htmlspecialchars($_REQUEST['name']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="values" value="', \htmlspecialchars($_REQUEST['values']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="typcomment" value="', \htmlspecialchars($_REQUEST['typcomment']), '" />' . \PHP_EOL;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
break;
@@ -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=\"",
@@ -777,9 +775,9 @@ class TypesController extends BaseController
echo '</select></td></tr>' . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
diff --git a/src/controllers/UsersController.php b/src/controllers/UsersController.php
index 5ce1db89..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=\"",
@@ -266,7 +266,7 @@ class UsersController extends BaseController
echo "\t\t<td><input type=\"password\" name=\"confirm\" size=\"32\" value=\"\" /></td>\n\t</tr>" . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="changepassword" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"ok\" value=\"{$this->lang['strok']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
echo '</p></form>' . \PHP_EOL;
@@ -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;
@@ -349,9 +349,9 @@ class UsersController extends BaseController
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_edit" />' . \PHP_EOL;
echo '<input type="hidden" name="username" value="', \htmlspecialchars($_REQUEST['username']), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL;
@@ -400,12 +400,12 @@ 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->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
$status = $data->dropUser($_REQUEST['username']);
@@ -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;
@@ -457,9 +457,9 @@ class UsersController extends BaseController
echo "\t\t<td class=\"data1\"><input size=\"30\" name=\"formExpires\" value=\"", \htmlspecialchars($_POST['formExpires']), "\" /></td>\n\t</tr>" . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"create\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
diff --git a/src/controllers/ViewpropertiesController.php b/src/controllers/ViewpropertiesController.php
index d0ce462a..26d5b208 100644
--- a/src/controllers/ViewpropertiesController.php
+++ b/src/controllers/ViewpropertiesController.php
@@ -35,7 +35,7 @@ class ViewpropertiesController extends BaseController
switch ($this->action) {
case 'save_edit':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefinition();
} else {
$this->doSaveEdit();
@@ -57,7 +57,7 @@ class ViewpropertiesController extends BaseController
break;
case 'properties':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doProperties();
@@ -65,7 +65,7 @@ class ViewpropertiesController extends BaseController
break;
case 'alter':
- if (isset($_POST['alter'])) {
+ if (null !== $this->getPostParam('alter')) {
$this->doAlter(false);
} else {
$this->doDefault();
@@ -77,7 +77,7 @@ class ViewpropertiesController extends BaseController
break;
/*case 'drop':
- if (isset($_POST['drop'])) {
+ if($this->getPostParam('drop')!==null){
$this->doDrop(false);
} else {
$this->doDefault();
@@ -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']),
@@ -172,7 +172,7 @@ class ViewpropertiesController extends BaseController
<p>
<input type="hidden" name="action" value="save_edit" />
<input type="hidden" name="view" value="{$variables->subject}" />
- {$this->misc->form}
+ {$this->view->form}
<input type="submit" value="{$this->lang['stralter']}" />
<input type="submit" name="cancel" value="{$this->lang['strcancel']}" />
</p>
@@ -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;
@@ -228,12 +228,12 @@ EOT;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="properties" />' . \PHP_EOL;
echo '<input type="hidden" name="stage" value="2" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo '<input type="hidden" name="view" value="', \htmlspecialchars($_REQUEST[$this->subject]), '" />' . \PHP_EOL;
echo '<input type="hidden" name="column" value="', \htmlspecialchars($_REQUEST['column']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="olddefault" value="', \htmlspecialchars($_REQUEST['olddefault']), '" />' . \PHP_EOL;
echo "<input type=\"submit\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
break;
@@ -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">';
@@ -343,9 +343,9 @@ EOT;
echo '</table>' . \PHP_EOL;
echo '<input type="hidden" name="action" value="alter" />' . \PHP_EOL;
echo '<input type="hidden" name="view" value="', \htmlspecialchars($_REQUEST[$this->subject]), '" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"submit\" name=\"alter\" value=\"{$this->lang['stralter']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnodata']}</p>" . \PHP_EOL;
@@ -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 c658f858..28a44422 100644
--- a/src/controllers/ViewsController.php
+++ b/src/controllers/ViewsController.php
@@ -64,7 +64,7 @@ class ViewsController extends BaseController
break;
case 'set_params_create':
- if (isset($_POST['cancel'])) {
+ if (null !== $this->getPostParam('cancel')) {
$this->doDefault();
} else {
$this->doSetParamsCreate();
@@ -84,7 +84,7 @@ class ViewsController extends BaseController
break;
case 'drop':
- if (isset($_POST['drop'])) {
+ if (null !== $this->getPostParam('drop')) {
$this->doDrop(false);
} else {
$this->doDefault();
@@ -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'])) {
@@ -297,7 +297,7 @@ class ViewsController extends BaseController
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo "<input type=\"submit\" name=\"drop\" value=\"{$this->lang['strdrop']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
@@ -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=\"",
@@ -416,9 +425,9 @@ class ViewsController extends BaseController
\htmlspecialchars($_REQUEST['formComment']), "</textarea></td>\n\t</tr>" . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="save_create" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
@@ -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 bae800af..9cca6b76 100644
--- a/src/database/ADOdbBase.php
+++ b/src/database/ADOdbBase.php
@@ -6,8 +6,6 @@
namespace PHPPgAdmin\Database;
-use PHPPgAdmin\ADONewConnection;
-
/**
* @file
* Parent class of all ADODB objects.
@@ -18,19 +16,42 @@ class ADOdbBase
{
use \PHPPgAdmin\Traits\HelperTrait;
use \PHPPgAdmin\Database\Traits\HasTrait;
+ use \PHPPgAdmin\Database\Traits\DatabaseTrait;
+ /**
+ * @var array
+ */
public $lang;
+ /**
+ * @var array
+ */
public $conf;
+ /**
+ * @var \ADODB_postgres9
+ */
+ public $conn;
+
+ /**
+ * @var \PHPPgAdmin\ContainerUtils
+ */
protected $container;
+ /**
+ * @var array
+ */
protected $server_info;
/**
+ * @var string
+ */
+ protected $lastExecutedSql;
+
+ /**
* Base constructor.
*
- * @param ADONewConnection $conn The connection object
+ * @param \ADODB_postgres9 $conn The connection object
* @param mixed $container
* @param mixed $server_info
*/
@@ -43,10 +64,58 @@ class ADOdbBase
$this->conf = $container->get('conf');
$this->prtrace('instanced connection class');
+ $this->lastExecutedSql = '';
$this->conn = $conn;
}
/**
+ * 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
@@ -118,10 +187,19 @@ class ADOdbBase
} else {
$sql .= 'NULL;';
}
+ $this->lastExecutedSql = $sql;
return $this->execute($sql);
}
+ public function getLastExecutedSQL(): string
+ {
+ $lastExecutedSql = $this->lastExecutedSql;
+ $this->lastExecutedSql = '';
+
+ return $lastExecutedSql;
+ }
+
/**
* Turns on or off query debugging.
*
@@ -184,7 +262,7 @@ class ADOdbBase
try {
$rs = $this->conn->Execute($sql);
- return $this->conn->ErrorNo();
+ return $this->ErrorNo();
} catch (\Exception $e) {
return $e->getCode();
}
@@ -216,6 +294,16 @@ class ADOdbBase
}
}
+ public function ErrorNo(): int
+ {
+ return $this->conn->ErrorNo();
+ }
+
+ public function ErrorMsg(): string
+ {
+ return $this->conn->ErrorMsg();
+ }
+
/**
* Retrieves a single value from a query.
*
@@ -233,7 +321,7 @@ class ADOdbBase
// If failure, or no rows returned, return error value
if (!$rs) {
- return $this->conn->ErrorNo();
+ return $this->ErrorNo();
}
if (0 === $rs->recordCount()) {
@@ -280,7 +368,7 @@ class ADOdbBase
// Check for failures
if (!$this->conn->Execute($sql)) {
// Check for referential integrity failure
- if (\mb_stristr($this->conn->ErrorMsg(), 'referential')) {
+ if (\mb_stristr($this->ErrorMsg(), 'referential')) {
return -1;
}
}
@@ -290,7 +378,7 @@ class ADOdbBase
return -2;
}
- return $this->conn->ErrorNo();
+ return $this->ErrorNo();
}
/**
@@ -379,16 +467,16 @@ class ADOdbBase
// Check for failures
if (!$this->conn->Execute($sql)) {
// Check for unique constraint failure
- if (\mb_stristr($this->conn->ErrorMsg(), 'unique')) {
+ if (\mb_stristr($this->ErrorMsg(), 'unique')) {
return -1;
}
- if (\mb_stristr($this->conn->ErrorMsg(), 'referential')) {
+ if (\mb_stristr($this->ErrorMsg(), 'referential')) {
return -2;
} // Check for referential integrity failure
}
- return $this->conn->ErrorNo();
+ return $this->ErrorNo();
}
/**
@@ -450,11 +538,11 @@ class ADOdbBase
// Check for failures
if (!$this->conn->Execute($setClause . $whereClause)) {
// Check for unique constraint failure
- if (\mb_stristr($this->conn->ErrorMsg(), 'unique')) {
+ if (\mb_stristr($this->ErrorMsg(), 'unique')) {
return -1;
}
- if (\mb_stristr($this->conn->ErrorMsg(), 'referential')) {
+ if (\mb_stristr($this->ErrorMsg(), 'referential')) {
return -2;
} // Check for referential integrity failure
}
@@ -464,37 +552,37 @@ class ADOdbBase
return -3;
}
- return $this->conn->ErrorNo();
+ return $this->ErrorNo();
}
/**
* Begin a transaction.
*
- * @return bool 0 success
+ * @return int 0 success
*/
public function beginTransaction()
{
- return !$this->conn->BeginTrans();
+ return (int) (!$this->conn->BeginTrans());
}
/**
* End a transaction.
*
- * @return bool 0 success
+ * @return int 0 success
*/
public function endTransaction()
{
- return !$this->conn->CommitTrans();
+ return (int) (!$this->conn->CommitTrans());
}
/**
* Roll back a transaction.
*
- * @return bool 0 success
+ * @return int 0 success
*/
public function rollbackTransaction()
{
- return !$this->conn->RollbackTrans();
+ return (int) (!$this->conn->RollbackTrans());
}
/**
diff --git a/src/database/Postgres.php b/src/database/Postgres.php
index 6e6dd3b5..35807c19 100644
--- a/src/database/Postgres.php
+++ b/src/database/Postgres.php
@@ -36,6 +36,21 @@ class Postgres extends ADOdbBase
public $conf;
+ /**
+ * @var float
+ */
+ public $major_version = 9.6;
+
+ /**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc::class;
+
+ /**
+ * @var \PHPPgAdmin\Help\PostgresDoc
+ */
+ public $help_class;
+
protected $container;
protected $server_info;
@@ -49,6 +64,8 @@ class Postgres extends ADOdbBase
$this->lang = $container->get('lang');
$this->conf = $container->get('conf');
$this->server_info = $server_info;
+ $this->help_class = new $this->help_classname($this->conf, $this->major_version);
+ $this->lastExecutedSql = '';
}
/**
@@ -60,39 +77,36 @@ class Postgres extends ADOdbBase
*/
public function getHelp($help)
{
- $this->getHelpPages();
+ $this->help_page = $this->help_class->getHelpTopics();
+ $this->help_base = $this->help_class->getHelpBase();
- if (isset($this->help_page[$help])) {
- if (\is_array($this->help_page[$help])) {
- $urls = [];
+ if (!$topicResult = $this->help_class->getHelpTopic($help)) {
+ return null;
+ }
- foreach ($this->help_page[$help] as $link) {
- $urls[] = $this->help_base . $link;
- }
+ if (\is_array($topicResult)) {
+ $urls = [];
- return $urls;
+ foreach ($topicResult as $link) {
+ $urls[] = $this->help_base . $link;
}
- return $this->help_base . $this->help_page[$help];
+ return $urls;
}
- return null;
+ return $this->help_base . $topicResult;
}
/**
* 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(): void
+ public function getHelpPages()
{
- if (null === $this->help_page || null === $this->help_base) {
- $help_classname = '\PHPPgAdmin\Help\PostgresDoc' . \str_replace('.', '', $this->major_version);
-
- $help_class = new $help_classname($this->conf, $this->major_version);
- $this->help_page = $help_class->getHelpPage();
- $this->help_base = $help_class->getHelpBase();
- }
+ return $this->help_class->getHelpTopics();
}
// Formatting functions
@@ -144,7 +158,7 @@ class Postgres extends ADOdbBase
if (null !== $value) {
$value = $this->escapeBytea($value);
}
- // no break
+ // no break
case 'text':
case 'text[]':
case 'json':
@@ -280,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 .= "
@@ -332,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
@@ -519,6 +484,7 @@ class Postgres extends ADOdbBase
if (false === $finishpos) {
$line = \mb_substr($line, 0, $i); /* remove comment */
+
break;
}
$pre = \mb_substr($line, 0, $i);
@@ -567,6 +533,7 @@ class Postgres extends ADOdbBase
} else {
if ('--' === \mb_substr($line, $i, 2)) {
$line = \mb_substr($line, 0, $i); /* remove comment */
+
break;
} /* count nested parentheses */
@@ -846,7 +813,7 @@ class Postgres extends ADOdbBase
$sql .= \implode('","', $show) . '" FROM ';
}
-
+ $this->prtrace(['id' => $this->id]);
$this->fieldClean($table);
if (isset($_REQUEST['schema'])) {
diff --git a/src/database/Postgres10.php b/src/database/Postgres10.php
index c14ba493..a076d824 100644
--- a/src/database/Postgres10.php
+++ b/src/database/Postgres10.php
@@ -20,9 +20,17 @@ namespace PHPPgAdmin\Database;
*/
class Postgres10 extends Postgres96
{
+ /**
+ * @var float
+ */
public $major_version = 10;
/**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc10::class;
+
+ /**
* Return all tables in current database (and schema).
*
* @return int|\PHPPgAdmin\ADORecordSet All tables, sorted alphabetically
diff --git a/src/database/Postgres11.php b/src/database/Postgres11.php
index 850ae822..9dfce029 100644
--- a/src/database/Postgres11.php
+++ b/src/database/Postgres11.php
@@ -15,9 +15,17 @@ namespace PHPPgAdmin\Database;
*/
class Postgres11 extends Postgres10
{
+ /**
+ * @var float
+ */
public $major_version = 11;
/**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc11::class;
+
+ /**
* Returns a list of all functions in the database.
* In PG 11 proagg was replaced with prokind.
*
diff --git a/src/database/Postgres12.php b/src/database/Postgres12.php
index d2b63461..aa8495e1 100644
--- a/src/database/Postgres12.php
+++ b/src/database/Postgres12.php
@@ -15,9 +15,17 @@ namespace PHPPgAdmin\Database;
*/
class Postgres12 extends Postgres11
{
+ /**
+ * @var float
+ */
public $major_version = 12;
/**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc12::class;
+
+ /**
* Checks to see whether or not a table has a unique id column.
*
* @deprecated this field has been removed of pg_class as of PG 12
diff --git a/src/database/Postgres13.php b/src/database/Postgres13.php
index d3528398..853d5b8c 100644
--- a/src/database/Postgres13.php
+++ b/src/database/Postgres13.php
@@ -16,5 +16,13 @@ namespace PHPPgAdmin\Database;
*/
class Postgres13 extends Postgres12
{
+ /**
+ * @var float
+ */
public $major_version = 13;
+
+ /**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc12::class;
}
diff --git a/src/database/Postgres90.php b/src/database/Postgres90.php
index 6315aa6e..2b06faf0 100644
--- a/src/database/Postgres90.php
+++ b/src/database/Postgres90.php
@@ -14,5 +14,13 @@ namespace PHPPgAdmin\Database;
*/
class Postgres90 extends Postgres91
{
+ /**
+ * @var float
+ */
public $major_version = 9.0;
+
+ /**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc90::class;
}
diff --git a/src/database/Postgres91.php b/src/database/Postgres91.php
index e981f240..43fec0ca 100644
--- a/src/database/Postgres91.php
+++ b/src/database/Postgres91.php
@@ -16,8 +16,16 @@ namespace PHPPgAdmin\Database;
*/
class Postgres91 extends Postgres92
{
+ /**
+ * @var float
+ */
public $major_version = 9.1;
+ /**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc91::class;
+
// Administration functions
/**
diff --git a/src/database/Postgres92.php b/src/database/Postgres92.php
index cb2ff754..4e78d22c 100644
--- a/src/database/Postgres92.php
+++ b/src/database/Postgres92.php
@@ -14,9 +14,17 @@ class Postgres92 extends Postgres93
{
public $typIndexes = ['BTREE', 'RTREE', 'GIST', 'GIN', 'HASH'];
+ /**
+ * @var float
+ */
public $major_version = 9.2;
/**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc92::class;
+
+ /**
* Returns all available process information.
*
* @param null|string $database (optional) Find only connections to specified database
diff --git a/src/database/Postgres93.php b/src/database/Postgres93.php
index b2a0747f..f39a3842 100644
--- a/src/database/Postgres93.php
+++ b/src/database/Postgres93.php
@@ -12,9 +12,17 @@ namespace PHPPgAdmin\Database;
*/
class Postgres93 extends Postgres94
{
+ /**
+ * @var float
+ */
public $major_version = 9.3;
/**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc93::class;
+
+ /**
* Returns a list of all functions in the database.
*
* @param bool $all If true, will find all available functions, if false just those in search path
diff --git a/src/database/Postgres94.php b/src/database/Postgres94.php
index 7fe10201..0f23d0a0 100644
--- a/src/database/Postgres94.php
+++ b/src/database/Postgres94.php
@@ -14,5 +14,13 @@ class Postgres94 extends Postgres95
{
public $typIndexes = ['BTREE', 'RTREE', 'GIST', 'GIN', 'HASH', 'SP-GIST'];
+ /**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc94::class;
+
+ /**
+ * @var float
+ */
public $major_version = 9.4;
}
diff --git a/src/database/Postgres95.php b/src/database/Postgres95.php
index d6f1f93b..023b24d8 100644
--- a/src/database/Postgres95.php
+++ b/src/database/Postgres95.php
@@ -14,5 +14,13 @@ class Postgres95 extends Postgres96
{
public $typIndexes = ['BTREE', 'BRIN', 'RTREE', 'GIST', 'GIN', 'HASH'];
+ /**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc95::class;
+
+ /**
+ * @var float
+ */
public $major_version = 9.5;
}
diff --git a/src/database/Postgres96.php b/src/database/Postgres96.php
index ef2ad7e5..2f74c9cf 100644
--- a/src/database/Postgres96.php
+++ b/src/database/Postgres96.php
@@ -14,8 +14,16 @@ class Postgres96 extends Postgres
{
public $typIndexes = ['BTREE', 'BRIN', 'RTREE', 'GIST', 'GIN', 'HASH', 'SP-GIST'];
+ /**
+ * @var float
+ */
public $major_version = 9.6;
+ /**
+ * @var class-string
+ */
+ public $help_classname = \PHPPgAdmin\Help\PostgresDoc96::class;
+
// Administration functions
/**
diff --git a/src/database/databasetraits/HasTrait.php b/src/database/databasetraits/HasTrait.php
index aabaa1e9..895449e5 100644
--- a/src/database/databasetraits/HasTrait.php
+++ b/src/database/databasetraits/HasTrait.php
@@ -16,6 +16,11 @@ trait HasTrait
// The backend platform. Set to UNKNOWN by default.
public $platform = 'UNKNOWN';
+ /** @var string */
+
+ /**
+ * @var float
+ */
public $major_version = 9.6;
// Max object name length
diff --git a/src/database/databasetraits/RoleTrait.php b/src/database/databasetraits/RoleTrait.php
index 015248d4..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 number $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 number $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 number $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 644337ef..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 number $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 number $increment The increment
- * @param number $minvalue The min value
- * @param number $maxvalue The max value
- * @param number $startvalue The starting value
- * @param number $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 number $minvalue The min value
- * @param number $maxvalue The max value
- * @param number $restartvalue The starting value
- * @param number $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 number $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 number $increment The sequence incremental value
- * @param number $minvalue The sequence minimum value
- * @param number $maxvalue The sequence maximum value
- * @param number $restartvalue The sequence current value
- * @param number $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 number $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 084418fd..eec71a9e 100644
--- a/src/database/databasetraits/TableTrait.php
+++ b/src/database/databasetraits/TableTrait.php
@@ -187,33 +187,6 @@ trait TableTrait
$sql .= ')';
- // @@@@ DUMP CLUSTERING INFORMATION
-
- // Inherits
- /**
- * XXX: This is currently commented out as handling inheritance isn't this simple.
- * You also need to make sure you don't dump inherited columns and defaults, as well
- * as inherited NOT NULL and CHECK constraints. So for the time being, we just do
- * not claim to support inheritance.
- * $parents = $this->getTableParents($table);
- * if ($parents->recordCount() > 0) {
- * $sql .= " INHERITS (";
- * while (!$parents->EOF) {
- * $this->fieldClean($parents->fields['relname']);
- * // Qualify the parent table if it's in another schema
- * if ($parents->fields['schemaname'] != $this->_schema) {
- * $this->fieldClean($parents->fields['schemaname']);
- * $sql .= "\"{$parents->fields['schemaname']}\".";
- * }
- * $sql .= "\"{$parents->fields['relname']}\"";.
- *
- * $parents->moveNext();
- * if (!$parents->EOF) $sql .= ', ';
- * }
- * $sql .= ")";
- * }
- */
-
// Handle WITHOUT OIDS
if ($this->hasObjectID($table)) {
$sql .= ' WITH OIDS';
@@ -389,7 +362,7 @@ trait TableTrait
$rs = $this->selectSet($sql);
if (1 !== $rs->recordCount()) {
- return null;
+ return false;
}
$rs->fields['relhasoids'] = $this->phpBool($rs->fields['relhasoids']);
@@ -622,8 +595,8 @@ trait TableTrait
}
switch ($type[$i]) {
- // Have to account for weird placing of length for with/without
- // time zone types
+ // Have to account for weird placing of length for with/without
+ // time zone types
case 'timestamp with time zone':
case 'timestamp without time zone':
$qual = \mb_substr($type[$i], 9);
@@ -818,26 +791,29 @@ trait TableTrait
* @param string $schema The new schema for the table
* @param string $comment The comment on the table
* @param string $tablespace The new tablespace for the table ('' means leave as is)
+ * @param bool $with_oids If set to FALSE, will drop oids column
*
* @return bool|int 0 success
*/
- public function alterTable($table, $name, $owner, $schema, $comment, $tablespace)
+ public function alterTable($table, $name, $owner, $schema, $comment, $tablespace, bool $with_oids = true)
{
- $data = $this->getTable($table);
+ $tblrs = $this->getTable($table);
- if (1 !== $data->recordCount()) {
+ if (1 !== $tblrs->recordCount()) {
return -2;
}
$status = $this->beginTransaction();
+ //dump(['beginTransaction' => $status]);
if (0 !== $status) {
$this->rollbackTransaction();
return -1;
}
-
- $status = $this->_alterTable($data, $name, $owner, $schema, $comment, $tablespace);
+ $sql_sentence = "ALTER TABLE \"{$this->_schema}\".\"{$tblrs->fields['relname']}\" ";
+ $status = $this->_alterTable($tblrs, $name, $owner, $schema, $comment, $tablespace, !$with_oids, $sql_sentence);
+ //dump(['_alterTable' => [$status, $sql_sentence.$this->getLastExecutedSQL()]]);
if (0 !== $status) {
$this->rollbackTransaction();
@@ -849,16 +825,54 @@ trait TableTrait
}
/**
+ * Enables or disables the oid system column to a table a table's owner
+ * /!\ this function is called from _alterTable which take care of escaping fields.
+ *
+ * @param \PHPPgAdmin\ADORecordSet $tblrs The table RecordSet returned by getTable()
+ * @param null|string $owner
+ * @param bool $withoutoids
+ *
+ * @return array{0:int,1:string} [status:0 if successful, change_sql: changed attribute]
+ */
+ public function alterTableOids($tblrs, bool $withoutoids = false): array
+ {
+ $status = 0;
+ $change_sql = '';
+ // no changes. Return 0
+ if ((bool) ($this->hasObjectID($tblrs->fields['relname'])) !== !$withoutoids) {
+ /* vars cleaned in _alterTable */
+ $f_schema = $this->_schema;
+ $this->fieldClean($f_schema);
+
+ $alter_sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" ";
+ $change_sql = ' SET ';
+
+ if ($withoutoids) {
+ $change_sql .= ' WITHOUT OIDS';
+ } else {
+ $change_sql .= ' WITH OIDS';
+ }
+ $sql = \implode(' ', [$alter_sql, $change_sql]);
+
+ $status = $this->execute($sql);
+ }
+
+ return [$status, $change_sql];
+ }
+
+ /**
* Alter a table's owner
* /!\ this function is called from _alterTable which take care of escaping fields.
*
* @param \PHPPgAdmin\ADORecordSet $tblrs The table RecordSet returned by getTable()
* @param null|string $owner
*
- * @return int|\PHPPgAdmin\ADORecordSet
+ * @return array{0:int,1:string} [status:0 if successful, change_sql: changed attribute]
*/
- public function alterTableOwner($tblrs, $owner = null)
+ public function alterTableOwner($tblrs, $owner = null): array
{
+ $status = 0;
+ $change_sql = '';
/* vars cleaned in _alterTable */
if (!empty($owner) && ($tblrs->fields['relowner'] !== $owner)) {
$f_schema = $this->_schema;
@@ -866,12 +880,14 @@ trait TableTrait
// If owner has been changed, then do the alteration. We are
// careful to avoid this generally as changing owner is a
// superuser only function.
- $sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" OWNER TO \"{$owner}\"";
+ $alter_sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" ";
+ $change_sql = " OWNER TO \"{$owner}\"";
+ $sql = \implode(' ', [$alter_sql, $change_sql]);
- return $this->execute($sql);
+ $status = $this->execute($sql);
}
- return 0;
+ return [$status, $change_sql];
}
/**
@@ -881,10 +897,12 @@ trait TableTrait
* @param \PHPPgAdmin\ADORecordSet $tblrs The table RecordSet returned by getTable()
* @param null|string $tablespace
*
- * @return int|\PHPPgAdmin\ADORecordSet
+ * @return array{0:int,1:string} [status:0 if successful, change_sql: changed attribute]
*/
- public function alterTableTablespace($tblrs, $tablespace = null)
+ public function alterTableTablespace($tblrs, $tablespace = null): array
{
+ $status = 0;
+ $change_sql = '';
/* vars cleaned in _alterTable */
if (!empty($tablespace) && ($tblrs->fields['tablespace'] !== $tablespace)) {
$f_schema = $this->_schema;
@@ -892,12 +910,14 @@ trait TableTrait
// If tablespace has been changed, then do the alteration. We
// don't want to do this unnecessarily.
- $sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" SET TABLESPACE \"{$tablespace}\"";
+ $alter_sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" ";
+ $change_sql = " SET TABLESPACE \"{$tablespace}\"";
+ $sql = \implode(' ', [$alter_sql, $change_sql]);
- return $this->execute($sql);
+ $status = $this->execute($sql);
}
- return 0;
+ return [$status, $change_sql];
}
/**
@@ -907,27 +927,29 @@ trait TableTrait
* @param \PHPPgAdmin\ADORecordSet $tblrs The table RecordSet returned by getTable()
* @param string $name The new table's name
*
- * @return int|\PHPPgAdmin\ADORecordSet
+ * @return array{0:int,1:string} [status:0 if successful, change_sql: changed attribute]
*/
- public function alterTableName($tblrs, $name = null)
+ public function alterTableName($tblrs, $name = null): array
{
+ $status = 0;
+ $change_sql = '';
/* vars cleaned in _alterTable */
// Rename (only if name has changed)
if (!empty($name) && ($name !== $tblrs->fields['relname'])) {
$f_schema = $this->_schema;
$this->fieldClean($f_schema);
- $sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" RENAME TO \"{$name}\"";
+ $alter_sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" ";
+ $change_sql = " RENAME TO \"{$name}\"";
+ $sql = \implode(' ', [$alter_sql, $change_sql]);
$status = $this->execute($sql);
if (0 === $status) {
$tblrs->fields['relname'] = $name;
- } else {
- return $status;
}
}
- return 0;
+ return [$status, $change_sql];
}
// Row functions
@@ -939,22 +961,26 @@ trait TableTrait
* @param \PHPPgAdmin\ADORecordSet $tblrs The table RecordSet returned by getTable()
* @param null|string $schema
*
- * @return int|\PHPPgAdmin\ADORecordSet
+ * @return array{0:int,1:string} [status:0 if successful, change_sql: changed attribute]
*/
- public function alterTableSchema($tblrs, $schema = null)
+ public function alterTableSchema($tblrs, $schema = null): array
{
+ $status = 0;
+ $change_sql = '';
/* vars cleaned in _alterTable */
if (!empty($schema) && ($tblrs->fields['nspname'] !== $schema)) {
$f_schema = $this->_schema;
$this->fieldClean($f_schema);
// If tablespace has been changed, then do the alteration. We
// don't want to do this unnecessarily.
- $sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" SET SCHEMA \"{$schema}\"";
+ $alter_sql = "ALTER TABLE \"{$f_schema}\".\"{$tblrs->fields['relname']}\" ";
+ $change_sql = " SET SCHEMA \"{$schema}\"";
+ $sql = \implode(' ', [$alter_sql, $change_sql]);
- return $this->execute($sql);
+ $status = $this->execute($sql);
}
- return 0;
+ return [$status, $change_sql];
}
/**
@@ -1298,21 +1324,25 @@ trait TableTrait
* Protected method which alter a table
* SHOULDN'T BE CALLED OUTSIDE OF A TRANSACTION.
*
- * @param \PHPPgAdmin\ADORecordSet $tblrs The table recordSet returned by getTable()
- * @param string $name The new name for the table
- * @param string $owner The new owner for the table
- * @param string $schema The new schema for the table
- * @param string $comment The comment on the table
- * @param string $tablespace The new tablespace for the table ('' means leave as is)
+ * @param \PHPPgAdmin\ADORecordSet $tblrs The table recordSet returned by getTable()
+ * @param string $name The new name for the table
+ * @param string $owner The new owner for the table
+ * @param string $schema The new schema for the table
+ * @param string $comment The comment on the table
+ * @param string $tablespace The new tablespace for the table ('' means leave as is)
+ * @param bool $withoutoids If set to TRUE, will drop oids column
*
* @return int 0 success
*/
- protected function _alterTable($tblrs, $name, $owner, $schema, $comment, $tablespace)
+ protected function _alterTable($tblrs, $name, $owner, $schema, $comment, $tablespace, bool $withoutoids = false)
{
$this->fieldArrayClean($tblrs->fields);
// Comment
$status = $this->setComment('TABLE', '', $tblrs->fields['relname'], $comment);
+ //dump(['setComment' => $this->getLastExecutedSQL()]);
+
+ $this->lastExecutedSql = $this->getLastExecutedSQL();
if (0 !== $status) {
return -4;
@@ -1320,33 +1350,47 @@ trait TableTrait
// Owner
$this->fieldClean($owner);
- $status = $this->alterTableOwner($tblrs, $owner);
+ [$TableOwnerStatus,$TableOwnerSQL] = $this->alterTableOwner($tblrs, $owner);
+ $this->lastExecutedSql .= $TableOwnerSQL ? \sprintf('%s%s', \PHP_EOL, $TableOwnerSQL) : '';
+ //dump(['alterTableOwner' => [$TableOwnerStatus,$TableOwnerSQL]]);
- if (0 !== $status) {
+ if (0 !== $TableOwnerStatus) {
return -5;
}
// Tablespace
$this->fieldClean($tablespace);
- $status = $this->alterTableTablespace($tblrs, $tablespace);
+ [$TableTablespaceStatus,$TableTablespaceSQL] = $this->alterTableTablespace($tblrs, $tablespace);
+ $this->lastExecutedSql .= $TableTablespaceSQL ? \sprintf('%s%s', \PHP_EOL, $TableTablespaceSQL) : '';
+ //dump(['alterTableTablespace' => [$TableTablespaceStatus,$TableTablespaceSQL]]);
- if (0 !== $status) {
+ if (0 !== $TableTablespaceStatus) {
return -6;
}
// Rename
$this->fieldClean($name);
- $status = $this->alterTableName($tblrs, $name);
+ [$TableNameStatus,$TableNameSQL] = $this->alterTableName($tblrs, $name);
+ $this->lastExecutedSql .= $TableNameSQL ? \sprintf('%s%s', \PHP_EOL, $TableNameSQL) : '';
+ //dump(['alterTableName' => [$TableNameStatus,$TableNameSQL]]);
- if (0 !== $status) {
+ if (0 !== $TableNameStatus) {
return -3;
}
// Schema
$this->fieldClean($schema);
- $status = $this->alterTableSchema($tblrs, $schema);
+ [$TableSchemaStatus,$TableSchemaSQL] = $this->alterTableSchema($tblrs, $schema);
+ $this->lastExecutedSql .= $TableSchemaSQL ? \sprintf('%s%s', \PHP_EOL, $TableSchemaSQL) : '';
+ //dump(['alterTableSchema' => [$TableSchemaStatus,$TableSchemaSQL]]);
- if (0 !== $status) {
+ if (0 !== $TableSchemaStatus) {
+ return -7;
+ }
+ [$TableOidsStatus,$TableOidsSQL] = $this->alterTableOids($tblrs, $withoutoids);
+ $this->lastExecutedSql .= $TableOidsSQL ? \sprintf('%s%s', \PHP_EOL, $TableOidsSQL) : '';
+ //dump(['alterTableOids' => [$TableOidsStatus,$TableOidsSQL]]);
+ if (0 !== $TableOidsStatus) {
return -7;
}
@@ -1379,7 +1423,8 @@ trait TableTrait
$sql .= " \"{$atts->fields['attname']}\"";
// Dump SERIAL and BIGSERIAL columns correctly
if ($this->phpBool($atts->fields['attisserial']) &&
- ('integer' === $atts->fields['type'] || 'bigint' === $atts->fields['type'])) {
+ ('integer' === $atts->fields['type'] || 'bigint' === $atts->fields['type'])
+ ) {
if ('integer' === $atts->fields['type']) {
$sql .= ' SERIAL';
} else {
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/CallbackDecorator.php b/src/decorators/CallbackDecorator.php
index 57b4b3e4..970370c6 100644
--- a/src/decorators/CallbackDecorator.php
+++ b/src/decorators/CallbackDecorator.php
@@ -8,7 +8,7 @@ namespace PHPPgAdmin\Decorators;
class CallbackDecorator extends Decorator
{
- public function __construct($callback, $param = null)
+ public function __construct(\Closure $callback, $param = null)
{
$this->fn = $callback;
$this->p = $param;
diff --git a/src/decorators/Decorator.php b/src/decorators/Decorator.php
index 73e9324c..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)
@@ -44,7 +29,7 @@ class Decorator
*/
public static function get_sanitized_value(&$var, array &$fields, ?string $esc = null)
{
- if (\is_a($var, 'PHPPgAdmin\Decorators\Decorator')) {
+ if ($var instanceof self) {
$val = $var->value($fields);
} else {
$val = &$var;
@@ -71,12 +56,12 @@ class Decorator
}
/**
- * @param \Closure|\Closure|\Closure $callback
- * @param (mixed|string)[]|null $params
+ * @param \Closure $callback
+ * @param (mixed|string)[]|null $params
*/
- public static function callback($callback, ?array $params = null)
+ public static function callback(\Closure $callback, ?array $params = null)
{
- return new \PHPPgAdmin\Decorators\CallbackDecorator($callback, $params);
+ return new CallbackDecorator($callback, $params);
}
/**
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/PostgresDoc74.php b/src/help/PostgresDoc.php
index b606df36..b82f1102 100644
--- a/src/help/PostgresDoc74.php
+++ b/src/help/PostgresDoc.php
@@ -8,15 +8,26 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 7.4 documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class PostgresDoc74
+class PostgresDoc
{
use \PHPPgAdmin\Traits\HelperTrait;
+ /**
+ * @var float
+ */
protected $major_version;
- protected $help_page;
+ /**
+ * @var array
+ */
+ protected $help_topics;
+ /**
+ * @var array
+ */
protected $conf;
public function __construct($conf, $major_version)
@@ -25,7 +36,7 @@ class PostgresDoc74
$this->conf = $conf;
// TODO: Check and fix links
- $this->help_page = [
+ $this->help_topics = [
'pg.database' => 'managing-databases.html',
'pg.database.create' => ['sql-createdatabase.html', 'manage-ag-createdb.html'],
'pg.database.alter' => 'sql-alterdatabase.html',
@@ -172,8 +183,27 @@ class PostgresDoc74
return \sprintf(\str_replace('http://', 'https://', $this->conf['help_base']), (string) ($this->major_version));
}
- public function getHelpPage()
+ /**
+ * Undocumented function.
+ *
+ * @param null|string $topic
+ *
+ * @return null|string|string[]
+ */
+ public function getHelpTopics(?string $topic = null)
{
- return $this->help_page;
+ return $topic ? $this->help_topics[$topic] ?? null : $this->help_topics;
+ }
+
+ /**
+ * Undocumented function.
+ *
+ * @param string $topic
+ *
+ * @return null|string|string[]
+ */
+ public function getHelpTopic(string $topic)
+ {
+ return $this->help_topics[$topic] ?? null;
}
}
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/PostgresDoc80.php b/src/help/PostgresDoc80.php
deleted file mode 100644
index cbf7f87f..00000000
--- a/src/help/PostgresDoc80.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/**
- * PHPPgAdmin 6.0.0
- */
-
-namespace PHPPgAdmin\Help;
-
-/**
- * Help links for PostgreSQL 8.0 documentation.
- *
- * Release: PostgresDoc80.php,v 1.5 2005/02/16 10:27:44 jollytoad Exp $
- */
-class PostgresDoc80 extends PostgresDoc74
-{
- public function __construct($conf, $major_version)
- {
- parent::__construct($conf, $major_version);
-
- $this->help_page['pg.column.add'][0] = 'ddl-alter.html#AEN2217';
- $this->help_page['pg.column.drop'][0] = 'ddl-alter.html#AEN2226';
-
- $this->help_page['pg.constraint.add'] = 'ddl-alter.html#AEN2217';
- $this->help_page['pg.constraint.check'] = 'ddl-constraints.html#AEN1978';
- $this->help_page['pg.constraint.drop'] = 'ddl-alter.html#AEN2226';
- $this->help_page['pg.constraint.primary_key'] = 'ddl-constraints.html#AEN2055';
- $this->help_page['pg.constraint.unique_key'] = 'ddl-constraints.html#AEN2033';
-
- $this->help_page['pg.domain'] = 'extend-type-system.html#AEN27940';
-
- $this->help_page['pg.function'][2] = 'sql-expressions.html#AEN1652';
-
- $this->help_page['pg.operator'][2] = 'sql-expressions.html#AEN1623';
- }
-}
diff --git a/src/help/PostgresDoc81.php b/src/help/PostgresDoc81.php
deleted file mode 100644
index b5fe8916..00000000
--- a/src/help/PostgresDoc81.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/**
- * PHPPgAdmin 6.0.0
- */
-
-namespace PHPPgAdmin\Help;
-
-/**
- * Help links for PostgreSQL 8.1 documentation.
- *
- * Release: PostgresDoc81.php,v 1.3 2006/12/28 04:26:55 xzilla Exp $
- */
-class PostgresDoc81 extends PostgresDoc80
-{
- public function __construct($conf, $major_version)
- {
- parent::__construct($conf, $major_version);
-
- $this->help_page['pg.role'] = 'user-manag.html';
- $this->help_page['pg.role.create'] = ['sql-createrole.html', 'user-manag.html#DATABASE-ROLES'];
- $this->help_page['pg.role.alter'] = ['sql-alterrole.html', 'role-attributes.html'];
- $this->help_page['pg.role.drop'] = ['sql-droprole.html', 'user-manag.html#DATABASE-ROLES'];
- }
-}
diff --git a/src/help/PostgresDoc82.php b/src/help/PostgresDoc82.php
deleted file mode 100644
index b5abc90a..00000000
--- a/src/help/PostgresDoc82.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-/**
- * PHPPgAdmin 6.0.0
- */
-
-namespace PHPPgAdmin\Help;
-
-/**
- * Help links for PostgreSQL 8.2 documentation.
- *
- * Release: PostgresDoc82.php,v 1.3 2007/11/30 15:27:26 soranzo Exp $
- */
-class PostgresDoc82 extends PostgresDoc81
-{
- public function __construct($conf, $major_version)
- {
- parent::__construct($conf, $major_version);
- }
-}
diff --git a/src/help/PostgresDoc83.php b/src/help/PostgresDoc83.php
deleted file mode 100644
index 1a931bcf..00000000
--- a/src/help/PostgresDoc83.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-/**
- * PHPPgAdmin 6.0.0
- */
-
-namespace PHPPgAdmin\Help;
-
-/**
- * Help links for PostgreSQL 8.3 documentation.
- *
- * Release: PostgresDoc83.php,v 1.3 2008/03/17 21:35:48 ioguix Exp $
- */
-class PostgresDoc83 extends PostgresDoc82
-{
- public function __construct($conf, $major_version)
- {
- parent::__construct($conf, $major_version);
-
- $this->help_page['pg.fts'] = 'textsearch.html';
-
- $this->help_page['pg.ftscfg'] = 'textsearch-intro.html#TEXTSEARCH-INTRO-CONFIGURATIONS';
- $this->help_page['pg.ftscfg.example'] = 'textsearch-configuration.html';
- $this->help_page['pg.ftscfg.drop'] = 'sql-droptsconfig.html';
- $this->help_page['pg.ftscfg.create'] = 'sql-createtsconfig.html';
- $this->help_page['pg.ftscfg.alter'] = 'sql-altertsconfig.html';
-
- $this->help_page['pg.ftsdict'] = 'textsearch-dictionaries.html';
- $this->help_page['pg.ftsdict.drop'] = 'sql-droptsdictionary.html';
- $this->help_page['pg.ftsdict.create'] = ['sql-createtsdictionary.html', 'sql-createtstemplate.html'];
- $this->help_page['pg.ftsdict.alter'] = 'sql-altertsdictionary.html';
-
- $this->help_page['pg.ftsparser'] = 'textsearch-parsers.html';
- }
-}
diff --git a/src/help/PostgresDoc84.php b/src/help/PostgresDoc84.php
deleted file mode 100644
index a9ece52b..00000000
--- a/src/help/PostgresDoc84.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-/**
- * PHPPgAdmin 6.0.0
- */
-
-namespace PHPPgAdmin\Help;
-
-/**
- * Help links for PostgreSQL 8.4 documentation.
- *
- * Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
- */
-class PostgresDoc84 extends PostgresDoc83
-{
- public function __construct($conf, $major_version)
- {
- parent::__construct($conf, $major_version);
- }
-}
diff --git a/src/help/PostgresDoc90.php b/src/help/PostgresDoc90.php
index ad1419a0..fb1493f6 100644
--- a/src/help/PostgresDoc90.php
+++ b/src/help/PostgresDoc90.php
@@ -10,8 +10,10 @@ 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 PostgresDoc84
+class PostgresDoc90 extends PostgresDoc
{
public function __construct($conf, $major_version)
{
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 b0ba548d..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
{
@@ -17,6 +19,6 @@ class PostgresDoc92 extends PostgresDoc91
{
parent::__construct($conf, $major_version);
- $this->help_page['pg.rule.view'] = 'rules-views.html';
+ $this->help_topics['pg.rule.view'] = 'rules-views.html';
}
}
diff --git a/src/help/PostgresDoc93.php b/src/help/PostgresDoc93.php
index 8fef2fdb..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
{
@@ -17,13 +19,13 @@ class PostgresDoc93 extends PostgresDoc92
{
parent::__construct($conf, $major_version);
- $this->help_page['pg.matview'] = 'sql-creatematerializedview.html';
+ $this->help_topics['pg.matview'] = 'sql-creatematerializedview.html';
- $this->help_page['pg.matview.create'] = 'sql-creatematerializedview.html';
- $this->help_page['pg.matview.drop'] = 'sql-dropmaterializedview.html';
- $this->help_page['pg.matview.alter'] = 'sql-altermaterializedview.html';
- $this->help_page['pg.matview.refresh'] = 'sql-refreshmaterializedview.html';
+ $this->help_topics['pg.matview.create'] = 'sql-creatematerializedview.html';
+ $this->help_topics['pg.matview.drop'] = 'sql-dropmaterializedview.html';
+ $this->help_topics['pg.matview.alter'] = 'sql-altermaterializedview.html';
+ $this->help_topics['pg.matview.refresh'] = 'sql-refreshmaterializedview.html';
- $this->help_page['pg.rule.matview'] = 'rules-materializedviews.html';
+ $this->help_topics['pg.rule.matview'] = 'rules-materializedviews.html';
}
}
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 84adff6b..139b6f05 100644
--- a/src/lib.inc.php
+++ b/src/lib.inc.php
@@ -4,23 +4,43 @@
* PHPPgAdmin 6.0.0
*/
+use Slim\App;
+
\defined('BASE_PATH') || \define('BASE_PATH', \dirname(__DIR__));
-\defined('THEME_PATH') || \define('THEME_PATH', BASE_PATH . '/assets/themes');
+\defined('THEME_PATH') || \define('THEME_PATH', \dirname(__DIR__) . '/assets/themes');
// Enforce PHP environment
\ini_set('arg_separator.output', '&amp;');
-if (!\is_writable(BASE_PATH . '/temp')) {
+if (!\is_writable(\dirname(__DIR__) . '/temp')) {
die('Your temp folder must have write permissions (use chmod 777 temp -R on linux)');
}
-require_once BASE_PATH . '/vendor/autoload.php';
-$subfolder = '';
-// Check to see if the configuration file exists, if not, explain
-if (\file_exists(BASE_PATH . '/config.inc.php')) {
+require_once \dirname(__DIR__) . '/vendor/autoload.php';
+
+$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 BASE_PATH . '/config.inc.php';
+ include_once \dirname(__DIR__) . '/config.inc.php';
if (isset($conf['subfolder']) && \is_string($conf['subfolder'])) {
$subfolder = $conf['subfolder'];
@@ -30,96 +50,54 @@ if (\file_exists(BASE_PATH . '/config.inc.php')) {
$subfolder = \str_replace(
$_SERVER['DOCUMENT_ROOT'],
'',
- BASE_PATH
+ \dirname(__DIR__)
);
}
-} else {
- die('Configuration error: Copy config.inc.php-dist to config.inc.php and edit appropriately.');
-}
-\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');
-
-if ($shouldSetSession && \PHP_SAPI !== 'cli') {
- \session_set_cookie_params(0, '/', $_SERVER['HTTP_HOST'], isset($_SERVER['HTTPS']));
- \session_name('PPA_ID');
- \session_start();
-}
-$debugmode = (!isset($conf['debugmode'])) ? false : (bool) ($conf['debugmode']);
-\defined('DEBUGMODE') || \define('DEBUGMODE', $debugmode);
-
-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');
-}
+ $conf['subfolder'] = $subfolder;
-if (DEBUGMODE) {
- \ini_set('display_errors', 'On');
+ $conf['debugmode'] = (!isset($conf['debugmode'])) ? false : (bool) ($conf['debugmode']);
- \ini_set('display_startup_errors', 'On');
- \ini_set('opcache.revalidate_freq', '0');
- \error_reporting(\E_ALL);
+ if ($conf['debugmode']) {
+ \ini_set('display_startup_errors', 'On');
+ \ini_set('opcache.revalidate_freq', '0');
+ \error_reporting(\E_ALL);
- if (\array_key_exists('register_debuggers', $conf) && \is_callable($conf['register_debuggers'])) {
- $conf['register_debuggers']();
+ if (\array_key_exists('register_debuggers', $conf) && \is_callable($conf['register_debuggers'])) {
+ $conf['register_debuggers']();
+ }
}
-}
-
-// Fetch App and DI Container
-[$container, $app] = \PHPPgAdmin\ContainerUtils::createContainer($conf);
-if (!$container instanceof \Psr\Container\ContainerInterface) {
- \trigger_error('App Container must be an instance of \\Psr\\Container\\ContainerInterface', \E_USER_ERROR);
-}
+ $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);
-// 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 ($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)
- );
+ // Fetch App and DI Container
+ $app = \PHPPgAdmin\ContainerUtils::getAppInstance($conf);
- $body = $response->getBody(); //new \Slim\Http\Body(fopen('php://temp', 'r+'));
- $body->write($output);
+ return $app;
+}
- return $response
- ->withStatus($status)
- ->withHeader('Content-type', 'text/html')
- ->withBody($body);
- };
-};
+function containerInstance(): \PHPPgAdmin\ContainerUtils
+{
+ $app = getAppInstance();
+ $container = $app->getContainer();
-// 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 (!$container instanceof \PHPPgAdmin\ContainerUtils) {
+ \trigger_error('App Container must be an instance of \\Slim\\Container', \E_USER_ERROR);
+ }
-$container['action'] = $_REQUEST['action'] ?? '';
+ return $container;
+}
-if (!isset($msg)) {
- $msg = '';
+function requestInstance(): \Slim\Http\Request
+{
+ return \containerInstance()->request;
}
-$container['msg'] = $msg;
-//ddd($container->misc);
+function responseInstance(): \Slim\Http\Response
+{
+ return \containerInstance()->response;
+}
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 20d9909a..b7bf4df4 100644
--- a/src/router.php
+++ b/src/router.php
@@ -5,35 +5,41 @@
*/
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
) {
- //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();
$misc = $this->misc;
- $loginShared = $request->getParsedBodyParam('loginShared');
- $loginServer = $request->getParsedBodyParam('loginServer');
+ $loginShared = $request->getParsedBodyParam('loginShared');
+ $loginServer = $request->getParsedBodyParam('loginServer');
$loginUsername = $request->getParsedBodyParam('loginUsername');
$loginPassword = $request->getParsedBodyParam('loginPassword_' . \md5($loginServer));
@@ -49,6 +55,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()));
@@ -60,41 +67,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);
+ $subject = (isset($args['subject'])) ? $args['subject'] : 'root';
+ $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'];
@@ -107,36 +109,31 @@ $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);
}
- $className = '\PHPPgAdmin\Controller\\' . \ucfirst($subject) . 'Controller';
+ $className = '\PHPPgAdmin\Controller\\' . \ucfirst($subject) . 'Controller';
$controller = new $className($this);
return $controller->render();
});
$app->get('/{subject:\w+}[/{server_id}]', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
- $subject,
- $server_id = null
+ array $args
) {
- $subject = (isset($args['subject'])) ? $args['subject'] : 'intro';
+ $subject = $args['subject'] ?? 'intro';
+ $server_id = $args['server_id'] ?? $request->getQueryParam('server');
//ddd($subject, $server_id);
$_server_info = $this->misc->getServerInfo();
- $server_id = $request->getQueryParam('server');
-
//$this->utils->prtrace($_server_info);
if (!isset($_server_info['username'])) {
@@ -152,11 +149,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';
@@ -167,19 +161,17 @@ $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'];
+ $filepath = \dirname(__DIR__) . '/' . $args['path'];
$query_string = $request->getUri()->getQuery();
//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 2fc5b033..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;
@@ -57,7 +57,7 @@ trait AdminTrait
}
echo '<input type="hidden" name="action" value="cluster" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"cluster\" value=\"{$this->lang['strcluster']}\" />\n"; //TODO
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \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;
@@ -113,7 +113,7 @@ trait AdminTrait
echo "<p><input type=\"checkbox\" id=\"reindex_force\" name=\"reindex_force\" /><label for=\"reindex_force\">{$this->lang['strforce']}</label></p>" . \PHP_EOL;
}
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"reindex\" value=\"{$this->lang['strreindex']}\" />\n"; //TODO
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \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;
@@ -164,7 +163,7 @@ trait AdminTrait
}
}
echo '<input type="hidden" name="action" value="analyze" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"analyze\" value=\"{$this->lang['stranalyze']}\" />\n"; //TODO
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \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;
@@ -213,7 +212,7 @@ trait AdminTrait
}
}
echo '<input type="hidden" name="action" value="vacuum" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<p><input type=\"checkbox\" id=\"vacuum_full\" name=\"vacuum_full\" /> <label for=\"vacuum_full\">{$this->lang['strfull']}</label></p>" . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"vacuum_analyze\" name=\"vacuum_analyze\" /> <label for=\"vacuum_analyze\">{$this->lang['stranalyze']}</label></p>" . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"vacuum_freeze\" name=\"vacuum_freeze\" /> <label for=\"vacuum_freeze\">{$this->lang['strfreeze']}</label></p>" . \PHP_EOL;
@@ -286,10 +285,10 @@ trait AdminTrait
$old_val['autovacuum_vacuum_cost_limit'] = '';
}
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
- echo $this->misc->form;
+ 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 '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
+ echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo "<br />\n<br />\n<table>" . \PHP_EOL;
echo "\t<tr><td>&nbsp;</td>" . \PHP_EOL;
@@ -321,7 +320,7 @@ trait AdminTrait
echo '<br />';
echo '<br />';
echo "<input type=\"submit\" name=\"save\" value=\"{$this->lang['strsave']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
@@ -351,8 +350,8 @@ trait AdminTrait
echo "<form style=\"float: left\" action=\"{$script}\" method=\"post\">" . \PHP_EOL;
echo '<input type="hidden" name="action" value="delautovac" />' . \PHP_EOL;
- echo $this->misc->form;
- echo '<input type="hidden" name="table" value="', \htmlspecialchars($_REQUEST['table']), '" />' . \PHP_EOL;
+ echo $this->view->form;
+ echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo '<input type="hidden" name="rel" value="', \htmlspecialchars(\serialize([$_REQUEST['schema'], $_REQUEST['table']])), '" />' . \PHP_EOL;
echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \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,10 +707,10 @@ 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->misc->form;
+ echo $this->view->form;
echo $table_hidden_inputs;
echo "<input type=\"submit\" value=\"{$this->lang['strvacuum']}\" /></p>" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -672,9 +718,9 @@ 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->misc->form;
+ echo $this->view->form;
echo $table_hidden_inputs;
echo "<input type=\"submit\" value=\"{$this->lang['stranalyze']}\" /></p>" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -685,9 +731,9 @@ 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->misc->form;
+ echo $this->view->form;
echo $table_hidden_inputs;
echo "<input type=\"submit\" value=\"{$this->lang['strreindex']}\" /></p>" . \PHP_EOL;
echo '</form>' . \PHP_EOL;
@@ -803,12 +849,15 @@ 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 .= $this->misc->form;
+ $reclusterconf .= '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ $reclusterconf .= $this->view->form;
$reclusterconf .= $table_hidden_inputs;
if ('table' === $type && !$data->alreadyClustered($_REQUEST['object'])) {
@@ -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 ad8bbb11..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
);
@@ -202,7 +202,7 @@ trait ExportTrait
{
$content = '<p><input type="hidden" name="action" value="export" />' . \PHP_EOL;
- $content .= $this->misc->form;
+ $content .= $this->view->form;
$content .= \sprintf(
'<input type="hidden" name="subject" value="%s" />%s',
$subject,
diff --git a/src/traits/FormTrait.php b/src/traits/FormTrait.php
index dfcd12b1..b6089083 100644
--- a/src/traits/FormTrait.php
+++ b/src/traits/FormTrait.php
@@ -23,7 +23,7 @@ trait FormTrait
*/
public function getActionTableAndButtons($action, $table, $add, $cancel)
{
- $content = $this->misc->form;
+ $content = $this->view->form;
$content .= \sprintf('<input type="hidden" name="action" value="%s" />%s', $action, \PHP_EOL);
$content .= \sprintf('<input type="hidden" name="table" value="%s" />%s', $table, \PHP_EOL);
$content .= \sprintf('<input type="submit" value="%s" />%s', $add, \PHP_EOL);
@@ -41,7 +41,7 @@ trait FormTrait
*/
public function getFormInputsAndButtons($inputs, $buttons, $cheboxes = [])
{
- $content = $this->misc->form;
+ $content = $this->view->form;
foreach ($cheboxes as $checkbox) {
$content .= \sprintf('<p>%s', \PHP_EOL);
diff --git a/src/traits/HelperTrait.php b/src/traits/HelperTrait.php
index 347366d1..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
@@ -50,10 +27,10 @@ trait HelperTrait
*/
public function halt($msg = 'An error has happened'): void
{
- $body = $this->container->responseobj->getBody();
+ $body = \responseInstance()->getBody();
$body->write($msg);
- throw new \Slim\Exception\SlimException($this->container->requestobj, $this->container->responseobj);
+ throw new \Slim\Exception\SlimException(\requestInstance(), \responseInstance());
}
public static function getBackTrace($offset = 0)
@@ -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 8adb912b..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(\PHPPgAdmin\Traits\HelperTrait::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;', \PHPPgAdmin\Traits\HelperTrait::br2ln($str)));
+ $out = \nl2br(\str_replace(' ', '&nbsp;', ContainerUtils::br2ln($str)));
break;
case 'verbatim':
@@ -331,7 +332,7 @@ trait MiscTrait
break;
case 'prettysize':
- $out = \PHPPgAdmin\Traits\HelperTrait::formatSizeUnits($str, $lang);
+ $out = self::formatSizeUnits($str, $lang);
break;
@@ -345,7 +346,7 @@ trait MiscTrait
$out = \htmlspecialchars($str);
} else {
//$tag = 'span';
- $out = \nl2br(\htmlspecialchars(\PHPPgAdmin\Traits\HelperTrait::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 ca93a1d5..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();
}
@@ -137,9 +138,9 @@ trait ViewsMatviewsTrait
echo '<p><input type="hidden" name="action" value="selectrows" />' . \PHP_EOL;
echo '<input type="hidden" name="view" value="', \htmlspecialchars($_REQUEST[$this->keystring]), '" />' . \PHP_EOL;
echo '<input type="hidden" name="subject" value="view" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" name=\"select\" accesskey=\"r\" value=\"{$this->lang['strselect']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
return;
@@ -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;
@@ -204,9 +205,9 @@ trait ViewsMatviewsTrait
echo "</td>\n</tr>" . \PHP_EOL;
echo '</table>' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="set_params_create" />' . \PHP_EOL;
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strnext']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \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;
@@ -460,9 +462,9 @@ trait ViewsMatviewsTrait
echo '<input type="hidden" name="formTables[]" value="' . \htmlspecialchars(\serialize($curTable)) . '" />' . \PHP_EOL;
}
- echo $this->misc->form;
+ echo $this->view->form;
echo "<input type=\"submit\" value=\"{$this->lang['strcreate']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" /></p>" . \PHP_EOL;
+ echo \sprintf('<input type="submit" name="cancel" value="%s" /></p>%s', $this->lang['strcancel'], \PHP_EOL);
echo '</form>' . \PHP_EOL;
}
diff --git a/src/translations/AbstractLang.php b/src/translations/AbstractLang.php
new file mode 100644
index 00000000..84a6ee92
--- /dev/null
+++ b/src/translations/AbstractLang.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * PHPPgAdmin 6.0.0
+ */
+
+namespace PHPPgAdmin\Translations;
+
+/**
+ * Class providing translation for Ukrainian language.
+ */
+abstract class AbstractLang
+{
+ /**
+ * @var array
+ */
+ protected $lang = [];
+
+ /**
+ * @return array
+ */
+ public function getLang(): array
+ {
+ return $this->lang;
+ }
+}
diff --git a/src/translations/Afrikaans.php b/src/translations/Afrikaans.php
index 97743ec8..4a29df04 100644
--- a/src/translations/Afrikaans.php
+++ b/src/translations/Afrikaans.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Afrikaans language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Afrikaans extends English
+class Afrikaans extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Afrikaans';
diff --git a/src/translations/Arabic.php b/src/translations/Arabic.php
index 5451b041..2bd22f60 100644
--- a/src/translations/Arabic.php
+++ b/src/translations/Arabic.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Arabic language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Arabic extends English
+class Arabic extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'عربي';
diff --git a/src/translations/Catalan.php b/src/translations/Catalan.php
index 1af8e393..962f8803 100644
--- a/src/translations/Catalan.php
+++ b/src/translations/Catalan.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Catalan language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Catalan extends English
+class Catalan extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Català';
diff --git a/src/translations/ChineseSim.php b/src/translations/ChineseSim.php
index 47c3d69a..7226d468 100644
--- a/src/translations/ChineseSim.php
+++ b/src/translations/ChineseSim.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseSim language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class ChineseSim extends English
+class ChineseSim extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = '简体中文(统一码)';
diff --git a/src/translations/ChineseTr.php b/src/translations/ChineseTr.php
index afabcc6b..e6769dbf 100644
--- a/src/translations/ChineseTr.php
+++ b/src/translations/ChineseTr.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseTr language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class ChineseTr extends English
+class ChineseTr extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = '正體中文(big5)';
diff --git a/src/translations/ChineseUtf8ZhCn.php b/src/translations/ChineseUtf8ZhCn.php
index 9635945c..65e85201 100644
--- a/src/translations/ChineseUtf8ZhCn.php
+++ b/src/translations/ChineseUtf8ZhCn.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseUtf8ZhCn language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class ChineseUtf8ZhCn extends English
+class ChineseUtf8ZhCn extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = '简体中文(统一码)';
diff --git a/src/translations/ChineseUtf8ZhTw.php b/src/translations/ChineseUtf8ZhTw.php
index a0a01a59..7edf1027 100644
--- a/src/translations/ChineseUtf8ZhTw.php
+++ b/src/translations/ChineseUtf8ZhTw.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseUtf8ZhTw language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class ChineseUtf8ZhTw extends English
+class ChineseUtf8ZhTw extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = '正體中文(UTF-8)';
diff --git a/src/translations/Czech.php b/src/translations/Czech.php
index 800026f7..a3a5d3e3 100644
--- a/src/translations/Czech.php
+++ b/src/translations/Czech.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Czech language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Czech extends English
+class Czech extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Česky';
diff --git a/src/translations/Danish.php b/src/translations/Danish.php
index e555c502..2603f9eb 100644
--- a/src/translations/Danish.php
+++ b/src/translations/Danish.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Danish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Danish extends English
+class Danish extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Danish';
diff --git a/src/translations/Dutch.php b/src/translations/Dutch.php
index 80e387fe..26a2137b 100644
--- a/src/translations/Dutch.php
+++ b/src/translations/Dutch.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Dutch language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Dutch extends English
+class Dutch extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Nederlands';
diff --git a/src/translations/English.php b/src/translations/English.php
index 76d11a40..007157a1 100644
--- a/src/translations/English.php
+++ b/src/translations/English.php
@@ -8,11 +8,11 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Ukrainian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class English
+class English extends AbstractLang
{
- protected $lang = [];
-
public function __construct()
{
$lang = $this->lang; // Language and character set
@@ -875,9 +875,4 @@ class English
$this->lang = $lang;
}
-
- public function getLang()
- {
- return $this->lang;
- }
}
diff --git a/src/translations/French.php b/src/translations/French.php
index 7e9eeb89..32047076 100644
--- a/src/translations/French.php
+++ b/src/translations/French.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for French language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class French extends English
+class French extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Français';
diff --git a/src/translations/Galician.php b/src/translations/Galician.php
index 4315c49a..37da8d75 100644
--- a/src/translations/Galician.php
+++ b/src/translations/Galician.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Galician language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Galician extends English
+class Galician extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Galego';
diff --git a/src/translations/German.php b/src/translations/German.php
index 85b71a04..3057dfdd 100644
--- a/src/translations/German.php
+++ b/src/translations/German.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for German language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class German extends English
+class German extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Deutsch';
diff --git a/src/translations/Greek.php b/src/translations/Greek.php
index ff641682..b02b2c17 100644
--- a/src/translations/Greek.php
+++ b/src/translations/Greek.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Greek language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Greek extends English
+class Greek extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Ελληνικά';
diff --git a/src/translations/Hebrew.php b/src/translations/Hebrew.php
index 30d9a913..e92f2818 100644
--- a/src/translations/Hebrew.php
+++ b/src/translations/Hebrew.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Hebrew language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Hebrew extends English
+class Hebrew extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Hebrew';
diff --git a/src/translations/Hungarian.php b/src/translations/Hungarian.php
index a5261eb5..d08856a0 100644
--- a/src/translations/Hungarian.php
+++ b/src/translations/Hungarian.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Hungarian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Hungarian extends English
+class Hungarian extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Magyar';
diff --git a/src/translations/Italian.php b/src/translations/Italian.php
index c0511697..976a143f 100644
--- a/src/translations/Italian.php
+++ b/src/translations/Italian.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Italian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Italian extends English
+class Italian extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Italiano';
diff --git a/src/translations/Japanese.php b/src/translations/Japanese.php
index 3656df58..6af1161e 100644
--- a/src/translations/Japanese.php
+++ b/src/translations/Japanese.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Japanese language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Japanese extends English
+class Japanese extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = '日本語(EUC-JP)';
diff --git a/src/translations/Lithuanian.php b/src/translations/Lithuanian.php
index c72156b0..428d675c 100644
--- a/src/translations/Lithuanian.php
+++ b/src/translations/Lithuanian.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Lithuanian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Lithuanian extends English
+class Lithuanian extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Lietuvių';
diff --git a/src/translations/Mongol.php b/src/translations/Mongol.php
index 34548254..b74aedf4 100644
--- a/src/translations/Mongol.php
+++ b/src/translations/Mongol.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Mongol language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Mongol extends English
+class Mongol extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Mongolian';
diff --git a/src/translations/Polish.php b/src/translations/Polish.php
index b1bdda6d..a40cb2fc 100644
--- a/src/translations/Polish.php
+++ b/src/translations/Polish.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Polish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Polish extends English
+class Polish extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Polski';
diff --git a/src/translations/PortugueseBr.php b/src/translations/PortugueseBr.php
index b2eca20f..d033e61f 100644
--- a/src/translations/PortugueseBr.php
+++ b/src/translations/PortugueseBr.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for PortugueseBr language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class PortugueseBr extends English
+class PortugueseBr extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Português-Brasileiro';
diff --git a/src/translations/PortuguesePt.php b/src/translations/PortuguesePt.php
index 050a6005..3f876f6a 100644
--- a/src/translations/PortuguesePt.php
+++ b/src/translations/PortuguesePt.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for PortuguesePt language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class PortuguesePt extends English
+class PortuguesePt extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Português-Português';
diff --git a/src/translations/Romanian.php b/src/translations/Romanian.php
index 63deb580..77976706 100644
--- a/src/translations/Romanian.php
+++ b/src/translations/Romanian.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Romanian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Romanian extends English
+class Romanian extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Română';
diff --git a/src/translations/Russian.php b/src/translations/Russian.php
index d4171e00..37d4a930 100644
--- a/src/translations/Russian.php
+++ b/src/translations/Russian.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Russian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Russian extends English
+class Russian extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Русский КОИ8';
diff --git a/src/translations/RussianUtf8.php b/src/translations/RussianUtf8.php
index 7ca7d499..4aad8cad 100644
--- a/src/translations/RussianUtf8.php
+++ b/src/translations/RussianUtf8.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for RussianUtf8 language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class RussianUtf8 extends English
+class RussianUtf8 extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Русский (UTF-8)';
diff --git a/src/translations/Slovak.php b/src/translations/Slovak.php
index 7866c7e9..6427a83d 100644
--- a/src/translations/Slovak.php
+++ b/src/translations/Slovak.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Slovak language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Slovak extends English
+class Slovak extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Slovensky';
diff --git a/src/translations/Spanish.php b/src/translations/Spanish.php
index 1794af73..63bb9e18 100644
--- a/src/translations/Spanish.php
+++ b/src/translations/Spanish.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Spanish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Spanish extends English
+class Spanish extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Spanish';
diff --git a/src/translations/Swedish.php b/src/translations/Swedish.php
index 1f9bd1ea..23818a96 100644
--- a/src/translations/Swedish.php
+++ b/src/translations/Swedish.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Swedish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Swedish extends English
+class Swedish extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Swedish';
diff --git a/src/translations/Turkish.php b/src/translations/Turkish.php
index ef1e3a8e..ab32559e 100644
--- a/src/translations/Turkish.php
+++ b/src/translations/Turkish.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Turkish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Turkish extends English
+class Turkish extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Türkçe';
diff --git a/src/translations/Ukrainian.php b/src/translations/Ukrainian.php
index ad6a06cc..5029df01 100644
--- a/src/translations/Ukrainian.php
+++ b/src/translations/Ukrainian.php
@@ -8,10 +8,12 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Ukrainian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
-class Ukrainian extends English
+class Ukrainian extends AbstractLang
{
- public function getLang()
+ public function getLang(): array
{
$lang = $this->lang; // Language and character set
$lang['applang'] = 'Укра╖нська';
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 95f18206..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,10 +44,6 @@ class HTMLHeaderController extends HTMLController
*/
public function printHeader($title = '', $script = null, $do_print = true, $template = 'header.twig')
{
- if (\function_exists('newrelic_disable_autorum')) {
- newrelic_disable_autorum();
- }
-
$lang = $this->lang;
$viewVars = [];
@@ -53,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/tsconfig.json b/tsconfig.json
new file mode 100644
index 00000000..027b4495
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,22 @@
+{
+ "compilerOptions": {
+
+ "target": "es5",
+ "module": "commonjs",
+ "moduleResolution": "node",
+ "keyofStringsOnly": true,
+ "allowJs": true,
+ "checkJs": true,
+ "declarationDir": "types",
+ "declaration": false,
+ //"emitDeclarationOnly": true,
+ "noEmit": true,
+ "outDir": "build",
+
+
+
+ },
+ "exclude": ["node_modules"],
+ "outDir":"build"
+
+}
diff --git a/workbox-config.js b/workbox-config.js
new file mode 100644
index 00000000..6078ae0a
--- /dev/null
+++ b/workbox-config.js
@@ -0,0 +1,20 @@
+module.exports = {
+ "globDirectory": "assets/",
+ "globPatterns": [
+ "**/*.{css,eot,svg,png,js,xml,ico,jpg,gif,swf,html,css}"
+ ],
+ "swDest": "assets/sw.js",
+ "swSrc": "assets/sw.dev.js",
+
+
+ globIgnores: [
+
+ "cbpapi/**",
+ "cbpfactor/**",
+ "css/**",
+ "js/**",
+ "*.json",
+
+ "../workbox-config.js",
+ ]
+};
diff --git a/yarn.lock b/yarn.lock
index bad763d9..f57af271 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,119 +2,159 @@
# yarn lockfile v1
-"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"
- integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==
+"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
+ integrity sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==
dependencies:
- "@babel/highlight" "^7.8.3"
+ "@babel/highlight" "^7.10.4"
-"@babel/generator@^7.8.4":
- version "7.8.4"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e"
- integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA==
+"@babel/generator@^7.11.5":
+ version "7.11.6"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.6.tgz#b868900f81b163b4d464ea24545c61cbac4dc620"
+ integrity sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==
dependencies:
- "@babel/types" "^7.8.3"
+ "@babel/types" "^7.11.5"
jsesc "^2.5.1"
- lodash "^4.17.13"
source-map "^0.5.0"
-"@babel/helper-function-name@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca"
- integrity sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==
+"@babel/helper-function-name@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz#d2d3b20c59ad8c47112fa7d2a94bc09d5ef82f1a"
+ integrity sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==
dependencies:
- "@babel/helper-get-function-arity" "^7.8.3"
- "@babel/template" "^7.8.3"
- "@babel/types" "^7.8.3"
+ "@babel/helper-get-function-arity" "^7.10.4"
+ "@babel/template" "^7.10.4"
+ "@babel/types" "^7.10.4"
-"@babel/helper-get-function-arity@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5"
- integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==
+"@babel/helper-get-function-arity@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz#98c1cbea0e2332f33f9a4661b8ce1505b2c19ba2"
+ integrity sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==
dependencies:
- "@babel/types" "^7.8.3"
+ "@babel/types" "^7.10.4"
-"@babel/helper-split-export-declaration@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9"
- integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==
+"@babel/helper-split-export-declaration@^7.11.0":
+ version "7.11.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f"
+ integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==
dependencies:
- "@babel/types" "^7.8.3"
+ "@babel/types" "^7.11.0"
-"@babel/highlight@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797"
- integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==
+"@babel/helper-validator-identifier@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2"
+ integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==
+
+"@babel/highlight@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143"
+ integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==
dependencies:
+ "@babel/helper-validator-identifier" "^7.10.4"
chalk "^2.0.0"
- esutils "^2.0.2"
js-tokens "^4.0.0"
-"@babel/parser@^7.0.0", "@babel/parser@^7.8.3", "@babel/parser@^7.8.4":
- version "7.8.4"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8"
- integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw==
-
-"@babel/template@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8"
- integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==
- dependencies:
- "@babel/code-frame" "^7.8.3"
- "@babel/parser" "^7.8.3"
- "@babel/types" "^7.8.3"
-
-"@babel/traverse@^7.0.0":
- version "7.8.4"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c"
- integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg==
- dependencies:
- "@babel/code-frame" "^7.8.3"
- "@babel/generator" "^7.8.4"
- "@babel/helper-function-name" "^7.8.3"
- "@babel/helper-split-export-declaration" "^7.8.3"
- "@babel/parser" "^7.8.4"
- "@babel/types" "^7.8.3"
+"@babel/parser@^7.10.4", "@babel/parser@^7.11.5", "@babel/parser@^7.7.0":
+ version "7.11.5"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037"
+ integrity sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==
+
+"@babel/template@^7.10.4":
+ version "7.10.4"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278"
+ integrity sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==
+ dependencies:
+ "@babel/code-frame" "^7.10.4"
+ "@babel/parser" "^7.10.4"
+ "@babel/types" "^7.10.4"
+
+"@babel/traverse@^7.7.0":
+ version "7.11.5"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.5.tgz#be777b93b518eb6d76ee2e1ea1d143daa11e61c3"
+ integrity sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ==
+ dependencies:
+ "@babel/code-frame" "^7.10.4"
+ "@babel/generator" "^7.11.5"
+ "@babel/helper-function-name" "^7.10.4"
+ "@babel/helper-split-export-declaration" "^7.11.0"
+ "@babel/parser" "^7.11.5"
+ "@babel/types" "^7.11.5"
debug "^4.1.0"
globals "^11.1.0"
- lodash "^4.17.13"
+ lodash "^4.17.19"
-"@babel/types@^7.0.0", "@babel/types@^7.8.3":
- version "7.8.3"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c"
- integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==
+"@babel/types@^7.10.4", "@babel/types@^7.11.0", "@babel/types@^7.11.5", "@babel/types@^7.7.0":
+ version "7.11.5"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.5.tgz#d9de577d01252d77c6800cee039ee64faf75662d"
+ integrity sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==
dependencies:
- esutils "^2.0.2"
- lodash "^4.17.13"
+ "@babel/helper-validator-identifier" "^7.10.4"
+ lodash "^4.17.19"
to-fast-properties "^2.0.0"
-acorn-jsx@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.1.0.tgz#294adb71b57398b0680015f0a38c563ee1db5384"
- integrity sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==
+"@eslint/eslintrc@^0.1.3":
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.1.3.tgz#7d1a2b2358552cc04834c0979bd4275362e37085"
+ integrity sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==
+ dependencies:
+ ajv "^6.12.4"
+ debug "^4.1.1"
+ espree "^7.3.0"
+ globals "^12.1.0"
+ ignore "^4.0.6"
+ import-fresh "^3.2.1"
+ js-yaml "^3.13.1"
+ lodash "^4.17.19"
+ minimatch "^3.0.4"
+ strip-json-comments "^3.1.1"
-acorn@^7.1.0:
- version "7.1.0"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c"
- integrity sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==
+"@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==
-ajv@^6.10.0, ajv@^6.10.2:
- version "6.12.0"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7"
- integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==
+"@types/jquery@^3.5.1":
+ version "3.5.1"
+ resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.5.1.tgz#cebb057acf5071c40e439f30e840c57a30d406c3"
+ integrity sha512-Tyctjh56U7eX2b9udu3wG853ASYP0uagChJcQJXLUXEU6C/JiW5qt5dl8ao01VRj1i5pgXPAf8f1mq4+FDLRQg==
+ dependencies:
+ "@types/sizzle" "*"
+
+"@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==
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
-ansi-escapes@^4.2.1:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.0.tgz#a4ce2b33d6b214b7950d8595c212f12ac9cc569d"
- integrity sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==
- dependencies:
- type-fest "^0.8.1"
+ansi-colors@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
+ integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
+
+ansi-regex@^2.0.0:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
+ integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8=
ansi-regex@^4.1.0:
version "4.1.0"
@@ -126,6 +166,11 @@ ansi-regex@^5.0.0:
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
+ansi-styles@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
+ integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=
+
ansi-styles@^3.2.0, ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
@@ -133,6 +178,14 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1:
dependencies:
color-convert "^1.9.0"
+ansi-styles@^4.1.0:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359"
+ integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==
+ dependencies:
+ "@types/color-name" "^1.1.1"
+ color-convert "^2.0.1"
+
argparse@^1.0.7:
version "1.0.10"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
@@ -145,18 +198,83 @@ astral-regex@^1.0.0:
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
-babel-eslint@^10.0.3:
- version "10.0.3"
- resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.3.tgz#81a2c669be0f205e19462fed2482d33e4687a88a"
- integrity sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA==
+babel-code-frame@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b"
+ integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=
+ dependencies:
+ chalk "^1.1.3"
+ esutils "^2.0.2"
+ js-tokens "^3.0.2"
+
+babel-eslint@^10.1.0:
+ version "10.1.0"
+ resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232"
+ integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==
dependencies:
"@babel/code-frame" "^7.0.0"
- "@babel/parser" "^7.0.0"
- "@babel/traverse" "^7.0.0"
- "@babel/types" "^7.0.0"
+ "@babel/parser" "^7.7.0"
+ "@babel/traverse" "^7.7.0"
+ "@babel/types" "^7.7.0"
eslint-visitor-keys "^1.0.0"
resolve "^1.12.0"
+babel-messages@^6.23.0:
+ version "6.23.0"
+ resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
+ integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=
+ dependencies:
+ babel-runtime "^6.22.0"
+
+babel-runtime@^6.22.0, babel-runtime@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
+ integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4=
+ dependencies:
+ core-js "^2.4.0"
+ regenerator-runtime "^0.11.0"
+
+babel-template@^6.8.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"
+ integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=
+ dependencies:
+ babel-runtime "^6.26.0"
+ babel-traverse "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ lodash "^4.17.4"
+
+babel-traverse@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
+ integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=
+ dependencies:
+ babel-code-frame "^6.26.0"
+ babel-messages "^6.23.0"
+ babel-runtime "^6.26.0"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+ debug "^2.6.8"
+ globals "^9.18.0"
+ invariant "^2.2.2"
+ lodash "^4.17.4"
+
+babel-types@^6.26.0, babel-types@^6.8.1:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
+ integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=
+ dependencies:
+ babel-runtime "^6.26.0"
+ esutils "^2.0.2"
+ lodash "^4.17.4"
+ to-fast-properties "^1.0.3"
+
+babylon@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
+ integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==
+
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
@@ -175,7 +293,18 @@ callsites@^3.0.0:
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
-chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2:
+chalk@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
+ integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=
+ dependencies:
+ ansi-styles "^2.2.1"
+ escape-string-regexp "^1.0.2"
+ has-ansi "^2.0.0"
+ strip-ansi "^3.0.0"
+ supports-color "^2.0.0"
+
+chalk@^2.0.0:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
@@ -184,22 +313,13 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
-chardet@^0.7.0:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
- integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
-
-cli-cursor@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
- integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
+chalk@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
+ integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
dependencies:
- restore-cursor "^3.1.0"
-
-cli-width@^2.0.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
- integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=
+ ansi-styles "^4.1.0"
+ supports-color "^7.1.0"
color-convert@^1.9.0:
version "1.9.3"
@@ -208,35 +328,57 @@ color-convert@^1.9.0:
dependencies:
color-name "1.1.3"
+color-convert@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+ dependencies:
+ color-name "~1.1.4"
+
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+color-name@~1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
-cross-spawn@^6.0.5:
- version "6.0.5"
- resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
- integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
+core-js@^2.4.0:
+ version "2.6.11"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.11.tgz#38831469f9922bded8ee21c9dc46985e0399308c"
+ integrity sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==
+
+cross-spawn@^7.0.2:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
+ integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
+ dependencies:
+ path-key "^3.1.0"
+ shebang-command "^2.0.0"
+ which "^2.0.1"
+
+debug@^2.6.8:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
dependencies:
- nice-try "^1.0.4"
- path-key "^2.0.1"
- semver "^5.5.0"
- shebang-command "^1.2.0"
- which "^1.2.9"
+ ms "2.0.0"
-debug@^4.0.1, debug@^4.1.0:
+debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
dependencies:
ms "^2.1.1"
-deep-is@~0.1.3:
+deep-is@^0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
@@ -253,66 +395,77 @@ emoji-regex@^7.0.1:
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
-emoji-regex@^8.0.0:
- version "8.0.0"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
- integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
+enquirer@^2.3.5:
+ version "2.3.6"
+ resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
+ integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==
+ dependencies:
+ ansi-colors "^4.1.1"
-escape-string-regexp@^1.0.5:
+errno@^0.1.1:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618"
+ integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==
+ dependencies:
+ prr "~1.0.1"
+
+escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "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.10.0:
- version "6.10.0"
- resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz#7b15e303bf9c956875c948f6b21500e48ded6a7f"
- integrity sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg==
+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"
-eslint-plugin-prettier@^3.1.2:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba"
- integrity sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA==
+eslint-plugin-prettier@^3.1.4:
+ version "3.1.4"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz#168ab43154e2ea57db992a2cd097c828171f75c2"
+ integrity sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==
dependencies:
prettier-linter-helpers "^1.0.0"
-eslint-scope@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9"
- integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==
+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.1.0"
estraverse "^4.1.1"
-eslint-utils@^1.4.3:
- version "1.4.3"
- resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
- integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==
+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==
dependencies:
eslint-visitor-keys "^1.1.0"
-eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
- integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
+eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
+ version "1.3.0"
+ 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@^6.8.0:
- version "6.8.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb"
- integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==
+eslint@^7.8.1:
+ version "7.8.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.8.1.tgz#e59de3573fb6a5be8ff526c791571646d124a8fa"
+ integrity sha512-/2rX2pfhyUG0y+A123d0ccXtMm7DV7sH1m3lk9nk2DZ2LReq39FXHueR9xZwshE5MdfSf0xunSaMWRqyIA6M1w==
dependencies:
"@babel/code-frame" "^7.0.0"
+ "@eslint/eslintrc" "^0.1.3"
ajv "^6.10.0"
- chalk "^2.1.0"
- cross-spawn "^6.0.5"
+ chalk "^4.0.0"
+ cross-spawn "^7.0.2"
debug "^4.0.1"
doctrine "^3.0.0"
- eslint-scope "^5.0.0"
- eslint-utils "^1.4.3"
- eslint-visitor-keys "^1.1.0"
- espree "^6.1.2"
- esquery "^1.0.1"
+ enquirer "^2.3.5"
+ eslint-scope "^5.1.0"
+ eslint-utils "^2.1.0"
+ eslint-visitor-keys "^1.3.0"
+ espree "^7.3.0"
+ esquery "^1.2.0"
esutils "^2.0.2"
file-entry-cache "^5.0.1"
functional-red-black-tree "^1.0.1"
@@ -321,76 +474,70 @@ eslint@^6.8.0:
ignore "^4.0.6"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
- inquirer "^7.0.0"
is-glob "^4.0.0"
js-yaml "^3.13.1"
json-stable-stringify-without-jsonify "^1.0.1"
- levn "^0.3.0"
- lodash "^4.17.14"
+ levn "^0.4.1"
+ lodash "^4.17.19"
minimatch "^3.0.4"
- mkdirp "^0.5.1"
natural-compare "^1.4.0"
- optionator "^0.8.3"
+ optionator "^0.9.1"
progress "^2.0.0"
- regexpp "^2.0.1"
- semver "^6.1.2"
- strip-ansi "^5.2.0"
- strip-json-comments "^3.0.1"
+ regexpp "^3.1.0"
+ semver "^7.2.1"
+ strip-ansi "^6.0.0"
+ strip-json-comments "^3.1.0"
table "^5.2.3"
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
-espree@^6.1.2:
- version "6.1.2"
- resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d"
- integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==
+espree@^7.3.0:
+ version "7.3.0"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.0.tgz#dc30437cf67947cf576121ebd780f15eeac72348"
+ integrity sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==
dependencies:
- acorn "^7.1.0"
- acorn-jsx "^5.1.0"
- eslint-visitor-keys "^1.1.0"
+ acorn "^7.4.0"
+ acorn-jsx "^5.2.0"
+ eslint-visitor-keys "^1.3.0"
esprima@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
-esquery@^1.0.1:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.1.0.tgz#c5c0b66f383e7656404f86b31334d72524eddb48"
- integrity sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==
+esquery@^1.2.0:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57"
+ integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==
dependencies:
- estraverse "^4.0.0"
+ estraverse "^5.1.0"
esrecurse@^4.1.0:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
- integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
+ integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==
dependencies:
- estraverse "^4.1.0"
+ estraverse "^5.2.0"
-estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1:
+estraverse@^4.1.1:
version "4.3.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
+estraverse@^5.1.0, estraverse@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"
+ integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==
+
esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
-external-editor@^3.0.3:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
- integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
- dependencies:
- chardet "^0.7.0"
- iconv-lite "^0.4.24"
- tmp "^0.0.33"
-
fast-deep-equal@^3.1.1:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4"
- integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
+ integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
fast-diff@^1.1.2:
version "1.2.0"
@@ -402,18 +549,11 @@ fast-json-stable-stringify@^2.0.0:
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
-fast-levenshtein@~2.0.6:
+fast-levenshtein@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
-figures@^3.0.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
- integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
- dependencies:
- escape-string-regexp "^1.0.5"
-
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"
@@ -431,9 +571,9 @@ flat-cache@^2.0.1:
write "1.0.3"
flatted@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08"
- integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
+ integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
fs.realpath@^1.0.0:
version "1.0.0"
@@ -451,9 +591,9 @@ get-stdin@^6.0.0:
integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==
glob-parent@^5.0.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2"
- integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
+ integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==
dependencies:
is-glob "^4.0.1"
@@ -475,30 +615,55 @@ globals@^11.1.0:
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
globals@^12.1.0:
- version "12.3.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-12.3.0.tgz#1e564ee5c4dded2ab098b0f88f24702a3c56be13"
- integrity sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==
+ version "12.4.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8"
+ integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==
dependencies:
type-fest "^0.8.1"
+globals@^9.18.0:
+ version "9.18.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
+ integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==
+
+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:
+ ansi-regex "^2.0.0"
+
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
-iconv-lite@^0.4.24:
- version "0.4.24"
- resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
- integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
- dependencies:
- safer-buffer ">= 2.1.2 < 3"
+has-flag@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+
+he@^1.1.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
+ integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
ignore@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
-import-fresh@^3.0.0:
+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 "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==
@@ -524,24 +689,12 @@ inherits@2:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
-inquirer@^7.0.0:
- version "7.0.4"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.4.tgz#99af5bde47153abca23f5c7fc30db247f39da703"
- integrity sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==
- dependencies:
- ansi-escapes "^4.2.1"
- chalk "^2.4.2"
- cli-cursor "^3.1.0"
- cli-width "^2.0.0"
- external-editor "^3.0.3"
- figures "^3.0.0"
- lodash "^4.17.15"
- mute-stream "0.0.8"
- run-async "^2.2.0"
- rxjs "^6.5.3"
- string-width "^4.1.0"
- strip-ansi "^5.1.0"
- through "^2.3.6"
+invariant@^2.2.2:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
+ integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
+ dependencies:
+ loose-envify "^1.0.0"
is-extglob@^2.1.1:
version "2.1.1"
@@ -553,11 +706,6 @@ is-fullwidth-code-point@^2.0.0:
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
-is-fullwidth-code-point@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
- integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
-
is-glob@^4.0.0, is-glob@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
@@ -565,25 +713,25 @@ is-glob@^4.0.0, is-glob@^4.0.1:
dependencies:
is-extglob "^2.1.1"
-is-promise@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
- integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=
-
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
-js-tokens@^4.0.0:
+"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+js-tokens@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
+ integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
+
js-yaml@^3.13.1:
- version "3.13.1"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
- integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
+ version "3.14.0"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
+ integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
@@ -603,23 +751,112 @@ json-stable-stringify-without-jsonify@^1.0.1:
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
-levn@^0.3.0, levn@~0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
- integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=
+less@^3.9.0:
+ version "3.12.2"
+ resolved "https://registry.yarnpkg.com/less/-/less-3.12.2.tgz#157e6dd32a68869df8859314ad38e70211af3ab4"
+ integrity sha512-+1V2PCMFkL+OIj2/HrtrvZw0BC0sYLMICJfbQjuj/K8CEnlrFX6R5cKKgzzttsZDHyxQNL1jqMREjKN3ja/E3Q==
+ dependencies:
+ tslib "^1.10.0"
+ optionalDependencies:
+ errno "^0.1.1"
+ graceful-fs "^4.1.2"
+ image-size "~0.5.0"
+ make-dir "^2.1.0"
+ mime "^1.4.1"
+ native-request "^1.0.5"
+ source-map "~0.6.0"
+
+lessc@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/lessc/-/lessc-1.0.2.tgz#b9bedd7f1953f142bbe70ffc00a2378d19a5152a"
+ integrity sha512-cv7EXQRiD3Cu2Vsy3S9C89G01kOv0TrLQMoWHxscCgkMYdhEvknhaINeQkZbPmUlJ87AEzjPm0y/14Cg9j7/ug==
dependencies:
- prelude-ls "~1.1.2"
- type-check "~0.3.2"
+ less "^3.9.0"
-lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15:
- version "4.17.15"
- resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
- integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
+levn@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
+ integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==
+ dependencies:
+ 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.19, lodash@^4.17.4:
+ version "4.17.20"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
+ integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
-mimic-fn@^2.1.0:
+loose-envify@^1.0.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
+ integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
+ dependencies:
+ js-tokens "^3.0.0 || ^4.0.0"
+
+make-dir@^2.1.0:
version "2.1.0"
- resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
- integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
+ resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
+ integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==
+ dependencies:
+ pify "^4.0.1"
+ semver "^5.6.0"
+
+melody-code-frame@^1.7.5:
+ version "1.7.5"
+ resolved "https://registry.yarnpkg.com/melody-code-frame/-/melody-code-frame-1.7.5.tgz#047eaebfc09c26ab9fcc57c0470b34b46312245a"
+ integrity sha512-q/Do+7ZFxRHLN7IhT5RIJrTKh7xNmX3JG4+AD1ZST9iB8gUPYs6yfgGexDRDvtOAAGgLfFbT1DlMWJtldqYaPQ==
+ dependencies:
+ lodash "^4.15.0"
+
+melody-extension-core@^1.7.5:
+ version "1.7.5"
+ resolved "https://registry.yarnpkg.com/melody-extension-core/-/melody-extension-core-1.7.5.tgz#85b7fc2aaf436e4b7cdc212212eff00d3a81ba08"
+ integrity sha512-eu/ji2sxpKvob03+1bdtuRr9XTW/VdogjHXvHiMYIK5DslpREcdGLVDEVAa1dfnnzoKGso76XCOHTJy0pImRfg==
+ dependencies:
+ babel-template "^6.8.0"
+ babel-types "^6.8.1"
+ lodash "^4.12.0"
+ shortid "^2.2.6"
+
+melody-idom@^1.7.5:
+ version "1.7.5"
+ resolved "https://registry.yarnpkg.com/melody-idom/-/melody-idom-1.7.5.tgz#fdd425476fa963c549272ffc6c2842a84c316dcd"
+ integrity sha512-CsMg+vPyaIs9Wl/pTEgevQs+DfPzEpsNnHcaZNBGgQo3GvLItVgrg3Z8z3obVkPikRrHyRnwBPWIWiRyeh6KHg==
+ dependencies:
+ lodash "^4.12.0"
+
+melody-parser@^1.7.5:
+ version "1.7.5"
+ resolved "https://registry.yarnpkg.com/melody-parser/-/melody-parser-1.7.5.tgz#6f10e02f194159792a2f83d51e8790ba6ce71141"
+ integrity sha512-ffWDWl76G3lgTQUZ3SqGY0oZeul9FrKAnV+8+j3+afrS7AjBC32w5H+Imi00+qcOgdkpoU3eWwisqKc+pQmQ8g==
+ dependencies:
+ he "^1.1.0"
+ lodash "^4.12.0"
+ melody-code-frame "^1.7.5"
+
+melody-runtime@^1.7.5:
+ version "1.7.5"
+ resolved "https://registry.yarnpkg.com/melody-runtime/-/melody-runtime-1.7.5.tgz#af6c93017b9874df5bd81168d75adc20ac5e9730"
+ integrity sha512-SmkH57Y6FYn+NP15dES85zmhYsjsvVmvh3euLeMuAPWwqqSm28AIZ9btPpkDUCDu/L7JAQ8dTaflbpeDgBwnPQ==
+ dependencies:
+ lodash "^4.12.0"
+
+melody-traverse@^1.7.5:
+ version "1.7.5"
+ resolved "https://registry.yarnpkg.com/melody-traverse/-/melody-traverse-1.7.5.tgz#b40b80331c47aa483b477c7fbebd1400e21d8e59"
+ integrity sha512-k9agECp5qEyIDybedgMNHPalb6wfwy5WlczJriOAn/swggeoq3+HojXSABo3uKM7K8xXNmpVhW/wOJA86oqjIQ==
+
+melody-types@^1.7.5:
+ version "1.7.5"
+ resolved "https://registry.yarnpkg.com/melody-types/-/melody-types-1.7.5.tgz#6de13f2c6f9504db890a3261a49fc18a26e31018"
+ integrity sha512-KkZmYlkmHtK10Hyx0mVNBZg1OXctIzZo2w3Vyc5AOV+KLA5lRiG6Z3Lp+G8o1LD6UZY0PC83/57hw3gs2Qj+Tg==
+ dependencies:
+ babel-types "^6.8.1"
+
+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==
minimatch@^3.0.4:
version "3.0.4"
@@ -628,38 +865,43 @@ minimatch@^3.0.4:
dependencies:
brace-expansion "^1.1.7"
-minimist@0.0.8:
- version "0.0.8"
- resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
- integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
+minimist@^1.2.5:
+ version "1.2.5"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
+ integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
mkdirp@^0.5.1:
- version "0.5.1"
- resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
- integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
+ version "0.5.5"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
+ integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
dependencies:
- minimist "0.0.8"
+ minimist "^1.2.5"
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+ integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
ms@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
-mute-stream@0.0.8:
- version "0.0.8"
- resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
- integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
+nanoid@^2.1.0:
+ version "2.1.11"
+ resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280"
+ integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==
+
+native-request@^1.0.5:
+ version "1.0.7"
+ resolved "https://registry.yarnpkg.com/native-request/-/native-request-1.0.7.tgz#ff742dc555b4c8f2f1c14b548639ba174e573856"
+ integrity sha512-9nRjinI9bmz+S7dgNtf4A70+/vPhnd+2krGpy4SUlADuOuSa24IDkNaZ+R/QT1wQ6S8jBdi6wE7fLekFZNfUpQ==
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
-nice-try@^1.0.4:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
- integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
-
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
@@ -667,29 +909,17 @@ once@^1.3.0:
dependencies:
wrappy "1"
-onetime@^5.1.0:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5"
- integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==
- dependencies:
- mimic-fn "^2.1.0"
-
-optionator@^0.8.3:
- version "0.8.3"
- resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
- integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==
+optionator@^0.9.1:
+ version "0.9.1"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499"
+ integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==
dependencies:
- deep-is "~0.1.3"
- fast-levenshtein "~2.0.6"
- levn "~0.3.0"
- prelude-ls "~1.1.2"
- type-check "~0.3.2"
- word-wrap "~1.2.3"
-
-os-tmpdir@~1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
- integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
+ deep-is "^0.1.3"
+ fast-levenshtein "^2.0.6"
+ levn "^0.4.1"
+ prelude-ls "^1.2.1"
+ type-check "^0.4.0"
+ word-wrap "^1.2.3"
parent-module@^1.0.0:
version "1.0.1"
@@ -703,20 +933,25 @@ path-is-absolute@^1.0.0:
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
-path-key@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
- integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
+path-key@^3.1.0:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
+ integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
path-parse@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
-prelude-ls@~1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
- integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
+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==
+
+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==
prettier-linter-helpers@^1.0.0:
version "1.0.0"
@@ -725,25 +960,53 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
-prettier@^1.19.1:
+prettier-plugin-twig-melody@^0.4.6:
+ version "0.4.6"
+ resolved "https://registry.yarnpkg.com/prettier-plugin-twig-melody/-/prettier-plugin-twig-melody-0.4.6.tgz#0ce8f1fac622105ef3e37cc75799402cf9d325c1"
+ integrity sha512-5/sk+0efzxQ4r4hiZiWVQ6mxqaekeOIbGpwLUUtNjcKpAO4HmWsEzXpCEIdq2GjqrgjuPDlknJaa5g4B5Qx/jg==
+ dependencies:
+ babel-types "^6.26.0"
+ melody-extension-core "^1.7.5"
+ melody-parser "^1.7.5"
+ melody-traverse "^1.7.5"
+ melody-types "^1.7.5"
+ prettier "^1.8.2"
+ resolve "^1.12.0"
+
+prettier@^1.8.2:
version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
+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"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
+prr@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
+ integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY=
+
punycode@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
-regexpp@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
- integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==
+regenerator-runtime@^0.11.0:
+ version "0.11.1"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
+ integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
+
+regexpp@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2"
+ integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==
resolve-from@^4.0.0:
version "4.0.0"
@@ -751,20 +1014,12 @@ resolve-from@^4.0.0:
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
resolve@^1.12.0:
- version "1.15.1"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8"
- integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==
+ version "1.17.0"
+ resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444"
+ integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==
dependencies:
path-parse "^1.0.6"
-restore-cursor@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
- integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
- dependencies:
- onetime "^5.1.0"
- signal-exit "^3.0.2"
-
rimraf@2.6.3:
version "2.6.3"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
@@ -772,51 +1027,34 @@ rimraf@2.6.3:
dependencies:
glob "^7.1.3"
-run-async@^2.2.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
- integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA=
- dependencies:
- is-promise "^2.1.0"
-
-rxjs@^6.5.3:
- version "6.5.4"
- resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c"
- integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==
- dependencies:
- tslib "^1.9.0"
-
-"safer-buffer@>= 2.1.2 < 3":
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
- integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
-
-semver@^5.5.0:
+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@^6.1.2:
- version "6.3.0"
- resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
- integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
+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==
-shebang-command@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
- integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
+shebang-command@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
+ integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==
dependencies:
- shebang-regex "^1.0.0"
+ shebang-regex "^3.0.0"
-shebang-regex@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
- integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
+shebang-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
+ integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
-signal-exit@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
- integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
+shortid@^2.2.6:
+ version "2.2.15"
+ resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.15.tgz#2b902eaa93a69b11120373cd42a1f1fe4437c122"
+ integrity sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==
+ dependencies:
+ nanoid "^2.1.0"
slice-ansi@^2.1.0:
version "2.1.0"
@@ -832,6 +1070,11 @@ source-map@^0.5.0:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
+source-map@~0.6.0:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
+ integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+
sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
@@ -846,16 +1089,14 @@ string-width@^3.0.0:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"
-string-width@^4.1.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
- integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
+strip-ansi@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
+ integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
dependencies:
- emoji-regex "^8.0.0"
- is-fullwidth-code-point "^3.0.0"
- strip-ansi "^6.0.0"
+ ansi-regex "^2.0.0"
-strip-ansi@^5.1.0, strip-ansi@^5.2.0:
+strip-ansi@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
@@ -869,10 +1110,15 @@ strip-ansi@^6.0.0:
dependencies:
ansi-regex "^5.0.0"
-strip-json-comments@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
- integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==
+strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
+ integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
+
+supports-color@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
+ integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
supports-color@^5.3.0:
version "5.5.0"
@@ -881,6 +1127,13 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"
+supports-color@^7.1.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
+ integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
+ dependencies:
+ has-flag "^4.0.0"
+
table@^5.2.3:
version "5.4.6"
resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
@@ -896,60 +1149,63 @@ text-table@^0.2.0:
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
-through@^2.3.6:
- version "2.3.8"
- resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
- integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
-
-tmp@^0.0.33:
- version "0.0.33"
- resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
- integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
- dependencies:
- os-tmpdir "~1.0.2"
+to-fast-properties@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
+ integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=
to-fast-properties@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
-tslib@^1.9.0:
- version "1.11.0"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.0.tgz#f1f3528301621a53220d58373ae510ff747a66bc"
- integrity sha512-BmndXUtiTn/VDDrJzQE7Mm22Ix3PxgLltW9bSNLoeCY31gnG2OPx0QqJnuc9oMIKioYrz487i6K9o4Pdn0j+Kg==
+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==
+
+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.3.2:
- version "0.3.2"
- resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
- integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=
+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==
dependencies:
- prelude-ls "~1.1.2"
+ prelude-ls "^1.2.1"
type-fest@^0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
+typescript@^4.0.3:
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
+ integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==
+
uri-js@^4.2.2:
- version "4.2.2"
- resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
- integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602"
+ integrity sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==
dependencies:
punycode "^2.1.0"
v8-compile-cache@^2.0.3:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e"
- integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745"
+ integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==
-which@^1.2.9:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
- integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
+which@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
+ integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
dependencies:
isexe "^2.0.0"
-word-wrap@~1.2.3:
+word-wrap@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==