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:
authorffflabs <amenadiel@gmail.com>2020-09-11 10:48:07 +0300
committerffflabs <amenadiel@gmail.com>2020-10-19 20:03:43 +0300
commit78b76c8435398cfab1e80fdc29f23f49c2992c74 (patch)
treefc78d27569b4e414cddabfc7c3caacf75d4255cb
parent7ab62d1cdd5e5e0122e2d91c536bf25eb1d32ad6 (diff)
github_action
adds reviewdog, preparing more checks adds reviewdog, preparing more checks adds reviewdog, preparing more checks adds reviewdog, preparing more checks containerutils now extends Slim\Container adds PR ckecks for psalm, phpstan, phpcs and phpmd preparing next deploy removes psalm from scrutinizer next attempt at github actions removing usage of Kint for githu actions cache for style checks cache for style checks cache for style checks cache for style checks cache for style checks cache for style checks after csfixer after csfixer update baselines add rector check remove usage of 'with(...)' from js scripts tiny syntax improvements use flash messages to check for treejs refresh being set first POC of messaging API to propagate query requests and jstree refresh instructions instruction to refresh jsTree must be passed to the view manager, not to Misc adds rector github action ignore rector.php when running code style checks and transforms typo fix formatting of theme css normalize composer passing static analysis passing tests passing tests passing tests
-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--.gitignore13
-rw-r--r--.phive/phars.xml9
-rw-r--r--.php_cs.php7
-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.json143
-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.json19
-rw-r--r--phpstan-baseline.neon492
-rw-r--r--phpstan.neon42
-rw-r--r--psalm-baseline.xml599
-rw-r--r--psalm.xml3
-rw-r--r--rector.php48
-rw-r--r--src/classes/ADONewConnection.php5
-rw-r--r--src/classes/ADORecordSet.php5
-rw-r--r--src/classes/ADOdbException.php73
-rw-r--r--src/classes/Connection.php57
-rw-r--r--src/classes/ContainerHandlers.php146
-rw-r--r--src/classes/ContainerUtils.php357
-rw-r--r--src/classes/Misc.php116
-rw-r--r--src/classes/ViewManager.php180
-rw-r--r--src/controllers/AggregatesController.php10
-rw-r--r--src/controllers/AlldbController.php29
-rw-r--r--src/controllers/BaseController.php70
-rw-r--r--src/controllers/ColpropertiesController.php8
-rw-r--r--src/controllers/ConstraintsController.php4
-rw-r--r--src/controllers/DatabaseController.php70
-rw-r--r--src/controllers/DataexportController.php4
-rw-r--r--src/controllers/DataimportController.php1
-rw-r--r--src/controllers/DbexportController.php2
-rw-r--r--src/controllers/DisplayController.php28
-rw-r--r--src/controllers/DomainsController.php10
-rw-r--r--src/controllers/FulltextController.php26
-rw-r--r--src/controllers/FunctionsController.php43
-rw-r--r--src/controllers/GroupsController.php6
-rw-r--r--src/controllers/HistoryController.php7
-rw-r--r--src/controllers/IndexesController.php10
-rw-r--r--src/controllers/IntroController.php12
-rw-r--r--src/controllers/LoginController.php2
-rw-r--r--src/controllers/MaterializedviewpropertiesController.php10
-rw-r--r--src/controllers/MaterializedviewsController.php25
-rw-r--r--src/controllers/OperatorsController.php2
-rw-r--r--src/controllers/PrivilegesController.php4
-rw-r--r--src/controllers/RolesController.php10
-rw-r--r--src/controllers/RulesController.php4
-rw-r--r--src/controllers/SchemasController.php31
-rw-r--r--src/controllers/SequencesController.php91
-rw-r--r--src/controllers/ServersController.php8
-rw-r--r--src/controllers/SqlController.php5
-rw-r--r--src/controllers/SqleditController.php2
-rw-r--r--src/controllers/TablesController.php122
-rw-r--r--src/controllers/TablespacesController.php6
-rw-r--r--src/controllers/TblpropertiesController.php19
-rw-r--r--src/controllers/TreeController.php12
-rw-r--r--src/controllers/TriggersController.php10
-rw-r--r--src/controllers/TypesController.php16
-rw-r--r--src/controllers/UsersController.php8
-rw-r--r--src/controllers/ViewpropertiesController.php10
-rw-r--r--src/controllers/ViewsController.php25
-rw-r--r--src/database/ADOdbBase.php50
-rw-r--r--src/database/Connection.php177
-rw-r--r--src/database/Postgres.php58
-rw-r--r--src/database/databasetraits/RoleTrait.php6
-rw-r--r--src/database/databasetraits/SequenceTrait.php34
-rw-r--r--src/database/databasetraits/TableTrait.php3
-rw-r--r--src/decorators/ActionUrlDecorator.php2
-rw-r--r--src/decorators/BranchUrlDecorator.php4
-rw-r--r--src/decorators/Decorator.php15
-rw-r--r--src/decorators/RedirectUrlDecorator.php4
-rw-r--r--src/decorators/UrlDecorator.php4
-rw-r--r--src/help/PostgresDoc.php4
-rw-r--r--src/help/PostgresDoc10.php2
-rw-r--r--src/help/PostgresDoc11.php2
-rw-r--r--src/help/PostgresDoc12.php2
-rw-r--r--src/help/PostgresDoc90.php2
-rw-r--r--src/help/PostgresDoc91.php2
-rw-r--r--src/help/PostgresDoc92.php2
-rw-r--r--src/help/PostgresDoc93.php2
-rw-r--r--src/help/PostgresDoc94.php2
-rw-r--r--src/help/PostgresDoc95.php2
-rw-r--r--src/help/PostgresDoc96.php2
-rw-r--r--src/lib.inc.php145
-rw-r--r--src/middleware/PopulateRequestResponse.php33
-rw-r--r--src/router.php56
-rw-r--r--src/traits/AdminTrait.php139
-rw-r--r--src/traits/ExportTrait.php2
-rw-r--r--src/traits/HelperTrait.php35
-rw-r--r--src/traits/InsertEditRowTrait.php4
-rw-r--r--src/traits/MiscTrait.php56
-rw-r--r--src/traits/ViewsMatviewsTrait.php16
-rw-r--r--src/translations/Afrikaans.php2
-rw-r--r--src/translations/Arabic.php2
-rw-r--r--src/translations/Catalan.php2
-rw-r--r--src/translations/ChineseSim.php2
-rw-r--r--src/translations/ChineseTr.php2
-rw-r--r--src/translations/ChineseUtf8ZhCn.php2
-rw-r--r--src/translations/ChineseUtf8ZhTw.php2
-rw-r--r--src/translations/Czech.php2
-rw-r--r--src/translations/Danish.php2
-rw-r--r--src/translations/Dutch.php2
-rw-r--r--src/translations/English.php2
-rw-r--r--src/translations/French.php2
-rw-r--r--src/translations/Galician.php2
-rw-r--r--src/translations/German.php2
-rw-r--r--src/translations/Greek.php2
-rw-r--r--src/translations/Hebrew.php2
-rw-r--r--src/translations/Hungarian.php2
-rw-r--r--src/translations/Italian.php2
-rw-r--r--src/translations/Japanese.php2
-rw-r--r--src/translations/Lithuanian.php2
-rw-r--r--src/translations/Mongol.php2
-rw-r--r--src/translations/Polish.php2
-rw-r--r--src/translations/PortugueseBr.php2
-rw-r--r--src/translations/PortuguesePt.php2
-rw-r--r--src/translations/Romanian.php2
-rw-r--r--src/translations/Russian.php2
-rw-r--r--src/translations/RussianUtf8.php2
-rw-r--r--src/translations/Slovak.php2
-rw-r--r--src/translations/Spanish.php2
-rw-r--r--src/translations/Swedish.php2
-rw-r--r--src/translations/Turkish.php2
-rw-r--r--src/translations/Ukrainian.php2
-rw-r--r--src/xhtml/HTMLController.php28
-rw-r--r--src/xhtml/HTMLFooterController.php2
-rw-r--r--src/xhtml/HTMLHeaderController.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.lock353
177 files changed, 8079 insertions, 3060 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 bc9be95c..ecc5e4cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,7 +27,7 @@ playground
*.log
tests/_output
temp/*.output.txt
-*baseline.*
+
###> Vendor files
node_modules
@@ -36,7 +36,7 @@ vendor
###> Config files other tan examples
config.yml
-.configs/
+.configs
sftp-config*
config.*.php*
!config.inc.php-dist
@@ -47,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.php b/.php_cs.php
index 43d3c524..1c5b6884 100644
--- a/.php_cs.php
+++ b/.php_cs.php
@@ -16,7 +16,6 @@ $header = "PHPPgAdmin {$version}";
$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php71($header), [
'declare_strict_types' => false,
- //'header_comment' => ['commentType' => 'PHPDoc', 'header' => $header],
'escape_implicit_backslashes' => false,
'final_class' => false,
'final_internal_class' => false,
@@ -35,6 +34,7 @@ $config = Config\Factory::fromRuleSet(new Config\RuleSet\Php71($header), [
$config->getFinder()
->ignoreDotFiles(false)
->in(__DIR__)
+ ->notName('rector.php')
->exclude([
'.build',
'.configs',
@@ -43,12 +43,13 @@ $config->getFinder()
'docs',
'node_modules',
'temp',
+ 'rector.php',
'src/router.php',
'vendor',
'.github',
])
- ->name('.php_cs');
+ ->name('.php_cs.php');
-$config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/php_cs.cache');
+$config->setCacheFile(__DIR__ . '/.build/phpcs/csfixer.cache');
return $config;
diff --git a/.phpcs.xml b/.phpcs.xml
new file mode 100644
index 00000000..ad9c46af
--- /dev/null
+++ b/.phpcs.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<ruleset name="Slim coding standard">
+ <description>Slim coding standard</description>
+ <file>lib</file>
+
+ <exclude-pattern>*/lib/_(boilerplate|bootstrap)\.php$</exclude-pattern>
+ <!-- display progress -->
+ <arg value="p"/>
+ <!-- use colors in output -->
+ <arg name="colors"/>
+
+ <!-- inherit rules from: -->
+ <rule ref="PSR2"/>
+ <rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
+
+ <!-- Paths to check -->
+ <file>Slim</file>
+ <file>tests</file>
+</ruleset>
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 00000000..65017653
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,42 @@
+{
+ "singleQuote": true,
+ "semi": true,
+ "tabWidth": 2,
+ "useTabs": false,
+ "trailingComma": "es5",
+ "overrides": [
+ {
+ "files": "*.json",
+ "options": {
+ "useTabs": false,
+ "parser": "json"
+ }
+ },
+ {
+ "files": "*.scss",
+ "options": {
+ "useTabs": false,
+ "parser": "scss"
+ }
+ },
+ {
+ "files": "*.less",
+ "options": {
+ "useTabs": false,
+ "parser": "less"
+ }
+ }
+ ],
+ "twigPrintWidth": 120,
+ "twigMultiTags": [
+ "if,endif",
+ "nav,endnav",
+ "switch,case,default,endswitch",
+ "ifchildren,endifchildren",
+ "cache,endcache",
+ "js,endjs"
+ ],
+ "plugins": [
+ "./node_modules/prettier-plugin-twig-melody"
+ ]
+} \ No newline at end of file
diff --git a/.reviewdog.yml b/.reviewdog.yml
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 eb2a8fe6..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.php --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 ;\
@@ -127,57 +102,6 @@ var_dumper:
@echo ""
-
-psalm:
- @${MAKE} disable_xdebug --no-print-directory
- @if [ ! -f "vendor/bin/psalm" ]; then \
- echo -e "$(GREEN)psalm$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
- echo -e "Install it with $(GREEN)composer require --dev vimeo/psalm$(WHITE)" ;\
- exit 0 ;\
- fi
-
- @mkdir -p .build/psalm ;\
- vendor/bin/psalm --show-info=false --long-progress --threads=2 --config=psalm.xml | tee temp/psalm.output.txt
- @${MAKE} enable_xdebug new_status=$(XDSWI_STATUS) --no-print-directory ;\
- echo ""
-
-phpstan:
- @${MAKE} disable_xdebug --no-print-directory
- @if [ ! -f "vendor/bin/phpstan" ]; then \
- echo -e "$(GREEN)phpstan$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
- echo -e "Install it with $(GREEN)composer require --dev phpstan/phpstan$(WHITE)" ;\
- exit 0 ;\
- fi
-
- @mkdir -p .build/phpstan ;\
- ./vendor/bin/phpstan analyse --memory-limit=2G --configuration phpstan.neon | tee temp/phpstan.output.txt
- @${MAKE} enable_xdebug new_status=$(XDSWI_STATUS) --no-print-directory ;\
- echo ""
-
-lint:
- @if [ -f "vendor/bin/parallel-lint" ]; then \
- mkdir -p .build/parallel ;\
- ${MAKE} disable_xdebug --no-print-directory ;\
- vendor/bin/parallel-lint --ignore-fails --exclude vendor src ;\
- ${MAKE} enable_xdebug new_status=$(XDSWI_STATUS) --no-print-directory;\
- else \
- echo -e "$(GREEN)parallel-lint$(WHITE) is $(RED)NOT$(WHITE) installed. " ;\
- echo -e "Install it with $(GREEN)composer require --dev php-parallel-lint/php-parallel-lint$(WHITE)" ;\
- fi
- @find ./src -name \*.php -print0 | xargs -0 -n 1 php -l
- @echo ""
-
-update_baselines:
- @${MAKE} disable_xdebug --no-print-directory ;\
- find .build/phpstan -mtime +5 -type f -name "*.php" -exec rm -rf {} \;
- @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
-
-
-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 3df8ff02..c831afea 100644
--- a/composer.json
+++ b/composer.json
@@ -1,72 +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"
- },
- "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-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 92f92bd6..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": {
+ "@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",
- "prettier": "^2.1.1"
- }
+ "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 8f96d6e8..12731493 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,3 +1,5 @@
+includes:
+ - phpstan-baseline.neon
parameters:
@@ -8,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
@@ -27,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 03fcae93..d2938f69 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -3,6 +3,7 @@
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"
@@ -13,7 +14,7 @@
<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 74c3f989..2d0e9ec0 100644
--- a/src/classes/ADORecordSet.php
+++ b/src/classes/ADORecordSet.php
@@ -7,11 +7,6 @@
namespace PHPPgAdmin;
/**
- * @file
- * Extends ADORecordSet to let correct inference on PHPDoc params
- */
-
-/**
* Extends ADORecordSet to let correct inference on PHPDoc params.
*/
class ADORecordSet extends \ADORecordSet implements \Countable
diff --git a/src/classes/ADOdbException.php b/src/classes/ADOdbException.php
index 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/Connection.php b/src/classes/Connection.php
index c63ffe21..7654d503 100644
--- a/src/classes/Connection.php
+++ b/src/classes/Connection.php
@@ -49,19 +49,23 @@ class Connection
*/
private $pgVersion;
+ /**
+ * @var string
+ */
+ private $_captured_error;
+
private $adodb_driver = 'postgres9';
- // or pdo
// The backend platform. Set to UNKNOWN by default.
private $_connection_result;
/**
* Creates a new connection. Will actually make a database connection.
*
- * @param array $server_info
- * @param string $database database name
- * @param \Slim\Container $container
- * @param int $fetchMode Defaults to associative. Override for different behaviour
+ * @param array $server_info
+ * @param string $database database name
+ * @param \PHPPgAdmin\ContainerUtils $container
+ * @param int $fetchMode Defaults to associative. Override for different behaviour
*/
public function __construct($server_info, $database, $container, $fetchMode = ADODB_FETCH_ASSOC)
{
@@ -75,37 +79,15 @@ class Connection
$this->container = $container;
- // ADODB_Postgres9 Approach
- //$driver='postgres9';
- $this->conn = \ADONewConnection($this->adodb_driver);
+ $this->conn = 'pdo' === $this->adodb_driver ?
+ $this->getPDOConnection($host, $port, $sslmode, $database, $user, $password, $fetchMode) :
+ $this->getPG9Connection($host, $port, $sslmode, $database, $user, $password, $fetchMode);
$this->conn->setFetchMode($fetchMode);
- // PDO Approach
-
- /*try {
- $this->_connection_result = $this->conn->connect($pghost, $user, $password, $database);
- $this->prtrace(['_connection_result' => $this->_connection_result, 'conn' => $this->conn]);
- } catch (\PHPPgAdmin\ADOdbException $e) {
- $this->prtrace(['message' => $e->getMessage(), 'trace' => $e->getTraceAsString()]);
- */
- try {
- $connectionResult = 'pdo' === $this->adodb_driver ?
- $this->getPDOConnection($host, $port, $sslmode, $database, $user, $password, $fetchMode) :
- $this->getPG9Connection($host, $port, $sslmode, $database, $user, $password, $fetchMode);
-
- //$this->prtrace($this->conn);
- } catch (\Exception $e) {
- //dump($dsnString, $this->adodb_driver);
- $this->prtrace($e->getMessage(), \array_slice($e->getTrace(), 0, 10));
- }
+ //$this->prtrace($this->conn);
}
- public function getConnectionResult()
- {
- return $this->_connection_result;
- }
-
- public function getVersion()
+ public function getVersion(): string
{
return $this->pgVersion;
}
@@ -124,6 +106,7 @@ class Connection
return null;
}
$serverInfo = $this->conn->ServerInfo();
+ $this->dump($serverInfo);
$this->pgVersion = $serverInfo['version'];
$description = "PostgreSQL {$this->pgVersion}";
@@ -171,8 +154,7 @@ class Connection
?string $user,
?string $password,
int $fetchMode = \ADODB_FETCH_ASSOC
- ): \ADODB_postgres9
- {
+ ): \ADODB_postgres9 {
$this->conn = ADONewConnection('postgres9');
$this->conn->setFetchMode($fetchMode);
// Ignore host if null
@@ -192,8 +174,10 @@ class Connection
} elseif ('legacy' === $sslmode) {
$pghost .= ' requiressl=1';
}
+ \ob_start();
+ $this->_connection_result = $this->conn->connect($pghost, $user, $password, $database);
- $this->conn->connect($pghost, $user, $password, $database);
+ $this->_captured_error = \ob_get_clean();
return $this->conn;
}
@@ -206,8 +190,7 @@ class Connection
?string $user,
?string $password,
int $fetchMode = \ADODB_FETCH_ASSOC
- ): \ADODB_pdo
- {
+ ): \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);
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 008214ff..dffc30e0 100644
--- a/src/classes/ContainerUtils.php
+++ b/src/classes/ContainerUtils.php
@@ -6,169 +6,144 @@
namespace PHPPgAdmin;
-use Slim\App;
-use Slim\Container;
-
-\defined('BASE_PATH') || \define('BASE_PATH', \dirname(__DIR__, 2));
-\defined('THEME_PATH') || \define('THEME_PATH', BASE_PATH . '/assets/themes');
-
-\defined('DEBUGMODE') || \define('DEBUGMODE', false);
-\defined('IN_TEST') || \define('IN_TEST', false);
+use Psr\Container\ContainerInterface;
+use Slim\Collection;
+use Slim\DefaultServicesProvider;
/**
- * A class that adds convenience methods to the container.
+ * @property array $deploy_info
+ * @property \Slim\Flash\Messages $flash
+ * @property \GuzzleHttp\Client $fcIntranetClient
+ * @property \PHPPgAdmin\Misc $misc
+ * @property \PHPPgAdmin\ViewManager $view
+ * @property \Slim\Http\Request $request
+ * @property \Slim\Http\Response $response
+ * @property string $BASE_PATH
+ * @property string $THEME_PATH
+ * @property string $subFolder
+ * @property bool $DEBUGMODE
+ * @property bool $IN_TEST
+ * @property string $server
+ * @property string $database
+ * @property string $schema
+ * @property
*/
-class ContainerUtils
+class ContainerUtils extends \Slim\Container implements ContainerInterface
{
use \PHPPgAdmin\Traits\HelperTrait;
- /**
- * @var string
- */
- const BASE_PATH = BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = PHPPGA_SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = DEBUGMODE;
-
- /**
- * @var string
- */
- const THEME_PATH = THEME_PATH;
/**
- * @var \Slim\Container
+ * @var null|self
*/
- protected $container;
+ private static $instance;
/**
- * @var App
+ * $appInstance.
+ *
+ * @var null|\Slim\App
*/
- protected $_app;
+ private static $appInstance;
/**
+ * Default settings.
+ *
* @var array
*/
- protected $conf;
+ private $defaultSettings = [
+ 'httpVersion' => '1.1',
+ 'responseChunkSize' => 4096,
+ 'outputBuffering' => 'append',
+ 'determineRouteBeforeAppMiddleware' => false,
+ 'displayErrorDetails' => false,
+ 'addContentLengthHeader' => true,
+ 'routerCacheFile' => false,
+ ];
/**
- * @var self
+ * Undocumented variable.
+ *
+ * @var array
*/
- protected static $_instance;
+ private static $envConfig = [
+ 'BASE_PATH' => '',
+ 'subFolder' => '',
+ 'DEBUGMODE' => false,
+ 'THEME_PATH' => '',
+ ];
/**
- * Constructor of the ContainerUtils class.
+ * @param array $values the parameters or objects
*/
- public function __construct()
+ final public function __construct(array $values = [])
{
- $composerinfo = \json_decode(\file_get_contents(BASE_PATH . '/composer.json'));
- $appVersion = $composerinfo->extra->version;
-
- $phpMinVer = (\str_replace(['<', '>', '='], '', $composerinfo->require->php));
- //$this->prtrace($appVersion);
- //$this->dump($composerinfo);
- $settings = [
- 'determineRouteBeforeAppMiddleware' => true,
- 'base_path' => self::BASE_PATH,
- 'subfolder' => self::SUBFOLDER,
- 'debug' => self::DEBUGMODE,
-
- // Configuration file version. If this is greater than that in config.inc.php, then
- // the app will refuse to run. This and $conf['version'] should be incremented whenever
- // backwards incompatible changes are made to config.inc.php-dist.
- 'base_version' => 61,
- // Application version
- 'appVersion' => 'v' . $appVersion,
- // Application name
- 'appName' => 'phpPgAdmin6',
-
- // PostgreSQL and PHP minimum version
- 'postgresqlMinVer' => '9.3',
- 'phpMinVer' => $phpMinVer,
- 'displayErrorDetails' => self::DEBUGMODE,
- 'addContentLengthHeader' => false,
- ];
-
- if (!self::DEBUGMODE && !IN_TEST) {
- $settings['routerCacheFile'] = self::BASE_PATH . '/temp/route.cache.php';
- }
- $config = [
- 'msg' => '',
- 'appThemes' => [
- 'default' => 'Default',
- 'cappuccino' => 'Cappuccino',
- 'gotar' => 'Blue/Green',
- 'bootstrap' => 'Bootstrap3',
- ],
- 'settings' => $settings,
- ];
+ parent::__construct($values);
- $this->_app = new App($config);
+ $userSettings = $values['settings'] ?? [];
+ $this->registerDefaultServices($userSettings);
- // Fetch DI Container
- $container = $this->_app->getContainer();
- $container['utils'] = $this;
- $container['version'] = 'v' . $appVersion;
- $container['errors'] = [];
- $container['requestobj'] = $container['request'];
- $container['responseobj'] = $container['response'];
-
- $this->container = $container;
+ self::$instance = $this;
}
/**
- * Gets the container instance.
+ * Gets the subfolder.
*
- * @throws \Exception (description)
+ * @param string $path The path
*
- * @return \Slim\Container the container instance
+ * @return string the subfolder
*/
- public static function getContainerInstance()
+ public function getSubfolder(string $path = ''): string
{
- $_instance = self::getInstance();
-
- if (!$container = $_instance->container) {
- throw new \Exception('Could not get a container');
- }
-
- return $container;
+ return \implode(\DIRECTORY_SEPARATOR, [$this->subFolder, $path]);
}
- /**
- * Gets the instance.
- */
- public static function getInstance(): self
+ public static function getAppInstance(array $config = []): \Slim\App
{
- if (!$_instance = self::$_instance) {
- self::$_instance = new self();
- $_instance = self::$_instance;
+ $config = \array_merge(self::getDefaultConfig($config['debugmode'] ?? false), $config);
+
+ $container = self::getContainerInstance($config);
+
+ if (!self::$appInstance) {
+ self::$appInstance = new \Slim\App($container);
}
- return $_instance;
+ return self::$appInstance;
}
- /**
- * Creates a container.
- *
- * @param array $conf The conf
- *
- * @return \Slim\App ( description_of_the_return_value )
- */
- public static function createApp($conf)
+ public static function getContainerInstance(array $config = []): self
{
- $_instance = self::getInstance();
+ self::$envConfig = [
+ 'msg' => '',
+ 'appThemes' => [
+ 'default' => 'Default',
+ 'cappuccino' => 'Cappuccino',
+ 'gotar' => 'Blue/Green',
+ 'bootstrap' => 'Bootstrap3',
+ ],
+ 'BASE_PATH' => $config['BASE_PATH'] ?? \dirname(__DIR__, 2),
+ 'subFolder' => $config['subfolder'] ?? '',
+ 'debug' => $config['debugmode'] ?? false,
+ 'THEME_PATH' => $config['theme_path'] ?? \dirname(__DIR__, 2) . '/assets/themes',
+ 'IN_TEST' => $config['IN_TEST'] ?? false,
+ 'webdbLastTab' => [],
+ ];
- $_instance
- ->withConf($conf)
- ->setExtra()
- ->setMisc()
- ->setViews();
+ self::$envConfig = \array_merge(self::$envConfig, $config);
+ if (!self::$instance) {
+ self::$instance = new static(self::$envConfig);
+
+ self::$instance
+ ->withConf(self::$envConfig);
+
+ $handlers = new ContainerHandlers(self::$instance);
+ $handlers->setExtra()
+ ->setMisc()
+ ->setViews()
+ ->storeMainRequestParams()
+ ->setHaltHandler();
+ }
//ddd($container->subfolder);
- return $_instance->_app;
+ return self::$instance;
}
/**
@@ -178,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;
@@ -203,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);
}
}
@@ -219,11 +196,12 @@ class ContainerUtils
*/
public function getDestinationWithLastTab($subject)
{
- $_server_info = $this->container->misc->getServerInfo();
+ $container = self::getContainerInstance();
+ $_server_info = $container->misc->getServerInfo();
$this->addFlash($subject, 'getDestinationWithLastTab');
//$this->prtrace('$_server_info', $_server_info);
// If username isn't set in server_info, you should login
- $url = $this->container->misc->getLastTabURL($subject) ?? ['url' => 'alldb', 'urlvars' => ['subject' => 'server']];
+ $url = $container->misc->getLastTabURL($subject) ?? ['url' => 'alldb', 'urlvars' => ['subject' => 'server']];
$destinationurl = $this->getRedirectUrl();
if (!isset($_server_info['username'])) {
@@ -260,12 +238,39 @@ class ContainerUtils
*/
public function addError(string $errormsg): \Slim\Container
{
- //dump($errormsg);
- $errors = $this->container->get('errors');
+ $container = self::getContainerInstance();
+ $errors = $container->get('errors');
$errors[] = $errormsg;
- $this->container->offsetSet('errors', $errors);
+ $container->offsetSet('errors', $errors);
+
+ return $container;
+ }
+
+ /**
+ * Returns a string with html <br> variant replaced with a new line.
+ *
+ * @param string $msg message to parse (<br> separated)
+ *
+ * @return string parsed message (linebreak separated)
+ */
+ public static function br2ln($msg)
+ {
+ return \str_replace(['<br>', '<br/>', '<br />'], \PHP_EOL, $msg);
+ }
- return $this->container;
+ public static function getDefaultConfig(bool $debug = false): array
+ {
+ return [
+ 'settings' => [
+ 'displayErrorDetails' => $debug,
+ 'determineRouteBeforeAppMiddleware' => true,
+ 'base_path' => \dirname(__DIR__, 2),
+ 'debug' => $debug,
+ 'phpMinVer' => '7.2', // PHP minimum version
+ 'addContentLengthHeader' => false,
+ 'appName' => 'PHPPgAdmin6',
+ ],
+ ];
}
/**
@@ -276,6 +281,12 @@ class ContainerUtils
$container = self::getContainerInstance();
$conf['plugins'] = [];
+ $container->BASE_PATH = $conf['BASE_PATH'];
+ $container->subFolder = $conf['subfolder'];
+ $container->debug = $conf['debugmode'];
+ $container->THEME_PATH = $conf['theme_path'];
+ $container->IN_TEST = $conf['IN_TEST'];
+ $container['errors'] = [];
$container['conf'] = static function (\Slim\Container $c) use ($conf): array {
$display_sizes = $conf['display_sizes'];
@@ -307,82 +318,34 @@ class ContainerUtils
return $conf;
};
- $container->subfolder = self::SUBFOLDER;
- return $this;
- }
-
- /**
- * Sets the views.
- *
- * @return self ( description_of_the_return_value )
- */
- private function setViews()
- {
- $container = self::getContainerInstance();
-
- /**
- * @return \PHPPgAdmin\ViewManager
- */
- $container['view'] = static function (\Slim\Container $c): \PHPPgAdmin\ViewManager {
- $misc = $c->misc;
- $view = new ViewManager(BASE_PATH . '/assets/templates', [
- 'cache' => BASE_PATH . '/temp/twigcache',
- 'auto_reload' => $c->get('settings')['debug'],
- 'debug' => $c->get('settings')['debug'],
- ], $c);
-
- $misc->setView($view);
-
- return $view;
- };
+ $container->subFolder = $conf['subfolder'];
return $this;
}
/**
- * Sets the instance of Misc class.
+ * This function registers the default services that Slim needs to work.
+ *
+ * All services are shared, they are registered such that the
+ * same instance is returned on subsequent calls.
*
- * @return self ( description_of_the_return_value )
+ * @param array $userSettings Associative array of application settings
*/
- private function setMisc()
+ private function registerDefaultServices($userSettings): void
{
- $container = self::getContainerInstance();
+ $defaultSettings = $this->defaultSettings;
+
/**
- * @return \PHPPgAdmin\Misc
+ * This service MUST return an array or an instance of ArrayAccess.
+ *
+ * @return array|ArrayAccess
*/
- $container['misc'] = static function (\Slim\Container $c): \PHPPgAdmin\Misc {
- $misc = new \PHPPgAdmin\Misc($c);
-
- $conf = $c->get('conf');
-
- // 4. Check for theme by server/db/user
- $_server_info = $misc->getServerInfo();
-
- /* starting with PostgreSQL 9.0, we can set the application name */
- if (isset($_server_info['pgVersion']) && 9 <= $_server_info['pgVersion']) {
- \putenv('PGAPPNAME=' . $c->get('settings')['appName'] . '_' . $c->get('settings')['appVersion']);
- }
-
- return $misc;
- };
-
- return $this;
- }
-
- private function setExtra()
- {
- $container = self::getContainerInstance();
- $container['flash'] = static function (): \Slim\Flash\Messages {
- return new \Slim\Flash\Messages();
- };
-
- $container['lang'] = static function (\Slim\Container $c): array {
- $translations = new \PHPPgAdmin\Translations($c);
-
- return $translations->lang;
+ $this['settings'] = static function () use ($userSettings, $defaultSettings): \Slim\Collection {
+ return new Collection(\array_merge($defaultSettings, $userSettings));
};
- return $this;
+ $defaultProvider = new DefaultServicesProvider();
+ $defaultProvider->register($this);
}
}
diff --git a/src/classes/Misc.php b/src/classes/Misc.php
index fbb4b161..841a0ace 100644
--- a/src/classes/Misc.php
+++ b/src/classes/Misc.php
@@ -26,19 +26,6 @@ class Misc
use \PHPPgAdmin\Traits\MiscTrait;
/**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
-
- /**
* @var array
*/
public $appLangFiles = [];
@@ -81,12 +68,12 @@ class Misc
public $postgresqlMinVer;
/**
- * @var \Slim\Views\Twig
+ * @var \PHPPgAdmin\ViewManager
*/
public $view;
/**
- * @var \Slim\Container
+ * @var \PHPPgAdmin\ContainerUtils
*/
protected $container;
@@ -101,11 +88,6 @@ class Misc
private $_no_db_connection = false;
/**
- * @var bool
- */
- private $_reload_browser = false;
-
- /**
* @var null|Postgres
*/
private $_data;
@@ -131,9 +113,9 @@ class Misc
private $_error_msg = '';
/**
- * @param \Slim\Container $container The container
+ * @param \PHPPgAdmin\ContainerUtils $container The container
*/
- public function __construct(\Slim\Container $container)
+ public function __construct(\PHPPgAdmin\ContainerUtils $container)
{
$this->container = $container;
@@ -153,17 +135,17 @@ class Misc
// Check for config file version mismatch
if (!isset($this->conf['version']) || $base_version > $this->conf['version']) {
- $container->get('utils')->addError($this->lang['strbadconfig']);
+ $container->addError($this->lang['strbadconfig']);
}
// Check database support is properly compiled in
if (!\function_exists('pg_connect')) {
- $container->get('utils')->addError($this->lang['strnotloaded']);
+ $container->addError($this->lang['strnotloaded']);
}
// Check the version of PHP
if (\version_compare(\PHP_VERSION, $this->phpMinVer, '<')) {
- $container->get('utils')->addError(\sprintf('Version of PHP not supported. Please upgrade to version %s or later.', $this->phpMinVer));
+ $container->addError(\sprintf('Version of PHP not supported. Please upgrade to version %s or later.', $this->phpMinVer));
}
//$this->dumpAndDie($this);
@@ -210,7 +192,7 @@ class Misc
*/
public function serverToSha()
{
- $request_server = $this->container->requestobj->getParam('server');
+ $request_server = $this->container->request->getParam('server');
if (null === $request_server) {
return null;
@@ -250,39 +232,17 @@ class Misc
/**
* Sets the view instance property of this class.
*
- * @param \Slim\Views\Twig $view view instance
+ * @param \PHPPgAdmin\ViewManager $view view instance
*
* @return \PHPPgAdmin\Misc this class instance
*/
- public function setView(\Slim\Views\Twig $view)
+ public function setView(\PHPPgAdmin\ViewManager $view)
{
$this->view = $view;
return $this;
}
- /**
- * Internally sets the reload browser property.
- *
- * @param bool $flag sets internal $_reload_browser var which will be passed to the footer methods
- *
- * @return \PHPPgAdmin\Misc this class instance
- */
- public function setReloadBrowser($flag)
- {
- $this->_reload_browser = (bool) $flag;
-
- return $this;
- }
-
- /**
- * @return bool
- */
- public function getReloadBrowser()
- {
- return $this->_reload_browser;
- }
-
public function getContainer()
{
return $this->container;
@@ -344,9 +304,9 @@ class Misc
*
* @internal mixed $plaform placeholder that will receive the value of the platform
*
- * @return null|\PHPPgAdmin\Database\Postgres the database accessor instance
+ * @return null|\PHPPgAdmin\Database\Postgres|void the database accessor instance
*/
- public function getDatabaseAccessor($database = '', $server_id = null): ?\PHPPgAdmin\Database\Postgres
+ public function getDatabaseAccessor($database = '', $server_id = null)
{
$lang = $this->lang;
@@ -356,7 +316,7 @@ class Misc
$server_info = $this->getServerInfo($this->_server_id);
- if ($this->_no_db_connection || !isset($server_info['username'])) {
+ if ($this->getNoDBConnection() || !isset($server_info['username'])) {
return null;
}
@@ -372,7 +332,7 @@ class Misc
}
if (!$_connection) {
- $this->container->utils->addError($lang['strloginfailed']);
+ $this->container->addError($lang['strloginfailed']);
$this->setErrorMsg($lang['strloginfailed']);
return null;
@@ -382,14 +342,17 @@ class Misc
// The description of the server is returned in $platform.
$_type = $_connection->getDriver($platform);
- if (null === $_type) {
+ if (null === $_type ?? null) {
$errormsg = \sprintf($lang['strpostgresqlversionnotsupported'], $this->postgresqlMinVer);
- $this->container->utils->addError($errormsg);
+ $this->container->addError($errormsg);
$this->setErrorMsg($errormsg);
return null;
}
- $_type = '\PHPPgAdmin\Database\\' . $_type;
+ /**
+ * @var \class-string<\PHPPgAdmin\Database\Postgres>
+ */
+ $_type = '\\PHPPgAdmin\\Database\\' . $_type;
$this->setServerInfo('platform', $platform, $this->_server_id);
$this->setServerInfo('pgVersion', $_connection->getVersion(), $this->_server_id);
@@ -410,19 +373,18 @@ class Misc
}
}
- if (
- false === $this->_no_db_connection &&
- null !== $this->getDatabase() &&
- isset($_REQUEST['schema'])
+ if (false !== $this->getNoDBConnection() ||
+ null === $this->getDatabase() ||
+ !isset($_REQUEST['schema'])
) {
- $status = $this->_data->setSchema($_REQUEST['schema']);
+ return $this->_data;
+ }
- if (0 !== $status) {
- $this->container->utils->addError($this->lang['strbadschema']);
- $this->setErrorMsg($this->lang['strbadschema']);
+ $status = $this->_data->setSchema($_REQUEST['schema']);
- return null;
- }
+ if (0 !== $status) {
+ $this->container->addError($this->lang['strbadschema']);
+ $this->setErrorMsg($this->lang['strbadschema']);
}
return $this->_data;
@@ -434,9 +396,9 @@ class Misc
* @param string $database
* @param string $server_id
*
- * @return \PHPPgAdmin\Connection
+ * @return null|\PHPPgAdmin\Connection
*/
- public function getConnection(string $database = '', $server_id = null): \PHPPgAdmin\Connection
+ public function getConnection(string $database = '', $server_id = null): ?\PHPPgAdmin\Connection
{
$lang = $this->lang;
@@ -458,8 +420,7 @@ class Misc
'administrator' => 'administrator',
];
- if (
- isset($server_info['username']) &&
+ if (isset($server_info['username']) &&
\array_key_exists(\mb_strtolower($server_info['username']), $bad_usernames)
) {
$msg = $lang['strlogindisallowed'];
@@ -467,8 +428,7 @@ class Misc
throw new \Exception($msg);
}
- if (
- !isset($server_info['password']) ||
+ if (!isset($server_info['password']) ||
'' === $server_info['password']
) {
$msg = $lang['strlogindisallowed'];
@@ -520,8 +480,7 @@ class Misc
$server_string = $info['host'] . ':' . $info['port'] . ':' . $info['sslmode'];
$server_sha = \sha1($server_string);
- if (
- $this->_server_id === $server_string ||
+ if ($this->_server_id === $server_string ||
$this->_server_id === $server_sha
) {
if (isset($info['username'])) {
@@ -529,7 +488,7 @@ class Misc
} elseif (isset($_SESSION['sharedUsername'])) {
$info['username'] = $_SESSION['sharedUsername'];
$info['password'] = $_SESSION['sharedPassword'];
- $this->setReloadBrowser(true);
+ $this->container->get('view')->setReloadBrowser(true);
$this->setServerInfo(null, $info, $this->_server_id);
}
$this->_server_info = $info;
@@ -563,7 +522,7 @@ class Misc
public function setServerInfo($key, $value, $server_id = null): void
{
if (null === $server_id) {
- $server_id = $this->container->requestobj->getParam('server');
+ $server_id = $this->container->request->getParam('server');
}
if (null === $key) {
@@ -589,8 +548,7 @@ class Misc
$server_info = $this->getServerInfo($this->_server_id);
- if (
- null !== $this->_server_id &&
+ if (null !== $this->_server_id &&
isset($server_info['useonlydefaultdb']) &&
true === $server_info['useonlydefaultdb'] &&
isset($server_info['defaultdb'])
diff --git a/src/classes/ViewManager.php b/src/classes/ViewManager.php
index 246448b8..1e79f53d 100644
--- a/src/classes/ViewManager.php
+++ b/src/classes/ViewManager.php
@@ -6,8 +6,6 @@
namespace PHPPgAdmin;
-use Psr\Http\Message\ResponseInterface;
-
/**
* @file
* Class to hold various commonly used functions
@@ -25,24 +23,6 @@ class ViewManager extends \Slim\Views\Twig
use \PHPPgAdmin\Traits\HelperTrait;
/**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
-
- /**
- * @var string
- */
- const THEME_PATH = ContainerUtils::THEME_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
-
- /**
* @var array
*/
public $appLangFiles = [];
@@ -95,10 +75,17 @@ class ViewManager extends \Slim\Views\Twig
public $misc;
/**
- * @var \Slim\Container
+ * @var \PHPPgAdmin\ContainerUtils
*/
protected $container;
+ /**
+ * Undocumented variable.
+ *
+ * @var array
+ */
+ private static $themeFolders = [];
+
private $_connection;
/**
@@ -135,12 +122,11 @@ class ViewManager extends \Slim\Views\Twig
private static $instance;
/**
- * @param \Slim\Container $container The container
- * @param mixed $path
- * @param mixed $settings
- * @param \Slim\Container $c
+ * @param mixed $path
+ * @param mixed $settings
+ * @param \PHPPgAdmin\ContainerUtils $c
*/
- public function __construct($path, $settings, \Slim\Container $c)
+ public function __construct($path, $settings, \PHPPgAdmin\ContainerUtils $c)
{
$this->lang = $c->get('lang');
$this->conf = $c->get('conf');
@@ -155,7 +141,7 @@ class ViewManager extends \Slim\Views\Twig
$this->addExtension(new \Slim\Views\TwigExtension($c['router'], $basePath));
- $this->offsetSet('subfolder', self::SUBFOLDER);
+ $this->offsetSet('subfolder', \containerInstance()->subFolder);
$this->offsetSet('theme', $this->misc->getConf('theme'));
$this->offsetSet('Favicon', $this->icon('Favicon'));
$this->offsetSet('Introduction', $this->icon('Introduction'));
@@ -167,15 +153,46 @@ class ViewManager extends \Slim\Views\Twig
$_theme = $this->getTheme($this->conf, $this->misc->getServerInfo());
- if (isset($_SESSION) && !isset($_SESSION['ppaTheme'])) {
+ // If a theme comes in the request, overwrite whatever theme was set to cookie and settion store
+ if ($_request_theme = $this->getRequestTheme()) {
+ $this->setCookieTheme($_request_theme);
+ $this->setSessionTheme($_request_theme);
+ $_theme = $_request_theme;
+ }
+
+ if (!$this->getSessionTheme() || !$this->getCookieTheme()) {
+ // If there's no session theme, or cookie theme,
+ // store the latest one we determined from request, session,cookie, conf or default
/* save the selected theme in cookie for a year */
\setcookie('ppaTheme', $_theme, \time() + 31536000, '/');
$_SESSION['ppaTheme'] = $_theme;
- $this->misc->setConf('theme', $_theme);
}
+ $this->misc->setConf('theme', $_theme);
}
- public function maybeRenderIframes(ResponseInterface $response, string $subject, string $query_string): ResponseInterface
+ /**
+ * Internally sets the reload browser property.
+ *
+ * @param bool $flag sets internal $_reload_browser var which will be passed to the footer methods
+ *
+ * @return \PHPPgAdmin\ViewManager this class instance
+ */
+ public function setReloadBrowser($flag): self
+ {
+ $this->_reload_browser = (bool) $flag;
+
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function getReloadBrowser(): bool
+ {
+ return $this->_reload_browser;
+ }
+
+ public function maybeRenderIframes(\Slim\Http\Response $response, string $subject, string $query_string): \Slim\Http\Response
{
$c = $this->getContainer();
@@ -212,29 +229,35 @@ class ViewManager extends \Slim\Views\Twig
$_theme = 'default';
// List of themes
$themefolders = $this->getThemeFolders();
+
// Check if theme is in $_REQUEST, $_SESSION or $_COOKIE
// 1.- First priority: $_REQUEST, this happens when you use the selector
if (\array_key_exists('theme', $_REQUEST) &&
- \array_key_exists($_REQUEST['theme'], $themefolders)) {
+ \array_key_exists($_REQUEST['theme'], $themefolders)
+ ) {
$_theme = $_REQUEST['theme'];
} elseif ( // otherwise, see if there's a theme associated with this particular server
null !== $_server_info &&
\array_key_exists('theme', $_server_info) &&
\is_string($_server_info['theme']) &&
- \array_key_exists($_COOKIE['ppaTheme'], $themefolders)) {
+ \array_key_exists($_COOKIE['ppaTheme'], $themefolders)
+ ) {
$_theme = $_server_info['theme'];
} elseif (isset($_SESSION) && \array_key_exists('ppaTheme', $_SESSION) &&
- \array_key_exists($_SESSION['ppaTheme'], $themefolders)) {
+ \array_key_exists($_SESSION['ppaTheme'], $themefolders)
+ ) {
// otherwise check $_SESSION
$_theme = $_SESSION['ppaTheme'];
} elseif (\array_key_exists('ppaTheme', $_COOKIE) &&
- \array_key_exists($_COOKIE['ppaTheme'], $themefolders)) {
+ \array_key_exists($_COOKIE['ppaTheme'], $themefolders)
+ ) {
// oterwise check $_COOKIE
$_theme = $_COOKIE['ppaTheme'];
} elseif ( // see if there's a valid theme set in config file
\array_key_exists('theme', $conf) &&
\is_string($conf['theme']) &&
- \array_key_exists($conf['theme'], $themefolders)) {
+ \array_key_exists($conf['theme'], $themefolders)
+ ) {
$_theme = $conf['theme'];
}
@@ -310,10 +333,10 @@ class ViewManager extends \Slim\Views\Twig
public function getHelpLink($help)
{
return \htmlspecialchars(
- $this->getSubfolder('help?help=') .
- \urlencode($help) .
- '&server=' .
- \urlencode($this->misc->getServerId())
+ $this->container->getSubfolder('help?help=') .
+ \urlencode($help) .
+ '&server=' .
+ \urlencode($this->misc->getServerId())
);
}
@@ -328,35 +351,75 @@ class ViewManager extends \Slim\Views\Twig
$theme = $this->conf['theme'];
$path = 'assets/images/themes';
- $default_icon = \sprintf('%s/%s/default/DisconnectedServer.png', self::SUBFOLDER, $path);
+ $default_icon = \sprintf('%s/%s/default/DisconnectedServer.png', \containerInstance()->subFolder, $path);
- if (\is_readable(\sprintf('%s/%s/%s/%s.png', self::BASE_PATH, $path, $theme, $icon))) {
- return \sprintf('%s/%s/%s/%s.png', self::SUBFOLDER, $path, $theme, $icon);
+ if (\is_readable(\sprintf('%s/%s/%s/%s.png', \containerInstance()->BASE_PATH, $path, $theme, $icon))) {
+ return \sprintf('%s/%s/%s/%s.png', \containerInstance()->subFolder, $path, $theme, $icon);
}
- if (\is_readable(\sprintf('%s/%s/%s/%s.gif', self::BASE_PATH, $path, $theme, $icon))) {
- return \sprintf('%s/%s/%s/%s.gif', self::SUBFOLDER, $path, $theme, $icon);
+ if (\is_readable(\sprintf('%s/%s/%s/%s.gif', \containerInstance()->BASE_PATH, $path, $theme, $icon))) {
+ return \sprintf('%s/%s/%s/%s.gif', \containerInstance()->subFolder, $path, $theme, $icon);
}
- if (\is_readable(\sprintf('%s/%s/%s/%s.ico', self::BASE_PATH, $path, $theme, $icon))) {
- return \sprintf('%s/%s/%s/%s.ico', self::SUBFOLDER, $path, $theme, $icon);
+ if (\is_readable(\sprintf('%s/%s/%s/%s.ico', \containerInstance()->BASE_PATH, $path, $theme, $icon))) {
+ return \sprintf('%s/%s/%s/%s.ico', \containerInstance()->subFolder, $path, $theme, $icon);
}
- if (\is_readable(\sprintf('%s/%s/default/%s.png', self::BASE_PATH, $path, $icon))) {
- return \sprintf('%s/%s/default/%s.png', self::SUBFOLDER, $path, $icon);
+ if (\is_readable(\sprintf('%s/%s/default/%s.png', \containerInstance()->BASE_PATH, $path, $icon))) {
+ return \sprintf('%s/%s/default/%s.png', \containerInstance()->subFolder, $path, $icon);
}
- if (\is_readable(\sprintf('%s/%s/default/%s.gif', self::BASE_PATH, $path, $icon))) {
- return \sprintf('%s/%s/default/%s.gif', self::SUBFOLDER, $path, $icon);
+ if (\is_readable(\sprintf('%s/%s/default/%s.gif', \containerInstance()->BASE_PATH, $path, $icon))) {
+ return \sprintf('%s/%s/default/%s.gif', \containerInstance()->subFolder, $path, $icon);
}
- if (\is_readable(\sprintf('%s/%s/default/%s.ico', self::BASE_PATH, $path, $icon))) {
- return \sprintf('%s/%s/default/%s.ico', self::SUBFOLDER, $path, $icon);
+ if (\is_readable(\sprintf('%s/%s/default/%s.ico', \containerInstance()->BASE_PATH, $path, $icon))) {
+ return \sprintf('%s/%s/default/%s.ico', \containerInstance()->subFolder, $path, $icon);
}
return $default_icon;
}
+ private function getCookieTheme(): ?string
+ {
+ $cookie_theme = $_COOKIE['ppaTheme'] ?? null;
+
+ return $this->isThemeAvailable($cookie_theme) ? $cookie_theme : null;
+ }
+
+ private function getSessionTheme(): ?string
+ {
+ $session_theme = $_SESSION['ppaTheme'] ?? null;
+
+ return $this->isThemeAvailable($session_theme) ? $session_theme : null;
+ }
+
+ private function getRequestTheme(): ?string
+ {
+ $request_theme = $_REQUEST['theme'] ?? null;
+
+ return $this->isThemeAvailable($request_theme) ? $request_theme : null;
+ }
+
+ private function isThemeAvailable(?string $_theme = null): bool
+ {
+ return \array_key_exists($_theme, $this->getThemeFolders());
+ }
+
+ private function setCookieTheme(string $_theme): void
+ {
+ if ($this->isThemeAvailable($_theme)) {
+ \setcookie('ppaTheme', $_theme, \time() + 31536000, '/');
+ }
+ }
+
+ private function setSessionTheme(string $_theme): void
+ {
+ if ($this->isThemeAvailable($_theme)) {
+ $_SESSION['ppaTheme'] = $_theme;
+ }
+ }
+
/**
* Undocumented function.
*
@@ -371,7 +434,7 @@ class ViewManager extends \Slim\Views\Twig
return '\PHPPgAdmin\Controller\\' . \ucfirst($subject) . 'Controller';
}
- private function getContainer(): \Slim\Container
+ private function getContainer(): \PHPPgAdmin\ContainerUtils
{
return $this->container;
}
@@ -384,8 +447,11 @@ class ViewManager extends \Slim\Views\Twig
*/
private function getThemeFolders(): array
{
+ if (!empty(self::$themeFolders)) {
+ return self::$themeFolders;
+ }
// no THEME_PATH (how?) then return empty array
- if (!$gestor = \opendir(self::THEME_PATH)) {
+ if (!$gestor = \opendir(containerInstance()->THEME_PATH)) {
\closedir($gestor);
return [];
@@ -398,16 +464,18 @@ class ViewManager extends \Slim\Views\Twig
continue;
}
- $folderpath = \sprintf('%s%s%s', self::THEME_PATH, \DIRECTORY_SEPARATOR, $foldername);
+ $folderpath = \sprintf('%s%s%s', \containerInstance()->THEME_PATH, \DIRECTORY_SEPARATOR, $foldername);
$stylesheet = \sprintf('%s%s%s', $folderpath, \DIRECTORY_SEPARATOR, 'global.css');
// if $folderpath if indeed a folder and contains a global.css file, then it's a theme
if (\is_dir($folderpath) &&
- \is_file($stylesheet)) {
+ \is_file($stylesheet)
+ ) {
$themefolders[$foldername] = $folderpath;
}
}
\closedir($gestor);
+ self::$themeFolders = $themefolders;
return $themefolders;
}
diff --git a/src/controllers/AggregatesController.php b/src/controllers/AggregatesController.php
index 2fa97293..c8be5ca6 100644
--- a/src/controllers/AggregatesController.php
+++ b/src/controllers/AggregatesController.php
@@ -240,7 +240,7 @@ class AggregatesController extends BaseController
);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['straggrcreated']);
} else {
$this->doCreate($this->lang['straggrcreatedbad']);
@@ -276,7 +276,7 @@ class AggregatesController extends BaseController
$this->printTitle($this->lang['strcreateaggregate'], 'pg.aggregate.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/aggregates" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/aggregates" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$this->data->_maxNameLen}\" value=\"",
@@ -359,7 +359,7 @@ class AggregatesController extends BaseController
$this->printTitle($this->lang['stralter'], 'pg.aggregate.alter');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/aggregates" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/aggregates" method="post">' . \PHP_EOL;
$aggrdata = $this->data->getAggregate($_REQUEST['aggrname'], $_REQUEST['aggrtype']);
if (0 < $aggrdata->recordCount()) {
@@ -408,7 +408,7 @@ class AggregatesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropaggregate'], \htmlspecialchars($_REQUEST['aggrname'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/aggregates" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/aggregates" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="aggrname" value="', \htmlspecialchars($_REQUEST['aggrname']), '" />' . \PHP_EOL;
@@ -421,7 +421,7 @@ class AggregatesController extends BaseController
$status = $this->data->dropAggregate($_POST['aggrname'], $_POST['aggrtype'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['straggregatedropped']);
} else {
$this->doDefault($this->lang['straggregatedroppedbad']);
diff --git a/src/controllers/AlldbController.php b/src/controllers/AlldbController.php
index a940a35c..f4fa9d3b 100644
--- a/src/controllers/AlldbController.php
+++ b/src/controllers/AlldbController.php
@@ -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">';
@@ -315,7 +315,7 @@ class AlldbController extends BaseController
$this->coalesceArr($_POST, 'dbcomment', '');
if (0 === $data->alterDatabase($_POST['oldname'], $_POST['newname'], $_POST['owner'], $_POST['dbcomment'])) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strdatabasealtered']);
} else {
$this->doDefault($this->lang['strdatabasealteredbad']);
@@ -340,7 +340,7 @@ class AlldbController extends BaseController
$this->printTrail('database');
$this->printTitle($this->lang['strdrop'], 'pg.database.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/alldb" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/alldb" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
foreach ($_REQUEST['ma'] as $v) {
@@ -369,9 +369,18 @@ class AlldbController extends BaseController
$status = $data->dropDatabase($d);
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($d, \ENT_QUOTES, 'UTF-8'), $this->lang['strdatabasedropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($d, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strdatabasedropped']
+ );
} else {
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($d, \ENT_QUOTES, 'UTF-8'), $this->lang['strdatabasedroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($d, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strdatabasedroppedbad']
+ ));
return;
}
@@ -427,7 +436,7 @@ class AlldbController extends BaseController
$tablespaces = $data->getTablespaces();
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/alldb" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/alldb" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><input name=\"formName\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -553,7 +562,7 @@ class AlldbController extends BaseController
);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strdatabasecreated']);
} else {
$this->doCreate($this->lang['strdatabasecreatedbad']);
diff --git a/src/controllers/BaseController.php b/src/controllers/BaseController.php
index 5eec5f66..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 = [];
@@ -77,13 +63,13 @@ class BaseController
public $phpMinVer;
- protected $script;
-
/**
- * @var \Slim\Container
+ * @var \PHPPgAdmin\ContainerUtils
*/
protected $container;
+ protected $script;
+
protected $data;
protected $database;
@@ -127,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');
@@ -165,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();
+ }
}
}
}
@@ -257,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)
{
@@ -269,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
*/
@@ -461,17 +448,28 @@ class BaseController
}
/**
- * @param string $key
+ * @param string $key
* @param null|array|float|int|string $default
*
* @return null|array|float|int|string
*/
- public function getQueryParamstring($key, $default = null)
+ public function getQueryStrinParam($key, $default = null)
{
return \requestInstance()->getQueryParam($key, $default);
}
/**
+ * @return array
+ */
+ public function getAllParams(): array
+ {
+ return \array_merge(
+ \requestInstance()->getQueryParams() ?? [],
+ \requestInstance()->getParsedBody() ?? []
+ );
+ }
+
+ /**
* Print out a message.
*
* @param string $msg The message
@@ -482,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 2bd3bc4d..915e10d6 100644
--- a/src/controllers/ColpropertiesController.php
+++ b/src/controllers/ColpropertiesController.php
@@ -89,7 +89,6 @@ class ColpropertiesController extends BaseController
if (!empty($_REQUEST['column'])) {
// Get table
$tdata = $data->getTable($this->tableName);
- //\Kint::dump($tdata);
// Get columns
$attrs = $data->getTableAttributes($this->tableName, $_REQUEST['column']);
@@ -238,8 +237,8 @@ class ColpropertiesController extends BaseController
$this->printTitle($this->lang['stralter'], 'pg.column.alter');
$this->printMsg($msg);
- echo '<script src="' . self::SUBFOLDER . '/assets/js/tables.js" type="text/javascript"></script>';
- echo '<form action="' . self::SUBFOLDER . '/src/views/colproperties" method="post">' . \PHP_EOL;
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/tables.js" type="text/javascript"></script>';
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/colproperties" method="post">' . \PHP_EOL;
// Output table header
echo '<table>' . \PHP_EOL;
@@ -293,6 +292,7 @@ class ColpropertiesController extends BaseController
// Column type
$escaped_predef_types = []; // the JS escaped array elements
+
if ($data->hasAlterColumnType()) {
// Fetch all available types
$types = $data->getTypes(true, false, true);
@@ -386,7 +386,7 @@ class ColpropertiesController extends BaseController
if (0 === $status) {
if ($_REQUEST['column'] !== $_REQUEST['field']) {
$_REQUEST['column'] = $_REQUEST['field'];
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doDefault($sql . "<br/>{$this->lang['strcolumnaltered']}");
} else {
diff --git a/src/controllers/ConstraintsController.php b/src/controllers/ConstraintsController.php
index edbbaf4a..f3c016cb 100644
--- a/src/controllers/ConstraintsController.php
+++ b/src/controllers/ConstraintsController.php
@@ -26,7 +26,7 @@ class ConstraintsController extends BaseController
$this->printHeader(
$this->lang['strtables'] . ' - ' . $_REQUEST['table'] . ' - ' . $this->lang['strconstraints'],
- '<script src="' . self::SUBFOLDER . '/assets/js/indexes.js" type="text/javascript"></script>',
+ '<script src="' . \containerInstance()->subFolder . '/assets/js/indexes.js" type="text/javascript"></script>',
true,
'header_select2.twig'
);
@@ -540,7 +540,7 @@ class ConstraintsController extends BaseController
$this->printTitle($this->lang['straddcheck'], 'pg.constraint.check');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/constraints" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/constraints" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<th class=\"data required\">{$this->lang['strdefinition']}</th></tr>" . \PHP_EOL;
diff --git a/src/controllers/DatabaseController.php b/src/controllers/DatabaseController.php
index 02a30949..4da3d561 100644
--- a/src/controllers/DatabaseController.php
+++ b/src/controllers/DatabaseController.php
@@ -41,7 +41,7 @@ class DatabaseController extends BaseController
$scripts = '';
// normal flow
if ('locks' === $this->action || 'processes' === $this->action) {
- $scripts .= '<script src="' . self::SUBFOLDER . '/assets/js/database.js" type="text/javascript"></script>';
+ $scripts .= '<script src="' . \containerInstance()->subFolder . '/assets/js/database.js" type="text/javascript"></script>';
$refreshTime = $this->conf['ajax_refresh'] * 1500;
@@ -184,7 +184,7 @@ class DatabaseController extends BaseController
$this->printTabs('database', 'find');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/database" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/database" method="post">' . \PHP_EOL;
echo '<p><input name="term" value="', \htmlspecialchars($_REQUEST['term']),
"\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" />" . \PHP_EOL;
// Output list of filters. This is complex due to all the 'has' and 'conf' feature possibilities
@@ -546,7 +546,7 @@ class DatabaseController extends BaseController
$this->printTrail('database');
$this->printTabs('database', 'sql');
echo "<p>{$this->lang['strentersql']}</p>" . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/sql" method="post" enctype="multipart/form-data" id="sqlform">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/sql" method="post" enctype="multipart/form-data" id="sqlform">' . \PHP_EOL;
echo "<p>{$this->lang['strsql']}<br />" . \PHP_EOL;
echo '<textarea style="width:95%;" rows="15" cols="50" name="query" id="query">',
\htmlspecialchars($_SESSION['sqlquery']), '</textarea></p>' . \PHP_EOL;
@@ -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 01fafcb0..e205d562 100644
--- a/src/controllers/DataexportController.php
+++ b/src/controllers/DataexportController.php
@@ -109,7 +109,7 @@ class DataexportController extends BaseController
$this->printMsg($msg);
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/dataexport" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/dataexport" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strformat']}:</th><td><select name=\"d_format\">" . \PHP_EOL;
// COPY and SQL require a table
@@ -243,7 +243,7 @@ class DataexportController extends BaseController
{
$response = $this
->container
- ->responseobj;
+ ->response;
// Make it do a download, if necessary
if ('download' !== $_REQUEST['output']) {
diff --git a/src/controllers/DataimportController.php b/src/controllers/DataimportController.php
index 8d917484..d56f42b4 100644
--- a/src/controllers/DataimportController.php
+++ b/src/controllers/DataimportController.php
@@ -242,6 +242,7 @@ class DataimportController extends BaseController
// Get first line of field names
$fields = \fgetcsv($fd, $csv_max_line, $csv_delimiter);
$row = 2; //We start on the line AFTER the field names
+
while ($line = \fgetcsv($fd, $csv_max_line, $csv_delimiter)) {
// Build value map
$t_fields = [];
diff --git a/src/controllers/DbexportController.php b/src/controllers/DbexportController.php
index 3e095a1e..95c72b07 100644
--- a/src/controllers/DbexportController.php
+++ b/src/controllers/DbexportController.php
@@ -23,7 +23,7 @@ class DbexportController extends BaseController
$response = $this
->container
- ->responseobj;
+ ->response;
// Include application functions
$f_schema = $f_object = '';
diff --git a/src/controllers/DisplayController.php b/src/controllers/DisplayController.php
index 55f96665..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']);
@@ -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;
+ // 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,7 +804,7 @@ class DisplayController extends BaseController
$resultset = $data->browseRow($_REQUEST['table'], $_REQUEST['key']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/display" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/display" method="post">' . \PHP_EOL;
echo $this->view->form;
if (1 === $resultset->recordCount()) {
@@ -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 48815930..4be8c1cf 100644
--- a/src/controllers/DomainsController.php
+++ b/src/controllers/DomainsController.php
@@ -284,7 +284,7 @@ class DomainsController extends BaseController
}
// Display domain info
- echo '<form action="' . self::SUBFOLDER . '/src/views/domains" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/domains" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\" style=\"width: 70px\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">', $this->misc->printVal($domaindata->fields['domname']), '</td></tr>' . \PHP_EOL;
@@ -336,7 +336,7 @@ class DomainsController extends BaseController
$this->printTitle($this->lang['straddcheck'], 'pg.constraint.check');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/domains" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/domains" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<th class=\"data required\">{$this->lang['strdefinition']}</th></tr>" . \PHP_EOL;
@@ -393,7 +393,7 @@ class DomainsController extends BaseController
$this->misc->printVal($_REQUEST['constraint']),
$this->misc->printVal($_REQUEST['domain'])
), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/domains" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/domains" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="drop_con" />' . \PHP_EOL;
echo '<input type="hidden" name="domain" value="', \htmlspecialchars($_REQUEST['domain']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="constraint" value="', \htmlspecialchars($_REQUEST['constraint']), '" />' . \PHP_EOL;
@@ -560,7 +560,7 @@ class DomainsController extends BaseController
$this->printTitle($this->lang['strdrop'], 'pg.domain.drop');
echo '<p>', \sprintf($this->lang['strconfdropdomain'], $this->misc->printVal($_REQUEST['domain'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/domains" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/domains" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /><label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="domain" value="', \htmlspecialchars($_REQUEST['domain']), '" />' . \PHP_EOL;
@@ -606,7 +606,7 @@ class DomainsController extends BaseController
$this->printTitle($this->lang['strcreatedomain'], 'pg.domain.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/domains" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/domains" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\" style=\"width: 70px\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<td class=\"data1\"><input name=\"domname\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
diff --git a/src/controllers/FulltextController.php b/src/controllers/FulltextController.php
index 3760dd0f..0f13a5ac 100644
--- a/src/controllers/FulltextController.php
+++ b/src/controllers/FulltextController.php
@@ -308,7 +308,7 @@ class FulltextController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropftsconfig'], $this->misc->printVal($_REQUEST['ftscfg'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="dropconfig" />' . \PHP_EOL;
echo '<input type="hidden" name="database" value="', \htmlspecialchars($_REQUEST['database']), '" />' . \PHP_EOL;
@@ -321,7 +321,7 @@ class FulltextController extends BaseController
$status = $data->dropFtsConfiguration($_POST['ftscfg'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strftsconfigdropped']);
} else {
$this->doDefault($this->lang['strftsconfigdroppedbad']);
@@ -339,7 +339,7 @@ class FulltextController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropftsdict'], $this->misc->printVal($_REQUEST['ftsdict'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="dropdict" />' . \PHP_EOL;
echo '<input type="hidden" name="database" value="', \htmlspecialchars($_REQUEST['database']), '" />' . \PHP_EOL;
@@ -354,7 +354,7 @@ class FulltextController extends BaseController
$status = $data->dropFtsDictionary($_POST['ftsdict'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doViewDicts($this->lang['strftsdictdropped']);
} else {
$this->doViewDicts($this->lang['strftsdictdroppedbad']);
@@ -390,7 +390,7 @@ class FulltextController extends BaseController
$this->printTitle($this->lang['strftscreateconfig'], 'pg.ftscfg.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
// conf name
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
@@ -497,7 +497,7 @@ class FulltextController extends BaseController
$status = $data->createFtsConfiguration($_POST['formName'], $formParser, $formTemplate, $_POST['formComment']);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strftsconfigcreated']);
} else {
$this->doCreateConfig($this->lang['strftsconfigcreatedbad']);
@@ -531,7 +531,7 @@ class FulltextController extends BaseController
// Fetch all FTS parsers from the database
$ftsparsers = $data->getFtsParsers();
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>" . \PHP_EOL;
@@ -822,7 +822,7 @@ class FulltextController extends BaseController
$this->printTitle($this->lang['strftscreatedict'], 'pg.ftsdict.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><input name=\"formName\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -936,7 +936,7 @@ class FulltextController extends BaseController
);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doViewDicts($this->lang['strftsdictcreated']);
} else {
$this->doCreateDict($this->lang['strftsdictcreatedbad']);
@@ -966,7 +966,7 @@ class FulltextController extends BaseController
$this->coalesceArr($_POST, 'formName', $_REQUEST['ftsdict']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>" . \PHP_EOL;
@@ -1036,7 +1036,7 @@ class FulltextController extends BaseController
$this->printTrail('ftscfg'); // TODO: proper breadcrumbs
$this->printTitle($this->lang['strdrop'], 'pg.ftscfg.alter');
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
// Case of multiaction drop
if (isset($_REQUEST['ma'])) {
@@ -1096,7 +1096,7 @@ class FulltextController extends BaseController
$this->coalesceArr($_POST, 'ftscfg', $_REQUEST['ftscfg']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>" . \PHP_EOL;
@@ -1199,7 +1199,7 @@ class FulltextController extends BaseController
$mappings = $data->getFtsMappings($_POST['ftscfg']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/fulltext" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/fulltext" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>" . \PHP_EOL;
echo "\t\t<th class=\"data left required\">{$this->lang['strftsmapping']}</th>" . \PHP_EOL;
diff --git a/src/controllers/FunctionsController.php b/src/controllers/FunctionsController.php
index b5ef9820..bc740da2 100644
--- a/src/controllers/FunctionsController.php
+++ b/src/controllers/FunctionsController.php
@@ -117,7 +117,7 @@ class FunctionsController extends BaseController
'function' => [
'title' => $this->lang['strfunction'],
'field' => Decorator::field('proproto'),
- 'url' => self::SUBFOLDER . "/redirect/function?action=properties&amp;{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/function?action=properties&amp;{$this->misc->href}&amp;",
'vars' => ['function' => 'proproto', 'function_oid' => 'prooid'],
],
'returns' => [
@@ -270,7 +270,7 @@ class FunctionsController extends BaseController
// Jump them to the new function schema
$this->misc->setCurrentSchema($_POST['formFuncSchema']);
// Force a browser reload
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doProperties($this->lang['strfunctionupdated']);
} else {
@@ -331,7 +331,7 @@ class FunctionsController extends BaseController
$args = $fndata->fields['proarguments'];
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/functions" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/functions" method="post">' . \PHP_EOL;
echo '<table style="width: 95%">' . \PHP_EOL;
echo '<tr>' . \PHP_EOL;
echo "<th class=\"data required\">{$this->lang['strschema']}</th>" . \PHP_EOL;
@@ -643,7 +643,7 @@ class FunctionsController extends BaseController
$this->printTabs('function', 'definition');
$this->printTitle($this->lang['strdrop'], 'pg.function.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/functions" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/functions" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
@@ -676,10 +676,19 @@ class FunctionsController extends BaseController
$status = $data->dropFunction($s, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($_POST['function'][$k], \ENT_QUOTES, 'UTF-8'), $this->lang['strfunctiondropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($_POST['function'][$k], \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strfunctiondropped']
+ );
} else {
$data->endTransaction();
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($_POST['function'][$k], \ENT_QUOTES, 'UTF-8'), $this->lang['strfunctiondroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($_POST['function'][$k], \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strfunctiondroppedbad']
+ ));
return;
}
@@ -688,7 +697,7 @@ class FunctionsController extends BaseController
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$this->doDefault($this->lang['strfunctiondroppedbad']);
@@ -697,7 +706,7 @@ class FunctionsController extends BaseController
$status = $data->dropFunction($_POST['function_oid'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strfunctiondropped']);
} else {
$this->doDefault($this->lang['strfunctiondroppedbad']);
@@ -856,12 +865,12 @@ class FunctionsController extends BaseController
$szArgReturns .= '<option value=""></option>';
$szArgReturns .= '<option value="[]">[]</option>';
$szArgReturns .= '</select>';
- $subfolder = self::SUBFOLDER;
+ $subfolder = \containerInstance()->subFolder;
if (!empty($this->conf['theme'])) {
- $szImgPath = self::SUBFOLDER . "/assets/images/themes/{$this->conf['theme']}";
+ $szImgPath = \containerInstance()->subFolder . "/assets/images/themes/{$this->conf['theme']}";
} else {
- $szImgPath = self::SUBFOLDER . '/assets/images/themes/default';
+ $szImgPath = \containerInstance()->subFolder . '/assets/images/themes/default';
}
if (empty($msg)) {
@@ -874,7 +883,7 @@ class FunctionsController extends BaseController
$szJSAddTR .= "<img src=\"{$szImgPath}/AddArguments.png\" alt=\"Add Argument\" /></td>";
$szJSAddTR .= "<td class=\"data3\"><span style=\"font-size: 8pt\">{$this->lang['strargadd']}</span></td></tr></table></td>\n</tr>" . \PHP_EOL;
- echo '<script src="' . self::SUBFOLDER . "/assets/js/functions.js\" type=\"text/javascript\"></script>
+ echo '<script src="' . \containerInstance()->subFolder . "/assets/js/functions.js\" type=\"text/javascript\"></script>
<script type=\"text/javascript\">
//<![CDATA[
var g_types_select = '<select class=\"select2\" name=\"formArgType[]\">{$szTypes}</select>{$szArgReturns}';
@@ -891,7 +900,7 @@ class FunctionsController extends BaseController
//]]>
</script>
";
- echo '<form action="' . self::SUBFOLDER . '/src/views/functions" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/functions" method="post">' . \PHP_EOL;
echo '<table><tbody id="args_table">' . \PHP_EOL;
echo "<tr><th class=\"data required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<th class=\"data required\" colspan=\"2\">{$this->lang['strreturns']}</th>" . \PHP_EOL;
@@ -990,14 +999,14 @@ class FunctionsController extends BaseController
$szJS = '';
- echo '<script src="' . self::SUBFOLDER . '/assets/js/functions.js" type="text/javascript"></script>';
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/functions.js" type="text/javascript"></script>';
echo '<script type="text/javascript">' . $this->_buildJSData() . '</script>';
if (!empty($_POST['formArgName'])) {
$szJS = $this->_buildJSRows($this->_buildFunctionArguments($_POST));
} else {
- $subfolder = self::SUBFOLDER;
- $szJS = '<script type="text/javascript" src="' . self::SUBFOLDER . '/assets/js/functions.js">noArgsRebuild(addArg("' . $subfolder . '"));</script>';
+ $subfolder = \containerInstance()->subFolder;
+ $szJS = '<script type="text/javascript" src="' . \containerInstance()->subFolder . '/assets/js/functions.js">noArgsRebuild(addArg("' . $subfolder . '"));</script>';
}
$cost = (isset($_POST['formCost'])) ? $_POST['formCost'] : null;
@@ -1250,7 +1259,7 @@ class FunctionsController extends BaseController
$bArgIsArray = 'true';
}
$arrayProperArgs[] = [$szMode, $szArgName, $szArgType, $bArgIsArray];
- $subfolder = self::SUBFOLDER;
+ $subfolder = \containerInstance()->subFolder;
$szReturn .= '<script type="text/javascript">';
$szReturn .= "RebuildArgTR('{$szMode}','{$szArgName}','{$szArgType}',new Boolean({$bArgIsArray},{$subfolder}));";
$szReturn .= '</script>;';
diff --git a/src/controllers/GroupsController.php b/src/controllers/GroupsController.php
index f748d162..0f88d4b8 100644
--- a/src/controllers/GroupsController.php
+++ b/src/controllers/GroupsController.php
@@ -180,7 +180,7 @@ class GroupsController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropmember'], $this->misc->printVal($_REQUEST['user']), $this->misc->printVal($_REQUEST['group'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/groups" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/groups" method="post">' . \PHP_EOL;
echo $this->view->form;
echo '<input type="hidden" name="action" value="drop_member" />' . \PHP_EOL;
echo '<input type="hidden" name="group" value="', \htmlspecialchars($_REQUEST['group']), '" />' . \PHP_EOL;
@@ -248,7 +248,7 @@ class GroupsController extends BaseController
}
// Display form for adding a user to the group
- echo '<form action="' . self::SUBFOLDER . '/src/views/groups" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/groups" method="post">' . \PHP_EOL;
echo '<select name="user">';
while (!$users->EOF) {
@@ -292,7 +292,7 @@ class GroupsController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropgroup'], $this->misc->printVal($_REQUEST['group'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/groups" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/groups" method="post">' . \PHP_EOL;
echo $this->view->form;
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="group" value="', \htmlspecialchars($_REQUEST['group']), '" />' . \PHP_EOL;
diff --git a/src/controllers/HistoryController.php b/src/controllers/HistoryController.php
index f26d08b5..d985f3e4 100644
--- a/src/controllers/HistoryController.php
+++ b/src/controllers/HistoryController.php
@@ -75,7 +75,7 @@ class HistoryController extends BaseController
// Bring to the front always
echo '<body onload="window.focus();">' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/history" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/history" method="post">' . \PHP_EOL;
$this->printConnection('history');
echo '</form><br />';
@@ -88,7 +88,6 @@ class HistoryController extends BaseController
if (isset($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']])) {
$history = new \PHPPgAdmin\ArrayRecordSet($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']]);
- //Kint::dump($history);
$columns = [
'query' => [
'title' => $this->lang['strsql'],
@@ -200,7 +199,7 @@ class HistoryController extends BaseController
echo "<p>{$this->lang['strconfdelhistory']}</p>" . \PHP_EOL;
echo '<pre>', \htmlentities($_SESSION['history'][$_REQUEST['server']][$_REQUEST['database']][$qid]['query'], \ENT_QUOTES, 'UTF-8'), '</pre>';
- echo '<form action="' . self::SUBFOLDER . '/src/views/history" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/history" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="delhistory" />' . \PHP_EOL;
echo "<input type=\"hidden\" name=\"queryid\" value=\"{$qid}\" />" . \PHP_EOL;
echo $this->view->form;
@@ -223,7 +222,7 @@ class HistoryController extends BaseController
echo "<h3>{$this->lang['strclearhistory']}</h3>" . \PHP_EOL;
echo "<p>{$this->lang['strconfclearhistory']}</p>" . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/history" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/history" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="clearhistory" />' . \PHP_EOL;
echo $this->view->form;
echo "<input type=\"submit\" name=\"yes\" value=\"{$this->lang['stryes']}\" />" . \PHP_EOL;
diff --git a/src/controllers/IndexesController.php b/src/controllers/IndexesController.php
index c7134d6e..2bdfd9b8 100644
--- a/src/controllers/IndexesController.php
+++ b/src/controllers/IndexesController.php
@@ -15,7 +15,7 @@ class IndexesController extends BaseController
{
public $controller_title = 'strindexes';
- public $scripts = '<script src="' . self::SUBFOLDER . '/assets/js/indexes.js" type="text/javascript"></script>';
+ public $scripts = '<script src="/assets/js/indexes.js" type="text/javascript"></script>';
/**
* Default method to render the controller according to the action parameter.
@@ -25,7 +25,7 @@ class IndexesController extends BaseController
if ('tree' === $this->action) {
return $this->doTree();
}
-
+ $this->scripts = '<script src="' . \containerInstance()->subFolder . '/assets/js/indexes.js" type="text/javascript"></script>';
$this->printHeader($this->headerTitle(), $this->scripts);
$onloadInit = false;
@@ -144,7 +144,7 @@ class IndexesController extends BaseController
],
];
- $url = self::SUBFOLDER . '/src/views/indexes';
+ $url = \containerInstance()->subFolder . '/src/views/indexes';
$actions = [
'cluster' => [
@@ -268,7 +268,7 @@ class IndexesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfcluster'], $this->misc->printVal($_REQUEST['index'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/indexes" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/indexes" method="post">' . \PHP_EOL;
echo '<p><input type="checkbox" id="analyze" name="analyze"', (isset($_REQUEST['analyze']) ? ' checked="checked"' : ''), ' />';
echo "<label for=\"analyze\">{$this->lang['stranalyze']}</label></p>" . \PHP_EOL;
echo '<input type="hidden" name="action" value="cluster_index" />' . \PHP_EOL;
@@ -503,7 +503,7 @@ class IndexesController extends BaseController
$this->printTitle($this->lang['strdrop'], 'pg.index.drop');
echo '<p>', \sprintf($this->lang['strconfdropindex'], $this->misc->printVal($this->getRequestParam('index'))), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/indexes" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/indexes" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="drop_index" />' . \PHP_EOL;
echo '<input type="hidden" name="table" value="', \htmlspecialchars($object), '" />' . \PHP_EOL;
echo '<input type="hidden" name="index" value="', \htmlspecialchars($this->getRequestParam('index')), '" />' . \PHP_EOL;
diff --git a/src/controllers/IntroController.php b/src/controllers/IntroController.php
index 3f30a3ee..31d28215 100644
--- a/src/controllers/IntroController.php
+++ b/src/controllers/IntroController.php
@@ -18,14 +18,10 @@ class IntroController extends BaseController
*/
public function render()
{
- if (null === \requestInstance()->getAttribute('route')) {
- echo $this->doDefault();
- } else {
- $body = \responseInstance()->getBody();
- $body->write($this->doDefault());
+ $body = \responseInstance()->getBody();
+ $body->write($this->doDefault());
- return \responseInstance();
- }
+ return \responseInstance();
}
/**
@@ -89,7 +85,7 @@ class IntroController extends BaseController
$intro_html .= '</ul>';
if (\requestInstance()->getQueryParam('language')) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$intro_html .= $this->printFooter(false);
diff --git a/src/controllers/LoginController.php b/src/controllers/LoginController.php
index fe7e40ec..770be030 100644
--- a/src/controllers/LoginController.php
+++ b/src/controllers/LoginController.php
@@ -96,7 +96,7 @@ class LoginController extends BaseController
$login_html .= $this->printMsg($msg, false);
}
- $login_html .= '<form id="login_form" method="post" name="login_form" action="' . self::SUBFOLDER . '/redirect/server?server=' . \htmlspecialchars($server_id) . '">';
+ $login_html .= '<form id="login_form" method="post" name="login_form" action="' . \containerInstance()->subFolder . '/redirect/server?server=' . \htmlspecialchars($server_id) . '">';
$md5_server = \md5($server_id);
// Pass request vars through form (is this a security risk???)
diff --git a/src/controllers/MaterializedviewpropertiesController.php b/src/controllers/MaterializedviewpropertiesController.php
index 2a4429dd..d3a4126d 100644
--- a/src/controllers/MaterializedviewpropertiesController.php
+++ b/src/controllers/MaterializedviewpropertiesController.php
@@ -150,7 +150,7 @@ class MaterializedviewpropertiesController extends BaseController
$_POST['formComment'] = $viewdata->fields['relcomment'];
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
echo '<table style="width: 100%">' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strdefinition']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><textarea style=\"width: 100%;\" rows=\"20\" cols=\"50\" name=\"formDefinition\">",
@@ -187,7 +187,7 @@ class MaterializedviewpropertiesController extends BaseController
$this->printTitle($this->lang['stralter'], 'pg.column.alter');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
// Output matview header
echo '<table>' . \PHP_EOL;
@@ -285,7 +285,7 @@ class MaterializedviewpropertiesController extends BaseController
$this->coalesceArr($_POST, 'comment', $matview->fields['relcomment']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/materializedviewproperties" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">';
@@ -351,13 +351,13 @@ class MaterializedviewpropertiesController extends BaseController
// Jump them to the new matview name
$_REQUEST[$this->subject] = $_POST['name'];
// Force a browser reload
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
// If schema has changed, need to change to the new schema and reload the browser
if (!empty($_POST['newschema']) && ($_POST['newschema'] !== $data->_schema)) {
// Jump them to the new sequence schema
$this->misc->setCurrentSchema($_POST['newschema']);
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doDefault($this->lang['strviewaltered']);
} else {
diff --git a/src/controllers/MaterializedviewsController.php b/src/controllers/MaterializedviewsController.php
index 2d765e4e..35b00836 100644
--- a/src/controllers/MaterializedviewsController.php
+++ b/src/controllers/MaterializedviewsController.php
@@ -124,7 +124,7 @@ class MaterializedviewsController extends BaseController
$this->keystring => [
'title' => 'M ' . $this->lang['strview'],
'field' => Decorator::field('relname'),
- 'url' => self::SUBFOLDER . "/redirect/matview?{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/matview?{$this->misc->href}&amp;",
'vars' => [$this->keystring => 'relname'],
],
'owner' => [
@@ -281,7 +281,7 @@ class MaterializedviewsController extends BaseController
$this->printTrail('getTrail');
$this->printTitle($this->lang['strdrop'], 'pg.matview.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/materializedviews" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/materializedviews" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
@@ -312,10 +312,19 @@ class MaterializedviewsController extends BaseController
$status = $data->dropView($s, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strviewdropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strviewdropped']
+ );
} else {
$data->endTransaction();
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strviewdroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strviewdroppedbad']
+ ));
return;
}
@@ -324,7 +333,7 @@ class MaterializedviewsController extends BaseController
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$this->doDefault($this->lang['strviewdroppedbad']);
@@ -333,7 +342,7 @@ class MaterializedviewsController extends BaseController
$status = $data->dropView($_POST['view'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strviewdropped']);
} else {
$this->doDefault($this->lang['strviewdroppedbad']);
@@ -403,7 +412,7 @@ class MaterializedviewsController extends BaseController
$this->printTitle($this->lang['strcreateview'], 'pg.matview.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$this->view_name}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$this->view_name}\" method=\"post\">" . \PHP_EOL;
echo '<table style="width: 100%">' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t<td class=\"data1\"><input name=\"formView\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -438,7 +447,7 @@ class MaterializedviewsController extends BaseController
$status = $data->createView($_POST['formView'], $_POST['formDefinition'], false, $_POST['formComment'], true);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strviewcreated']);
} else {
$this->doCreate($this->lang['strviewcreatedbad']);
diff --git a/src/controllers/OperatorsController.php b/src/controllers/OperatorsController.php
index baa78c46..602fbaaf 100644
--- a/src/controllers/OperatorsController.php
+++ b/src/controllers/OperatorsController.php
@@ -256,7 +256,7 @@ class OperatorsController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropoperator'], $this->misc->printVal($_REQUEST['operator'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/operators" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/operators" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="operator" value="', \htmlspecialchars($_REQUEST['operator']), '" />' . \PHP_EOL;
diff --git a/src/controllers/PrivilegesController.php b/src/controllers/PrivilegesController.php
index b2831d33..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;
diff --git a/src/controllers/RolesController.php b/src/controllers/RolesController.php
index 2fea45c9..653db4c1 100644
--- a/src/controllers/RolesController.php
+++ b/src/controllers/RolesController.php
@@ -116,7 +116,7 @@ class RolesController extends BaseController
'role' => [
'title' => $this->lang['strrole'],
'field' => Decorator::field('rolname'),
- 'url' => self::SUBFOLDER . "/redirect/role?action=properties&amp;{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/role?action=properties&amp;{$this->misc->href}&amp;",
'vars' => ['rolename' => 'rolname'],
],
'group' => [
@@ -240,7 +240,7 @@ class RolesController extends BaseController
$this->printTitle($this->lang['strcreaterole'], 'pg.role.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/roles" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/roles" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\" style=\"width: 130px\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"{$data->_maxNameLen}\" name=\"formRolename\" value=\"", \htmlspecialchars($_POST['formRolename']), "\" /></td>\n\t</tr>" . \PHP_EOL;
@@ -393,7 +393,7 @@ class RolesController extends BaseController
$this->_adjustPostVars($roledata, $canRename);
- echo '<form action="' . self::SUBFOLDER . '/src/views/roles" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/roles" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left\" style=\"width: 130px\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"formNewRoleName\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"" . \htmlspecialchars($_POST['formNewRoleName']) . '" />' : $this->misc->printVal($roledata->fields['rolname'])), "</td>\n\t</tr>" . \PHP_EOL;
@@ -535,7 +535,7 @@ class RolesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdroprole'], $this->misc->printVal($_REQUEST['rolename'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/roles" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/roles" method="post">' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="rolename" value="', \htmlspecialchars($_REQUEST['rolename']), '" />' . \PHP_EOL;
echo $this->view->form;
@@ -762,7 +762,7 @@ class RolesController extends BaseController
$this->coalesceArr($_POST, 'confirm', '');
- echo '<form action="' . self::SUBFOLDER . '/src/views/roles" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/roles" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strpassword']}</th>" . \PHP_EOL;
echo "\t\t<td><input type=\"password\" name=\"password\" size=\"32\" value=\"",
diff --git a/src/controllers/RulesController.php b/src/controllers/RulesController.php
index 41515c60..5975b5af 100644
--- a/src/controllers/RulesController.php
+++ b/src/controllers/RulesController.php
@@ -170,7 +170,7 @@ class RulesController extends BaseController
$this->printTitle($this->lang['strcreaterule'], 'pg.rule.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/rules" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/rules" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<td class=\"data1\"><input name=\"name\" size=\"16\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -248,7 +248,7 @@ class RulesController extends BaseController
$this->misc->printVal($_REQUEST[$_REQUEST['reltype']])
), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/rules" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/rules" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="subject" value="', \htmlspecialchars($_REQUEST['reltype']), '" />' . \PHP_EOL;
echo '<input type="hidden" name="', \htmlspecialchars($_REQUEST['reltype']),
diff --git a/src/controllers/SchemasController.php b/src/controllers/SchemasController.php
index c45a065c..f9fc577c 100644
--- a/src/controllers/SchemasController.php
+++ b/src/controllers/SchemasController.php
@@ -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=\"",
@@ -325,7 +325,7 @@ class SchemasController extends BaseController
$status = $data->createSchema($_POST['formName'], $_POST['formAuth'], $_POST['formComment']);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strschemacreated']);
} else {
$this->doCreate($this->lang['strschemacreatedbad']);
@@ -358,7 +358,7 @@ class SchemasController extends BaseController
$this->coalesceArr($_POST, 'owner', $schema->fields['ownername']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/schemas" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/schemas" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>" . \PHP_EOL;
@@ -413,7 +413,7 @@ class SchemasController extends BaseController
$status = $data->updateSchema($_POST['schema'], $_POST['comment'], $_POST['name'], $_POST['owner']);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strschemaaltered']);
} else {
$this->doAlter($this->lang['strschemaalteredbad']);
@@ -437,7 +437,7 @@ class SchemasController extends BaseController
$this->printTrail('schema');
$this->printTitle($this->lang['strdrop'], 'pg.schema.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/schemas" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/schemas" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
foreach ($_REQUEST['ma'] as $v) {
@@ -467,10 +467,19 @@ class SchemasController extends BaseController
$status = $data->dropSchema($s, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strschemadropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strschemadropped']
+ );
} else {
$data->endTransaction();
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strschemadroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strschemadroppedbad']
+ ));
return;
}
@@ -479,7 +488,7 @@ class SchemasController extends BaseController
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$this->doDefault($this->lang['strschemadroppedbad']);
@@ -488,7 +497,7 @@ class SchemasController extends BaseController
$status = $data->dropSchema($_POST['nsp'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strschemadropped']);
} else {
$this->doDefault($this->lang['strschemadroppedbad']);
diff --git a/src/controllers/SequencesController.php b/src/controllers/SequencesController.php
index f4dd6ecb..8b123395 100644
--- a/src/controllers/SequencesController.php
+++ b/src/controllers/SequencesController.php
@@ -222,7 +222,6 @@ class SequencesController extends BaseController
'sequence' => Decorator::field('seqname'),
]
);
- dump($sequences, $actionURL);
$attrs = [
'text' => Decorator::field('seqname'),
'icon' => 'Sequence',
@@ -408,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'])) {
@@ -438,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;
}
@@ -450,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']);
@@ -459,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']);
@@ -493,36 +501,43 @@ 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;
@@ -642,12 +657,13 @@ 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;
@@ -705,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 {
@@ -751,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
@@ -769,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;
@@ -783,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;
@@ -792,37 +815,45 @@ 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;
diff --git a/src/controllers/ServersController.php b/src/controllers/ServersController.php
index a2f32301..c02645d3 100644
--- a/src/controllers/ServersController.php
+++ b/src/controllers/ServersController.php
@@ -105,7 +105,7 @@ class ServersController extends BaseController
'server' => [
'title' => $this->lang['strserver'],
'field' => Decorator::field('desc'),
- 'url' => self::SUBFOLDER . '/redirect/server?',
+ 'url' => \containerInstance()->subFolder . '/redirect/server?',
'vars' => ['server' => 'sha'],
],
'host' => [
@@ -133,13 +133,13 @@ class ServersController extends BaseController
'url' => 'servers',
'urlvars' => [
'action' => 'logout',
- 'logoutServer' => Decorator::field('id'),
+ 'logoutServer' => Decorator::field('sha'),
],
],
],
],
];
-
+ //\sha1("{$server_info['host']}:{$server_info['port']}:{$server_info['sslmode']}")
$svPre = static function (&$rowdata) use ($actions) {
$actions['logout']['disable'] = empty($rowdata->fields['username']);
@@ -200,7 +200,7 @@ class ServersController extends BaseController
unset($_SESSION['sharedUsername'], $_SESSION['sharedPassword']);
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
echo \sprintf($this->lang['strlogoutmsg'], $server_info['desc']);
}
diff --git a/src/controllers/SqlController.php b/src/controllers/SqlController.php
index 59168e44..ca691edd 100644
--- a/src/controllers/SqlController.php
+++ b/src/controllers/SqlController.php
@@ -186,6 +186,9 @@ class SqlController extends BaseController
$data->conn->setFetchMode(\ADODB_FETCH_NUM);
\set_time_limit(25000);
+ /**
+ * @var \ADORecordSet
+ */
$rs = $data->conn->Execute($this->query);
echo '<form method="post" id="sqlform" action="' . $_SERVER['REQUEST_URI'] . '">';
@@ -260,7 +263,7 @@ class SqlController extends BaseController
}
// Reload the browser as we may have made schema changes
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
// Display duration if we know it
if (null !== $this->duration) {
diff --git a/src/controllers/SqleditController.php b/src/controllers/SqleditController.php
index 9b4b2085..3a6a62c9 100644
--- a/src/controllers/SqleditController.php
+++ b/src/controllers/SqleditController.php
@@ -68,7 +68,7 @@ class SqleditController extends BaseController
$default_html = $this->printTabs('popup', 'sql', false);
- $default_html .= '<form action="' . self::SUBFOLDER . '/src/views/sql" method="post" enctype="multipart/form-data" class="sqlform" id="sqlform" target="detail">';
+ $default_html .= '<form action="' . \containerInstance()->subFolder . '/src/views/sql" method="post" enctype="multipart/form-data" class="sqlform" id="sqlform" target="detail">';
$default_html .= \PHP_EOL;
$default_html .= $this->printConnection('sql', false);
diff --git a/src/controllers/TablesController.php b/src/controllers/TablesController.php
index 7888b709..3acc3853 100644
--- a/src/controllers/TablesController.php
+++ b/src/controllers/TablesController.php
@@ -157,8 +157,6 @@ class TablesController extends BaseController
$actions = $this->_getActions();
- //\Kint::dump($tables);
-
echo $this->printTable($tables, $columns, $actions, $this->table_place, $this->lang['strnotables']);
$attr = [
'href' => [
@@ -197,7 +195,7 @@ class TablesController extends BaseController
return $this
->container
- ->responseobj
+ ->response
->withStatus(200)
->withJson($all_tables);
}
@@ -262,7 +260,7 @@ class TablesController extends BaseController
*
* @param mixed $msg
*/
- public function doCreate($msg = '')
+ public function doCreate($msg = ''): void
{
$data = $this->misc->getDatabaseAccessor();
@@ -296,7 +294,7 @@ class TablesController extends BaseController
$this->printTitle($this->lang['strcreatetable'], 'pg.table.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/' . $this->script . '" method="post">';
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/' . $this->script . '" method="post">';
echo \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
@@ -368,8 +366,8 @@ class TablesController extends BaseController
$this->printTitle($this->lang['strcreatetable'], 'pg.table.create');
$this->printMsg($msg);
- echo '<script src="' . self::SUBFOLDER . '/assets/js/tables.js" type="text/javascript"></script>';
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/tables.js" type="text/javascript"></script>';
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
// Output table header
echo '<table>' . \PHP_EOL;
@@ -427,6 +425,7 @@ class TablesController extends BaseController
// only define js types array once
$predefined_size_types = \array_intersect($data->predefined_size_types, \array_keys($types_for_js));
$escaped_predef_types = []; // the JS escaped array elements
+
foreach ($predefined_size_types as $value) {
$escaped_predef_types[] = "'{$value}'";
}
@@ -524,9 +523,11 @@ class TablesController extends BaseController
);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
+
+ $this->doDefault($this->lang['strtablecreated']);
- return $this->doDefault($this->lang['strtablecreated']);
+ return;
}
if (-1 === $status) {
@@ -555,7 +556,7 @@ class TablesController extends BaseController
* @param mixed $confirm
* @param mixed $msg
*/
- public function doCreateLike($confirm, $msg = '')
+ public function doCreateLike($confirm, $msg = ''): void
{
$data = $this->misc->getDatabaseAccessor();
@@ -588,7 +589,7 @@ class TablesController extends BaseController
unset($tbltmp);
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
echo "<table>\n\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"", \htmlspecialchars($_REQUEST['name']), "\" /></td>\n\t</tr>" . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strcreatetablelikeparent']}</th>" . \PHP_EOL;
@@ -662,9 +663,11 @@ class TablesController extends BaseController
);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
+
+ $this->doDefault($this->lang['strtablecreated']);
- return $this->doDefault($this->lang['strtablecreated']);
+ return;
}
$this->doCreateLike(false, $this->lang['strtablecreatedbad']);
@@ -689,7 +692,7 @@ class TablesController extends BaseController
$attrs = $data->getTableAttributes($_REQUEST['table']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/display" method="post" id="selectform">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/display" method="post" id="selectform">' . \PHP_EOL;
if (0 < $attrs->recordCount()) {
// JavaScript for select all feature
@@ -827,7 +830,7 @@ class TablesController extends BaseController
$this->coalesceArr($_REQUEST, 'nulls', []);
$this->coalesceArr($_REQUEST, 'format', []);
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post" id="ac_form">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post" id="ac_form">' . \PHP_EOL;
if (0 < $attrs->recordCount()) {
echo '<table>' . \PHP_EOL;
@@ -937,7 +940,6 @@ class TablesController extends BaseController
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo "<p><input type=\"submit\" name=\"insert\" value=\"{$this->lang['strinsert']}\" />" . \PHP_EOL;
echo "<input type=\"submit\" name=\"insertandrepeat\" accesskey=\"r\" value=\"{$this->lang['strinsertandrepeat']}\" />" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
if (false !== $fksprops) {
if ('default off' !== $this->conf['autocomplete']) {
@@ -949,11 +951,11 @@ class TablesController extends BaseController
echo '</p>' . \PHP_EOL;
} else {
echo "<p>{$this->lang['strnofieldsforinsert']}</p>" . \PHP_EOL;
- echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->lang['strcancel']}\" />" . \PHP_EOL;
}
echo $this->view->form;
echo '</form>' . \PHP_EOL;
- echo '<script src="' . self::SUBFOLDER . '/assets/js/insert_or_edit_row.js" type="text/javascript"></script>';
+ echo \sprintf('<button class="btn btn-mini btn_back" style="float: right; margin-right: 4em; margin-top: -3em;">%s</button>%s', $this->lang['strcancel'], \PHP_EOL);
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/insert_or_edit_row.js" type="text/javascript"></script>';
}
/**
@@ -974,7 +976,9 @@ class TablesController extends BaseController
if (0 === $status) {
if (isset($_POST['insert'])) {
- return $this->doDefault($this->lang['strrowinserted']);
+ $this->doDefault($this->lang['strrowinserted']);
+
+ return;
}
$_REQUEST['values'] = [];
$_REQUEST['nulls'] = [];
@@ -993,12 +997,14 @@ class TablesController extends BaseController
*
* @param mixed $confirm
*/
- public function doEmpty($confirm)
+ public function doEmpty($confirm): void
{
$data = $this->misc->getDatabaseAccessor();
if (empty($_REQUEST['table']) && empty($_REQUEST['ma'])) {
- return $this->doDefault($this->lang['strspecifytabletoempty']);
+ $this->doDefault($this->lang['strspecifytabletoempty']);
+
+ return;
}
if ($confirm) {
@@ -1006,7 +1012,7 @@ class TablesController extends BaseController
$this->printTrail('schema');
$this->printTitle($this->lang['strempty'], 'pg.table.empty');
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
@@ -1021,7 +1027,7 @@ class TablesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfemptytable'], $this->misc->printVal($_REQUEST['table'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
// END not mutli empty
@@ -1041,9 +1047,18 @@ class TablesController extends BaseController
if (0 === $status) {
$msg .= \sprintf('%s<br />', $sql);
- $msg .= \sprintf('%s: %s<br />', \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strtableemptied']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strtableemptied']
+ );
} else {
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strtableemptiedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strtableemptiedbad']
+ ));
return;
}
@@ -1054,12 +1069,16 @@ class TablesController extends BaseController
if (0 === $status) {
$msg .= \sprintf('%s<br />', $sql);
- $msg .= \sprintf('%s: %s<br />', \htmlentities($_POST['table'], \ENT_QUOTES, 'UTF-8'), $this->lang['strtableemptied']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($_POST['table'], \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strtableemptied']
+ );
- return $this->doDefault($msg);
+ $this->doDefault($msg);
}
- return $this->doDefault($sql . '<br>' . $this->lang['strtableemptiedbad']);
+ $this->doDefault($sql . '<br>' . $this->lang['strtableemptiedbad']);
// END not mutli empty
}
// END do Empty
@@ -1071,12 +1090,14 @@ class TablesController extends BaseController
*
* @param mixed $confirm
*/
- public function doDrop($confirm)
+ public function doDrop($confirm): void
{
$data = $this->misc->getDatabaseAccessor();
if (empty($_REQUEST['table']) && empty($_REQUEST['ma'])) {
- return $this->doDefault($this->lang['strspecifytabletodrop']);
+ $this->doDefault($this->lang['strspecifytabletodrop']);
+
+ return;
}
if ($confirm) {
@@ -1085,7 +1106,7 @@ class TablesController extends BaseController
$this->printTrail('schema');
$this->printTitle($this->lang['strdrop'], 'pg.table.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
@@ -1098,7 +1119,7 @@ class TablesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdroptable'], $this->misc->printVal($_REQUEST['table'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/tables" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tables" method="post">' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
// END if multi drop
}
@@ -1120,33 +1141,52 @@ class TablesController extends BaseController
$status = $data->dropTable($t, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strtabledropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strtabledropped']
+ );
} else {
$data->endTransaction();
- return $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strtabledroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strtabledroppedbad']
+ ));
+
+ return;
}
}
}
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
+
+ $this->doDefault($msg);
- return $this->doDefault($msg);
+ return;
}
- return $this->doDefault($this->lang['strtabledroppedbad']);
+ $this->doDefault($this->lang['strtabledroppedbad']);
+
+ return;
}
$status = $data->dropTable($_POST['table'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
+
+ $this->doDefault($this->lang['strtabledropped']);
- return $this->doDefault($this->lang['strtabledropped']);
+ return;
}
- return $this->doDefault($this->lang['strtabledroppedbad']);
+ $this->doDefault($this->lang['strtabledroppedbad']);
+
+ return;
// END DROP
}
}
@@ -1157,7 +1197,7 @@ class TablesController extends BaseController
'table' => [
'title' => $this->lang['strtable'],
'field' => Decorator::field('relname'),
- 'url' => self::SUBFOLDER . "/redirect/table?{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/table?{$this->misc->href}&amp;",
'vars' => ['table' => 'relname'],
],
'owner' => [
diff --git a/src/controllers/TablespacesController.php b/src/controllers/TablespacesController.php
index d14ad956..85a0cfbb 100644
--- a/src/controllers/TablespacesController.php
+++ b/src/controllers/TablespacesController.php
@@ -188,7 +188,7 @@ class TablespacesController extends BaseController
$this->coalesceArr($_POST, 'comment', ($data->hasSharedComments()) ? $tablespace->fields['spccomment'] : '');
- echo '<form action="' . self::SUBFOLDER . '/src/views/tablespaces" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tablespaces" method="post">' . \PHP_EOL;
echo $this->view->form;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
@@ -264,7 +264,7 @@ class TablespacesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdroptablespace'], $this->misc->printVal($_REQUEST['tablespace'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/tablespaces" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tablespaces" method="post">' . \PHP_EOL;
echo $this->view->form;
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="tablespace" value="', \htmlspecialchars($_REQUEST['tablespace']), '" />' . \PHP_EOL;
@@ -308,7 +308,7 @@ class TablespacesController extends BaseController
$this->printTitle($this->lang['strcreatetablespace'], 'pg.tablespace.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/tablespaces" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tablespaces" method="post">' . \PHP_EOL;
echo $this->view->form;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
diff --git a/src/controllers/TblpropertiesController.php b/src/controllers/TblpropertiesController.php
index 81f0db2b..254c09d3 100644
--- a/src/controllers/TblpropertiesController.php
+++ b/src/controllers/TblpropertiesController.php
@@ -306,13 +306,13 @@ class TblpropertiesController extends BaseController
// Jump them to the new table name
$_REQUEST['table'] = $_POST['name'];
// Force a browser reload
- $misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
// If schema has changed, need to change to the new schema and reload the browser
if (!empty($_POST['newschema']) && ($_POST['newschema'] !== $data->_schema)) {
// Jump them to the new sequence schema
$misc->setCurrentSchema($_POST['newschema']);
- $misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doDefault($this->lang['strtablealtered']);
} else {
@@ -357,7 +357,7 @@ class TblpropertiesController extends BaseController
$_POST['tablespace'] = $table->fields['tablespace'];
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/tblproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tblproperties" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">';
@@ -482,7 +482,7 @@ class TblpropertiesController extends BaseController
$max_size = $misc->inisizeToBytes(\ini_get('upload_max_filesize'));
if (\is_float($max_size) && 0 < $max_size) {
- echo '<form action="' . self::SUBFOLDER . '/src/views/dataimport" method="post" enctype="multipart/form-data">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/dataimport" method="post" enctype="multipart/form-data">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strformat']}</th>" . \PHP_EOL;
echo "\t\t<td><select name=\"format\">" . \PHP_EOL;
@@ -545,8 +545,8 @@ class TblpropertiesController extends BaseController
$this->printTitle($this->lang['straddcolumn'], 'pg.column.add');
$this->printMsg($msg);
- echo '<script src="' . self::SUBFOLDER . '/assets/js/tables.js" type="text/javascript"></script>';
- echo '<form action="' . self::SUBFOLDER . '/src/views/tblproperties" method="post">' . \PHP_EOL;
+ echo '<script src="' . \containerInstance()->subFolder . '/assets/js/tables.js" type="text/javascript"></script>';
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tblproperties" method="post">' . \PHP_EOL;
// Output table header
echo '<table>' . \PHP_EOL;
@@ -592,6 +592,7 @@ class TblpropertiesController extends BaseController
echo '</select></td>' . \PHP_EOL;
$predefined_size_types = \array_intersect($data->predefined_size_types, $types_for_js);
$escaped_predef_types = []; // the JS escaped array elements
+
foreach ($predefined_size_types as $value) {
$escaped_predef_types[] = "'{$value}'";
}
@@ -648,7 +649,7 @@ class TblpropertiesController extends BaseController
);
if (0 === $status) {
- $misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault(\sprintf('%s %s %s', $sql, \PHP_EOL, $this->lang['strcolumnadded']));
} else {
$_REQUEST['stage'] = 1;
@@ -680,7 +681,7 @@ class TblpropertiesController extends BaseController
echo '<p>' . \sprintf($this->lang['strconfdropcolumn'], $misc->printVal($_REQUEST['column']), $misc->printVal($_REQUEST['table'])) . '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/tblproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/tblproperties" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo '<input type="hidden" name="column" value="', \htmlspecialchars($_REQUEST['column']), '" />' . \PHP_EOL;
@@ -693,7 +694,7 @@ class TblpropertiesController extends BaseController
[$status, $sql] = $data->dropColumn($_POST['table'], $_POST['column'], isset($_POST['cascade']));
if (0 === $status) {
- $misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault(\sprintf('%s %s %s', $sql, \PHP_EOL, $this->lang['strcolumndropped']));
} else {
$this->doDefault($this->lang['strcolumndroppedbad']);
diff --git a/src/controllers/TreeController.php b/src/controllers/TreeController.php
index 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 83faeb49..2c1eab77 100644
--- a/src/controllers/TriggersController.php
+++ b/src/controllers/TriggersController.php
@@ -273,7 +273,7 @@ class TriggersController extends BaseController
if (0 < $triggerdata->recordCount()) {
$this->coalesceArr($_POST, 'name', $triggerdata->fields['tgname']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">';
@@ -311,7 +311,7 @@ class TriggersController extends BaseController
$this->misc->printVal($_REQUEST['table'])
), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo '<input type="hidden" name="trigger" value="', \htmlspecialchars($_REQUEST['trigger']), '" />' . \PHP_EOL;
@@ -350,7 +350,7 @@ class TriggersController extends BaseController
$this->misc->printVal($_REQUEST['table'])
), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="enable" />' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo '<input type="hidden" name="trigger" value="', \htmlspecialchars($_REQUEST['trigger']), '" />' . \PHP_EOL;
@@ -388,7 +388,7 @@ class TriggersController extends BaseController
$this->misc->printVal($_REQUEST['table'])
), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL;
echo '<input type="hidden" name="action" value="disable" />' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
echo '<input type="hidden" name="trigger" value="', \htmlspecialchars($_REQUEST['trigger']), '" />' . \PHP_EOL;
@@ -449,7 +449,7 @@ class TriggersController extends BaseController
$sel3 = new \PHPPgAdmin\XHtml\XHtmlSelect('formFrequency');
$sel3->set_data($data->triggerFrequency);
- echo '<form action="' . self::SUBFOLDER . '/src/views/triggers" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/triggers" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo '<tr>' . \PHP_EOL;
echo " <th class=\"data\">{$this->lang['strname']}</th>" . \PHP_EOL;
diff --git a/src/controllers/TypesController.php b/src/controllers/TypesController.php
index 7c866657..7fb8289b 100644
--- a/src/controllers/TypesController.php
+++ b/src/controllers/TypesController.php
@@ -198,9 +198,7 @@ class TypesController extends BaseController
],
];
- if (!$data->hasEnumTypes()) {
- unset($navlinks['enum']);
- }
+ //if (!$data->hasEnumTypes()) { unset($navlinks['enum']); }
$this->printNavLinks($navlinks, 'types-types', \get_defined_vars());
}
@@ -344,7 +342,7 @@ class TypesController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdroptype'], $this->misc->printVal($_REQUEST['type'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="type" value="', \htmlspecialchars($_REQUEST['type']), '" />' . \PHP_EOL;
@@ -386,7 +384,7 @@ class TypesController extends BaseController
$this->printTitle($this->lang['strcreatecomptype'], 'pg.type.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -432,7 +430,7 @@ class TypesController extends BaseController
$this->printTitle($this->lang['strcreatecomptype'], 'pg.type.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
// Output table header
echo '<table>' . \PHP_EOL;
@@ -563,7 +561,7 @@ class TypesController extends BaseController
$this->printTitle($this->lang['strcreateenumtype'], 'pg.type.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data\"><input name=\"name\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -607,7 +605,7 @@ class TypesController extends BaseController
$this->printTitle($this->lang['strcreateenumtype'], 'pg.type.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
// Output table header
echo '<table>' . \PHP_EOL;
@@ -710,7 +708,7 @@ class TypesController extends BaseController
$this->printTitle($this->lang['strcreatetype'], 'pg.type.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/types" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/types" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "<td class=\"data1\"><input name=\"typname\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
diff --git a/src/controllers/UsersController.php b/src/controllers/UsersController.php
index 54034dfe..54dcf344 100644
--- a/src/controllers/UsersController.php
+++ b/src/controllers/UsersController.php
@@ -257,7 +257,7 @@ class UsersController extends BaseController
$this->coalesceArr($_POST, 'confirm', '');
- echo '<form action="' . self::SUBFOLDER . '/src/views/users" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/users" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strpassword']}</th>" . \PHP_EOL;
echo "\t\t<td><input type=\"password\" name=\"password\" size=\"32\" value=\"",
@@ -330,7 +330,7 @@ class UsersController extends BaseController
$_POST['formPassword'] = '';
}
- echo '<form action="' . self::SUBFOLDER . '/src/views/users" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/users" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left\">{$this->lang['strusername']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"newname\" size=\"15\" maxlength=\"{$data->_maxNameLen}\" value=\"" . \htmlspecialchars($_POST['newname']) . '" />' : $this->misc->printVal($userdata->fields['usename'])), "</td>\n\t</tr>" . \PHP_EOL;
@@ -400,7 +400,7 @@ class UsersController extends BaseController
echo '<p>', \sprintf($this->lang['strconfdropuser'], $this->misc->printVal($_REQUEST['username'])), '</p>' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . '/src/views/users" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/users" method="post">' . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="drop" />' . \PHP_EOL;
echo '<input type="hidden" name="username" value="', \htmlspecialchars($_REQUEST['username']), '" />' . \PHP_EOL;
echo $this->view->form;
@@ -439,7 +439,7 @@ class UsersController extends BaseController
$this->printTitle($this->lang['strcreateuser'], 'pg.user.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/users" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/users" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strusername']}</th>" . \PHP_EOL;
echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"{$data->_maxNameLen}\" name=\"formUsername\" value=\"", \htmlspecialchars($_POST['formUsername']), "\" /></td>\n\t</tr>" . \PHP_EOL;
diff --git a/src/controllers/ViewpropertiesController.php b/src/controllers/ViewpropertiesController.php
index 523d5c47..26d5b208 100644
--- a/src/controllers/ViewpropertiesController.php
+++ b/src/controllers/ViewpropertiesController.php
@@ -141,7 +141,7 @@ class ViewpropertiesController extends BaseController
}
$variables = (object) [
- 'subfolder' => self::SUBFOLDER . '/src/views/viewproperties',
+ 'subfolder' => \containerInstance()->subFolder . '/src/views/viewproperties',
'formDefinition' => \htmlspecialchars($_POST['formDefinition']),
@@ -201,7 +201,7 @@ EOT;
$this->printTitle($this->lang['stralter'], 'pg.column.alter');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . '/src/views/viewproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/viewproperties" method="post">' . \PHP_EOL;
// Output view header
echo '<table>' . \PHP_EOL;
@@ -299,7 +299,7 @@ EOT;
$this->coalesceArr($_POST, 'comment', $view->fields['relcomment']);
- echo '<form action="' . self::SUBFOLDER . '/src/views/viewproperties" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/viewproperties" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo '<td class="data1">';
@@ -365,13 +365,13 @@ EOT;
// Jump them to the new view name
$_REQUEST[$this->subject] = $_POST['name'];
// Force a browser reload
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
// If schema has changed, need to change to the new schema and reload the browser
if (!empty($_POST['newschema']) && ($_POST['newschema'] !== $data->_schema)) {
// Jump them to the new sequence schema
$this->misc->setCurrentSchema($_POST['newschema']);
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
}
$this->doDefault($this->lang['strviewaltered']);
} else {
diff --git a/src/controllers/ViewsController.php b/src/controllers/ViewsController.php
index 84feea4d..28a44422 100644
--- a/src/controllers/ViewsController.php
+++ b/src/controllers/ViewsController.php
@@ -124,7 +124,7 @@ class ViewsController extends BaseController
$this->keystring => [
'title' => $this->lang['strview'],
'field' => Decorator::field('relname'),
- 'url' => self::SUBFOLDER . "/redirect/view?{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/view?{$this->misc->href}&amp;",
'vars' => [$this->keystring => 'relname'],
],
'owner' => [
@@ -281,7 +281,7 @@ class ViewsController extends BaseController
$this->printTrail('view');
$this->printTitle($this->lang['strdrop'], 'pg.view.drop');
- echo '<form action="' . self::SUBFOLDER . '/src/views/views" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/views" method="post">' . \PHP_EOL;
//If multi drop
if (isset($_REQUEST['ma'])) {
@@ -312,10 +312,19 @@ class ViewsController extends BaseController
$status = $data->dropView($s, isset($_POST['cascade']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strviewdropped']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strviewdropped']
+ );
} else {
$data->endTransaction();
- $this->doDefault(\sprintf('%s%s: %s<br />', $msg, \htmlentities($s, \ENT_QUOTES, 'UTF-8'), $this->lang['strviewdroppedbad']));
+ $this->doDefault(\sprintf(
+ '%s%s: %s<br />',
+ $msg,
+ \htmlentities($s, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strviewdroppedbad']
+ ));
return;
}
@@ -324,7 +333,7 @@ class ViewsController extends BaseController
if (0 === $data->endTransaction()) {
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$this->doDefault($this->lang['strviewdroppedbad']);
@@ -333,7 +342,7 @@ class ViewsController extends BaseController
$status = $data->dropView($_POST['view'], isset($_POST['cascade']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strviewdropped']);
} else {
$this->doDefault($this->lang['strviewdroppedbad']);
@@ -403,7 +412,7 @@ class ViewsController extends BaseController
$this->printTitle($this->lang['strcreateview'], 'pg.view.create');
$this->printMsg($msg);
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$this->view_name}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$this->view_name}\" method=\"post\">" . \PHP_EOL;
echo '<table style="width: 100%">' . \PHP_EOL;
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>" . \PHP_EOL;
echo "\t<td class=\"data1\"><input name=\"formView\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -438,7 +447,7 @@ class ViewsController extends BaseController
$status = $data->createView($_POST['formView'], $_POST['formDefinition'], false, $_POST['formComment']);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($this->lang['strviewcreated']);
} else {
$this->doCreate($this->lang['strviewcreatedbad']);
diff --git a/src/database/ADOdbBase.php b/src/database/ADOdbBase.php
index abd225b6..9cca6b76 100644
--- a/src/database/ADOdbBase.php
+++ b/src/database/ADOdbBase.php
@@ -16,6 +16,7 @@ class ADOdbBase
{
use \PHPPgAdmin\Traits\HelperTrait;
use \PHPPgAdmin\Database\Traits\HasTrait;
+ use \PHPPgAdmin\Database\Traits\DatabaseTrait;
/**
* @var array
@@ -33,7 +34,7 @@ class ADOdbBase
public $conn;
/**
- * @var \Slim\Container
+ * @var \PHPPgAdmin\ContainerUtils
*/
protected $container;
@@ -68,6 +69,53 @@ class ADOdbBase
}
/**
+ * Given an array of attnums and a relation, returns an array mapping
+ * attribute number to attribute name.
+ *
+ * @param string $table The table to get attributes for
+ * @param array $atts An array of attribute numbers
+ *
+ * @return array|int An array mapping attnum to attname or error code
+ * - -1 $atts must be an array
+ * - -2 wrong number of attributes found
+ */
+ public function getAttributeNames($table, $atts)
+ {
+ $c_schema = $this->_schema;
+ $this->clean($c_schema);
+ $this->clean($table);
+ $this->arrayClean($atts);
+
+ if (!\is_array($atts)) {
+ return -1;
+ }
+
+ if (0 === \count($atts)) {
+ return [];
+ }
+
+ $sql = "SELECT attnum, attname FROM pg_catalog.pg_attribute WHERE
+ attrelid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='{$table}' AND
+ relnamespace=(SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}'))
+ AND attnum IN ('" . \implode("','", $atts) . "')";
+
+ $rs = $this->selectSet($sql);
+
+ if ($rs->recordCount() !== \count($atts)) {
+ return -2;
+ }
+
+ $temp = [];
+
+ while (!$rs->EOF) {
+ $temp[$rs->fields['attnum']] = $rs->fields['attname'];
+ $rs->moveNext();
+ }
+
+ return $temp;
+ }
+
+ /**
* Sets the comment for an object in the database.
*
* @pre All parameters must already be cleaned
diff --git a/src/database/Connection.php b/src/database/Connection.php
deleted file mode 100644
index db541416..00000000
--- a/src/database/Connection.php
+++ /dev/null
@@ -1,177 +0,0 @@
-<?php
-
-/**
- * PHPPgAdmin 6.0.0
- */
-
-namespace PHPPgAdmin\Database;
-
-/**
- * @file
- * Class to represent a database connection
- *
- * Id: Connection.php,v 1.15 2008/02/18 21:42:47 ioguix Exp $
- */
-class Connection
-{
- use \PHPPgAdmin\Traits\HelperTrait;
-
- public $conn;
-
- public $platform = 'UNKNOWN';
-
- protected $container;
-
- protected $server_info;
-
- protected $version_dictionary = [
- '13' => 'Postgres13',
- '12' => 'Postgres12',
- '11' => 'Postgres11',
- '10' => 'Postgres10',
- '9.7' => 'Postgres96',
- '9.6' => 'Postgres96',
- '9.5' => 'Postgres95',
- '9.4' => 'Postgres94',
- '9.3' => 'Postgres93',
- '9.2' => 'Postgres92',
- '9.1' => 'Postgres91',
- '9.0' => 'Postgres90',
- ];
-
- // 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
- */
- public function __construct($server_info, $database, $container, $fetchMode = \ADODB_FETCH_ASSOC)
- {
- $host = $server_info['host'];
- $port = $server_info['port'];
- $sslmode = $server_info['sslmode'];
- $user = $server_info['username'];
- $password = $server_info['password'];
-
- $this->server_info = $server_info;
-
- $this->container = $container;
-
- $this->conn = \ADONewConnection('postgres9');
- //$this->conn->debug = true;
- $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->conn->connect($pghost, $user, $password, $database);
- //$this->prtrace($this->conn);
- } catch (\Exception $e) {
- dump($e);
- $this->prtrace($e->getMessage(), $e->getTrace());
- }
- }
-
- public function getConnectionResult()
- {
- return $this->_connection_result;
- }
-
- /**
- * Gets the name of the correct database driver to use. As a side effect,
- * sets the platform.
- *
- * @param string $description A description of the database and version (returns by reference)
- *
- * @return string The driver. e.g. Postgres96
- */
- public function getDriver(&$description)
- {
- $version = null;
-
- if ($this->conn->_connectionID) {
- $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 null;
- }
-
- $version = $params[1]; // eg. 8.4.4
- }
-
- $description = "PostgreSQL {$version}";
-
- $version_parts = \explode('.', $version);
-
- if ((int) (10 <= $version_parts[0])) {
- $major_version = $version_parts[0];
- } else {
- $major_version = \implode('.', [$version_parts[0], $version_parts[1]]);
- }
-
- //$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];
- }
-
- // if major version is less than 9 return null, we don't support it
- if (9 > (int) \mb_substr($version, 0, 1)) {
- return null;
- }
-
- // If unknown version, then default to latest driver
- return 'Postgres';
- }
-
- /**
- * Get the last error in the connection.
- *
- * @return string Error string
- */
- public function getLastError()
- {
- return \pg_last_error($this->conn->_connectionID);
- }
-}
diff --git a/src/database/Postgres.php b/src/database/Postgres.php
index 3d2d8449..35807c19 100644
--- a/src/database/Postgres.php
+++ b/src/database/Postgres.php
@@ -101,8 +101,10 @@ class Postgres extends ADOdbBase
* Gets the help pages.
* get help page by instancing the corresponding help class
* if $this->help_page and $this->help_base are set, this function is a noop.
+ *
+ * @return array<array-key, string>|null|string
*/
- public function getHelpPages(): array
+ public function getHelpPages()
{
return $this->help_class->getHelpTopics();
}
@@ -292,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 .= "
@@ -344,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
@@ -505,8 +458,7 @@ class Postgres extends ADOdbBase
* end of quote if matching non-backslashed character.
* backslashes don't count for double quotes, though.
*/
- if (
- \mb_substr($line, $i, 1) === $in_quote &&
+ if (\mb_substr($line, $i, 1) === $in_quote &&
(0 === $bslash_count % 2 || '"' === $in_quote)
) {
$in_quote = 0;
@@ -532,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);
@@ -580,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 */
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 6df728fe..eec71a9e 100644
--- a/src/database/databasetraits/TableTrait.php
+++ b/src/database/databasetraits/TableTrait.php
@@ -1422,8 +1422,7 @@ trait TableTrait
$this->fieldClean($atts->fields['attname']);
$sql .= " \"{$atts->fields['attname']}\"";
// Dump SERIAL and BIGSERIAL columns correctly
- if (
- $this->phpBool($atts->fields['attisserial']) &&
+ if ($this->phpBool($atts->fields['attisserial']) &&
('integer' === $atts->fields['type'] || 'bigint' === $atts->fields['type'])
) {
if ('integer' === $atts->fields['type']) {
diff --git a/src/decorators/ActionUrlDecorator.php b/src/decorators/ActionUrlDecorator.php
index 31c1e3e2..26ecfc3c 100644
--- a/src/decorators/ActionUrlDecorator.php
+++ b/src/decorators/ActionUrlDecorator.php
@@ -41,6 +41,6 @@ class ActionUrlDecorator extends Decorator
}
}
- return self::SUBFOLDER . '/src/views/' . \str_replace('.php', '', $url);
+ return \containerInstance()->subFolder . '/src/views/' . \str_replace('.php', '', $url);
}
}
diff --git a/src/decorators/BranchUrlDecorator.php b/src/decorators/BranchUrlDecorator.php
index 869162f1..0b3cb1ac 100644
--- a/src/decorators/BranchUrlDecorator.php
+++ b/src/decorators/BranchUrlDecorator.php
@@ -43,8 +43,8 @@ class BranchUrlDecorator extends Decorator
$url = \str_replace('//', '/', '/src/views/' . $url);
}
- if (self::SUBFOLDER !== '' && (0 === \mb_strpos($url, '/')) && (0 !== \mb_strpos($url, self::SUBFOLDER))) {
- $url = \str_replace('//', '/', self::SUBFOLDER . '/' . $url);
+ if ('' !== containerInstance()->subFolder && (0 === \mb_strpos($url, '/')) && (0 !== \mb_strpos($url, \containerInstance()->subFolder))) {
+ $url = \str_replace('//', '/', \containerInstance()->subFolder . '/' . $url);
}
return \str_replace('.php', '', $url);
diff --git a/src/decorators/Decorator.php b/src/decorators/Decorator.php
index 07947bdc..5609e5e9 100644
--- a/src/decorators/Decorator.php
+++ b/src/decorators/Decorator.php
@@ -6,25 +6,10 @@
namespace PHPPgAdmin\Decorators;
-use PHPPgAdmin\ContainerUtils;
-
class Decorator
{
use \PHPPgAdmin\Traits\HelperTrait;
- /**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
-
public $container;
public function __construct($value)
diff --git a/src/decorators/RedirectUrlDecorator.php b/src/decorators/RedirectUrlDecorator.php
index 90921e0b..9aebb881 100644
--- a/src/decorators/RedirectUrlDecorator.php
+++ b/src/decorators/RedirectUrlDecorator.php
@@ -45,8 +45,8 @@ class RedirectUrlDecorator extends Decorator
}
}
- if (self::SUBFOLDER !== '' && (0 === \mb_strpos($url, '/')) && (false === \mb_strpos($url, self::SUBFOLDER))) {
- $url = \str_replace('//', '/', self::SUBFOLDER . '/' . $url);
+ if ('' !== containerInstance()->subFolder && (0 === \mb_strpos($url, '/')) && (false === \mb_strpos($url, \containerInstance()->subFolder))) {
+ $url = \str_replace('//', '/', \containerInstance()->subFolder . '/' . $url);
}
return \str_replace('.php', '', $url);
diff --git a/src/decorators/UrlDecorator.php b/src/decorators/UrlDecorator.php
index 1a7d76ed..fabfb542 100644
--- a/src/decorators/UrlDecorator.php
+++ b/src/decorators/UrlDecorator.php
@@ -37,8 +37,8 @@ class UrlDecorator extends Decorator
}
}
- if (self::SUBFOLDER !== '' && (0 === \mb_strpos($url, '/')) && (false === \mb_strpos($url, self::SUBFOLDER))) {
- $url = \str_replace('//', '/', self::SUBFOLDER . '/' . $url);
+ if ('' !== containerInstance()->subFolder && (0 === \mb_strpos($url, '/')) && (false === \mb_strpos($url, \containerInstance()->subFolder))) {
+ $url = \str_replace('//', '/', \containerInstance()->subFolder . '/' . $url);
}
return $url;
diff --git a/src/help/PostgresDoc.php b/src/help/PostgresDoc.php
index c25c3938..b82f1102 100644
--- a/src/help/PostgresDoc.php
+++ b/src/help/PostgresDoc.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 7.4 documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc
{
@@ -188,7 +190,7 @@ class PostgresDoc
*
* @return null|string|string[]
*/
- public function getHelpTopics(?string $topic = null): array
+ public function getHelpTopics(?string $topic = null)
{
return $topic ? $this->help_topics[$topic] ?? null : $this->help_topics;
}
diff --git a/src/help/PostgresDoc10.php b/src/help/PostgresDoc10.php
index 47fcf9cd..6e5e9ec1 100644
--- a/src/help/PostgresDoc10.php
+++ b/src/help/PostgresDoc10.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 10.x documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc10 extends PostgresDoc96
{
diff --git a/src/help/PostgresDoc11.php b/src/help/PostgresDoc11.php
index 103f3ed9..19b24e97 100644
--- a/src/help/PostgresDoc11.php
+++ b/src/help/PostgresDoc11.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 11.x documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc11 extends PostgresDoc10
{
diff --git a/src/help/PostgresDoc12.php b/src/help/PostgresDoc12.php
index 0d360c70..0bc63c25 100644
--- a/src/help/PostgresDoc12.php
+++ b/src/help/PostgresDoc12.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 12.x documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc12 extends PostgresDoc11
{
diff --git a/src/help/PostgresDoc90.php b/src/help/PostgresDoc90.php
index eb94e437..fb1493f6 100644
--- a/src/help/PostgresDoc90.php
+++ b/src/help/PostgresDoc90.php
@@ -10,6 +10,8 @@ namespace PHPPgAdmin\Help;
* Help links for PostgreSQL 9.0 documentation.
*
* Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc90 extends PostgresDoc
{
diff --git a/src/help/PostgresDoc91.php b/src/help/PostgresDoc91.php
index 0b824106..66c2230c 100644
--- a/src/help/PostgresDoc91.php
+++ b/src/help/PostgresDoc91.php
@@ -10,6 +10,8 @@ namespace PHPPgAdmin\Help;
* Help links for PostgreSQL 9.1 documentation.
*
* Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc91 extends PostgresDoc90
{
diff --git a/src/help/PostgresDoc92.php b/src/help/PostgresDoc92.php
index 722f41db..e86f7f00 100644
--- a/src/help/PostgresDoc92.php
+++ b/src/help/PostgresDoc92.php
@@ -10,6 +10,8 @@ namespace PHPPgAdmin\Help;
* Help links for PostgreSQL 9.2 documentation.
*
* Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc92 extends PostgresDoc91
{
diff --git a/src/help/PostgresDoc93.php b/src/help/PostgresDoc93.php
index cad85288..6a9b0626 100644
--- a/src/help/PostgresDoc93.php
+++ b/src/help/PostgresDoc93.php
@@ -10,6 +10,8 @@ namespace PHPPgAdmin\Help;
* Help links for PostgreSQL 9.3 documentation.
*
* Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc93 extends PostgresDoc92
{
diff --git a/src/help/PostgresDoc94.php b/src/help/PostgresDoc94.php
index d1e8b024..fe8d2677 100644
--- a/src/help/PostgresDoc94.php
+++ b/src/help/PostgresDoc94.php
@@ -10,6 +10,8 @@ namespace PHPPgAdmin\Help;
* Help links for PostgreSQL 9.4 documentation.
*
* Release: PostgresDoc84.php,v 1.3 2008/11/18 21:35:48 ioguix Exp $
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc94 extends PostgresDoc93
{
diff --git a/src/help/PostgresDoc95.php b/src/help/PostgresDoc95.php
index ca816526..7759ce44 100644
--- a/src/help/PostgresDoc95.php
+++ b/src/help/PostgresDoc95.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 9.5 documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc95 extends PostgresDoc94
{
diff --git a/src/help/PostgresDoc96.php b/src/help/PostgresDoc96.php
index f7b7238b..7e43a998 100644
--- a/src/help/PostgresDoc96.php
+++ b/src/help/PostgresDoc96.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Help;
/**
* Help links for PostgreSQL 9.6 documentation.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PostgresDoc96 extends PostgresDoc95
{
diff --git a/src/lib.inc.php b/src/lib.inc.php
index a2417192..139b6f05 100644
--- a/src/lib.inc.php
+++ b/src/lib.inc.php
@@ -4,6 +4,8 @@
* PHPPgAdmin 6.0.0
*/
+use Slim\App;
+
\defined('BASE_PATH') || \define('BASE_PATH', \dirname(__DIR__));
\defined('THEME_PATH') || \define('THEME_PATH', \dirname(__DIR__) . '/assets/themes');
@@ -15,14 +17,30 @@ if (!\is_writable(\dirname(__DIR__) . '/temp')) {
}
require_once \dirname(__DIR__) . '/vendor/autoload.php';
-$subfolder = '';
-// Check to see if the configuration file exists, if not, explain
-if (!\file_exists(\dirname(__DIR__) . '/config.inc.php')) {
- die('Configuration error: Copy config.inc.php-dist to config.inc.php and edit appropriately.');
+
+$shouldSetSession = (\defined('PHP_SESSION_ACTIVE') ? \PHP_SESSION_ACTIVE !== \session_status() : !\session_id())
+ && !\headers_sent()
+ && !\ini_get('session.auto_start');
+
+if ($shouldSetSession && \PHP_SAPI !== 'cli') {
+ \session_set_cookie_params(0, '/', $_SERVER['HTTP_HOST'], isset($_SERVER['HTTPS']));
+ \session_name('PPA_ID');
+ \session_start();
}
+
+\defined('ADODB_ERROR_HANDLER_TYPE') || \define('ADODB_ERROR_HANDLER_TYPE', \E_USER_ERROR);
+\defined('ADODB_ERROR_HANDLER') || \define('ADODB_ERROR_HANDLER', '\PHPPgAdmin\ADOdbException::adodb_throw');
+
+function getAppInstance(): \Slim\App
+{
+ $subfolder = '';
+ // Check to see if the configuration file exists, if not, explain
+ if (!\file_exists(\dirname(__DIR__) . '/config.inc.php')) {
+ die('Configuration error: Copy config.inc.php-dist to config.inc.php and edit appropriately.');
+ }
$conf = [];
- include \dirname(__DIR__) . '/config.inc.php';
+ include_once \dirname(__DIR__) . '/config.inc.php';
if (isset($conf['subfolder']) && \is_string($conf['subfolder'])) {
$subfolder = $conf['subfolder'];
@@ -36,105 +54,50 @@ if (!\file_exists(\dirname(__DIR__) . '/config.inc.php')) {
);
}
-\defined('PHPPGA_SUBFOLDER') || \define('PHPPGA_SUBFOLDER', $subfolder);
-$shouldSetSession = (\defined('PHP_SESSION_ACTIVE') ? \PHP_SESSION_ACTIVE !== \session_status() : !\session_id())
-&& !\headers_sent()
-&& !\ini_get('session.auto_start');
+ $conf['subfolder'] = $subfolder;
-if ($shouldSetSession && \PHP_SAPI !== 'cli') {
- \session_set_cookie_params(0, '/', $_SERVER['HTTP_HOST'], isset($_SERVER['HTTPS']));
- \session_name('PPA_ID');
- \session_start();
-}
+ $conf['debugmode'] = (!isset($conf['debugmode'])) ? false : (bool) ($conf['debugmode']);
-$debugmode = (!isset($conf['debugmode'])) ? false : (bool) ($conf['debugmode']);
-\defined('DEBUGMODE') || \define('DEBUGMODE', $debugmode);
+ if ($conf['debugmode']) {
+ \ini_set('display_startup_errors', 'On');
+ \ini_set('opcache.revalidate_freq', '0');
+ \error_reporting(\E_ALL);
-if (!\defined('ADODB_ERROR_HANDLER_TYPE')) {
- \define('ADODB_ERROR_HANDLER_TYPE', \E_USER_ERROR);
-}
-
-if (!\defined('ADODB_ERROR_HANDLER')) {
- \define('ADODB_ERROR_HANDLER', '\PHPPgAdmin\ADOdbException::adodb_throw');
-}
+ if (\array_key_exists('register_debuggers', $conf) && \is_callable($conf['register_debuggers'])) {
+ $conf['register_debuggers']();
+ }
+ }
-if (DEBUGMODE) {
- \ini_set('display_errors', 'On');
+ $conf['BASE_PATH'] = BASE_PATH;
+ $conf['theme_path'] = BASE_PATH . '/assets/themes';
+ \defined('IN_TEST') || \define('IN_TEST', false);
+ $conf['IN_TEST'] = IN_TEST;
+ \defined('ADODB_ASSOC_CASE') || \define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_NATIVE);
- \ini_set('display_startup_errors', 'On');
- \ini_set('opcache.revalidate_freq', '0');
- \error_reporting(\E_ALL);
+ // Fetch App and DI Container
+ $app = \PHPPgAdmin\ContainerUtils::getAppInstance($conf);
- if (\array_key_exists('register_debuggers', $conf) && \is_callable($conf['register_debuggers'])) {
- $conf['register_debuggers']();
- }
+ return $app;
}
-\define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_NATIVE);
-// Fetch App and DI Container
-$app = \PHPPgAdmin\ContainerUtils::createApp($conf);
-$container = $app->getContainer();
-if (!$container instanceof \Slim\Container) {
- \trigger_error('App Container must be an instance of \\Slim\\Container', \E_USER_ERROR);
-}
-function containerInstance(): \Slim\Container
+function containerInstance(): \PHPPgAdmin\ContainerUtils
{
- return \PHPPgAdmin\ContainerUtils::getContainerInstance();
+ $app = getAppInstance();
+ $container = $app->getContainer();
+
+ if (!$container instanceof \PHPPgAdmin\ContainerUtils) {
+ \trigger_error('App Container must be an instance of \\Slim\\Container', \E_USER_ERROR);
+ }
+
+ return $container;
}
function requestInstance(): \Slim\Http\Request
{
- return containerInstance()->request;
+ return \containerInstance()->request;
}
- function responseInstance(): \Slim\Http\Response
- {
- return containerInstance()->response;
- }
-
-// This should be deprecated once we're sure no php scripts are required directly
-$container->offsetSet('server', $_REQUEST['server'] ?? null);
-$container->offsetSet('database', $_REQUEST['database'] ?? null);
-$container->offsetSet('schema', $_REQUEST['schema'] ?? null);
-
-$container['haltHandler'] = static function (\Slim\Container $c) {
- return static function ($request, $response, $exits, $status = 500) use ($c) {
- $title = 'PHPPgAdmin Error';
-
- $html = '<p>The application could not run because of the following error:</p>';
-
- $output = \sprintf(
- "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" .
- '<title>%s</title><style>' .
- 'body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}' .
- 'h3{margin:0;font-size:28px;font-weight:normal;line-height:30px;}' .
- 'span{display:inline-block;font-size:16px;}' .
- '</style></head><body><h3>%s</h3><p>%s</p><span>%s</span></body></html>',
- $title,
- $title,
- $html,
- \implode('<br>', $exits)
- );
-
- $body = $response->getBody(); //new \Slim\Http\Body(fopen('php://temp', 'r+'));
- $body->write($output);
-
- return $response
- ->withStatus($status)
- ->withHeader('Content-type', 'text/html')
- ->withBody($body);
- };
-};
-
-// Set the requestobj and responseobj properties of the container
-// as the value of $request and $response, which already contain the route
-$app->add(new \PHPPgAdmin\Middleware\PopulateRequestResponse($container));
-
-$container['action'] = $_REQUEST['action'] ?? '';
-
-if (!isset($msg)) {
- $msg = '';
+function responseInstance(): \Slim\Http\Response
+{
+ return \containerInstance()->response;
}
-
-$container['msg'] = $msg;
-//ddd($container->misc);
diff --git a/src/middleware/PopulateRequestResponse.php b/src/middleware/PopulateRequestResponse.php
index 8a3828cc..e453d666 100644
--- a/src/middleware/PopulateRequestResponse.php
+++ b/src/middleware/PopulateRequestResponse.php
@@ -20,16 +20,16 @@ class PopulateRequestResponse extends Middleware
$next
) {
$container = $this->container;
- $subfolder = $this->getSubfolder();
- $container['requestobj'] = $request;
- $container['responseobj'] = $response;
+ $subfolder = $this->container->getSubfolder();
+
$route = $request->getAttribute('route');
$container['server'] = $request->getParam('server');
$container['database'] = $request->getParam('database');
$container['schema'] = $request->getParam('schema');
$misc = $container->get('misc');
- $view = $container->get('view');
+
+ $view = $this->getViewManager($container);
$misc->setHREF();
$view->setForm();
@@ -41,10 +41,13 @@ class PopulateRequestResponse extends Middleware
$container['server'] = $route->getArgument('server', $request->getParam('server'));
}
- $query_string = $request->getUri()->getQuery();
+ $request = $request->withUri($this->getUri($request)->withBasePath($subfolder));
+ $uri = $request->getUri();
+ $query_string = $uri->getQuery();
+ $requestPath = $uri->getPath();
+
$view->offsetSet('query_string', $query_string);
- $path = ($subfolder ? ($subfolder . '/') : '')
- . $request->getUri()->getPath() . ($query_string ? '?' . $query_string : '');
+ $path = $requestPath . ($query_string ? '?' . $query_string : '');
$view->offsetSet('path', $path);
$params = $request->getParams();
@@ -71,13 +74,27 @@ class PopulateRequestResponse extends Middleware
$view->offsetSet('in_test', $in_test);
if (0 < \count($container['errors'])) {
- return ($container->haltHandler)($container->requestobj, $container->responseobj, $container['errors'], 412);
+ return ($container->haltHandler)($request, $response, $container['errors'], 412);
}
+ $enqueued_reload_browser = ($container->flash->getFirstMessage('reload_browser') ?? false);
+ if ($enqueued_reload_browser) {
+ $view->setReloadBrowser($enqueued_reload_browser);
+ }
// First execute anything else
$response = $next($request, $response);
// Any other request, pass on current response
return $response;
}
+
+ private function getUri(\Slim\Http\Request $request): \Slim\Http\Uri
+ {
+ return $request->getUri();
+ }
+
+ private function getViewManager(\PHPPgAdmin\ContainerUtils $container): \PHPPgAdmin\ViewManager
+ {
+ return $container->get('view');
+ }
}
diff --git a/src/router.php b/src/router.php
index c3d707c1..b7bf4df4 100644
--- a/src/router.php
+++ b/src/router.php
@@ -5,31 +5,34 @@
*/
require_once __DIR__ . '/lib.inc.php';
+$app = getAppInstance();
+$container = containerInstance();
+
+// Set the requestobj and responseobj properties of the container
+// as the value of $request and $response, which already contain the route
+$app->add(new \PHPPgAdmin\Middleware\PopulateRequestResponse($container));
+
+if (!isset($msg)) {
+ $msg = '';
+}
+$container['msg'] = $msg;
+//ddd($container->misc);
+
$app->get('/status', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
- \phpinfo();
-
- return;
- //dump($this->get('settings')->all());
return $response
->withHeader('Content-type', 'application/json')
->withJson(
- DEBUGMODE ? $this->get('settings')->all() : ['version' => $this->version]
+ $this->get('settings')['debug'] ? $this->get('settings')->all() : ['version' => $this->version]
);
});
$app->post('/redirect/server', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
$body = $response->getBody();
@@ -52,6 +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()));
@@ -63,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);
+ $destinationurl = $this->getDestinationWithLastTab($subject);
return $response->withStatus(302)->withHeader('Location', $destinationurl);
});
$app->map(['GET', 'POST'], '/src/views/{subject}', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
$subject = $args['subject'];
@@ -110,11 +109,11 @@ $app->map(['GET', 'POST'], '/src/views/{subject}', function (
$safe_subjects = ('servers' === $subject || 'intro' === $subject || 'browser' === $subject);
if (null === $this->misc->getServerId() && !$safe_subjects) {
- return $response->withStatus(302)->withHeader('Location', SUBFOLDER . '/src/views/servers');
+ return $response->withStatus(302)->withHeader('Location', $this->subFolder . '/src/views/servers');
}
if (!isset($_server_info['username']) && 'login' !== $subject && !$safe_subjects) {
- $destinationurl = SUBFOLDER . '/src/views/login?server=' . $this->misc->getServerId();
+ $destinationurl = $this->subFolder . '/src/views/login?server=' . $this->misc->getServerId();
return $response->withStatus(302)->withHeader('Location', $destinationurl);
}
@@ -126,11 +125,8 @@ $app->map(['GET', 'POST'], '/src/views/{subject}', function (
});
$app->get('/{subject:\w+}[/{server_id}]', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
$subject = $args['subject'] ?? 'intro';
@@ -153,11 +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';
@@ -168,11 +161,8 @@ $app->get('/', function (
});
$app->get('[/{path:.*}]', function (
- /* @scrutinizer ignore-unused */
\Slim\Http\Request $request,
- /* @scrutinizer ignore-unused */
\Slim\Http\Response $response,
- /* @scrutinizer ignore-unused */
array $args
) {
$filepath = \dirname(__DIR__) . '/' . $args['path'];
@@ -180,7 +170,7 @@ $app->get('[/{path:.*}]', function (
//d($this->subfolder, $args, $query_string, $filepath);
- $this->utils->prtrace($request->getAttribute('route'));
+ $this->prtrace($request->getAttribute('route'));
return $response->write($args['path'] ? $args['path'] : 'index');
});
diff --git a/src/traits/AdminTrait.php b/src/traits/AdminTrait.php
index 8460eaa3..be95a1b2 100644
--- a/src/traits/AdminTrait.php
+++ b/src/traits/AdminTrait.php
@@ -34,7 +34,7 @@ trait AdminTrait
$this->printTrail('schema');
$this->printTitle($this->lang['strclusterindex'], 'pg.index.cluster');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
@@ -45,7 +45,7 @@ trait AdminTrait
$this->printTrail($type);
$this->printTitle($this->lang['strclusterindex'], 'pg.index.cluster');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
if ('table' === $type) {
echo '<p>', \sprintf($this->lang['strconfclustertable'], $this->misc->printVal($_REQUEST['object'])), '</p>' . \PHP_EOL;
@@ -86,7 +86,7 @@ trait AdminTrait
$this->printTrail('schema');
$this->printTitle($this->lang['strreindex'], 'pg.reindex');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
@@ -97,7 +97,7 @@ trait AdminTrait
$this->printTrail($type);
$this->printTitle($this->lang['strreindex'], 'pg.reindex');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
if ('table' === $type) {
echo '<p>', \sprintf($this->lang['strconfreindextable'], $this->misc->printVal($_REQUEST['object'])), '</p>' . \PHP_EOL;
@@ -141,11 +141,10 @@ trait AdminTrait
$this->printTrail('schema');
$this->printTitle($this->lang['stranalyze'], 'pg.analyze');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
- //\Kint::dump($a);
echo '<p>', \sprintf($this->lang['strconfanalyzetable'], $this->misc->printVal($a['table'])), '</p>' . \PHP_EOL;
echo '<input type="hidden" name="table[]" value="', \htmlspecialchars($a['table']), '" />' . \PHP_EOL;
} // END if multi analyze
@@ -153,7 +152,7 @@ trait AdminTrait
$this->printTrail($type);
$this->printTitle($this->lang['stranalyze'], 'pg.analyze');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
if ('table' === $type) {
echo '<p>', \sprintf($this->lang['strconfanalyzetable'], $this->misc->printVal($_REQUEST['object'])), '</p>' . \PHP_EOL;
@@ -190,7 +189,7 @@ trait AdminTrait
$this->printTrail('schema');
$this->printTitle($this->lang['strvacuum'], 'pg.vacuum');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
foreach ($_REQUEST['ma'] as $v) {
$a = \unserialize(\htmlspecialchars_decode($v, \ENT_QUOTES));
@@ -202,7 +201,7 @@ trait AdminTrait
$this->printTrail($type);
$this->printTitle($this->lang['strvacuum'], 'pg.vacuum');
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
if ('table' === $type) {
echo '<p>', \sprintf($this->lang['strconfvacuumtable'], $this->misc->printVal($_REQUEST['object'])), '</p>' . \PHP_EOL;
@@ -286,7 +285,7 @@ trait AdminTrait
$old_val['autovacuum_vacuum_cost_limit'] = '';
}
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
echo $this->view->form;
echo '<input type="hidden" name="action" value="editautovac" />' . \PHP_EOL;
echo \sprintf('<input type="hidden" name="table" value="%s" />%s', \htmlspecialchars($_REQUEST['table']), \PHP_EOL);
@@ -384,9 +383,19 @@ trait AdminTrait
$msg .= \sprintf('%s<br />', $sql);
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['strclusteredgood']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strclusteredgood']
+ );
} else {
- $this->doDefault(\sprintf('%s %s%s: %s<br />', $type, $msg, \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['strclusteredbad']));
+ $this->doDefault(\sprintf(
+ '%s %s%s: %s<br />',
+ $type,
+ $msg,
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strclusteredbad']
+ ));
return;
}
@@ -440,21 +449,31 @@ trait AdminTrait
$status = $data->reindex(\mb_strtoupper($type), $o, isset($_REQUEST['reindex_force']));
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['strreindexgood']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strreindexgood']
+ );
} else {
- $this->doDefault(\sprintf('%s %s%s: %s<br />', $type, $msg, \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['strreindexbad']));
+ $this->doDefault(\sprintf(
+ '%s %s%s: %s<br />',
+ $type,
+ $msg,
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strreindexbad']
+ ));
return;
}
}
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
$status = $data->reindex(\mb_strtoupper($type), $_REQUEST['object'], isset($_REQUEST['reindex_force']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doAdmin($type, $this->lang['strreindexgood']);
} else {
$this->doAdmin($type, $this->lang['strreindexbad']);
@@ -485,22 +504,32 @@ trait AdminTrait
$status = $data->analyzeDB($o);
if (0 === $status) {
- $msg .= \sprintf('%s: %s<br />', \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['stranalyzegood']);
+ $msg .= \sprintf(
+ '%s: %s<br />',
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['stranalyzegood']
+ );
} else {
- $this->doDefault(\sprintf('%s %s%s: %s<br />', $type, $msg, \htmlentities($o, \ENT_QUOTES, 'UTF-8'), $this->lang['stranalyzebad']));
+ $this->doDefault(\sprintf(
+ '%s %s%s: %s<br />',
+ $type,
+ $msg,
+ \htmlentities($o, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['stranalyzebad']
+ ));
return;
}
}
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doDefault($msg);
} else {
//we must pass table here. When empty, analyze the whole db
$status = $data->analyzeDB($_REQUEST['table']);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
$this->doAdmin($type, $this->lang['stranalyzegood']);
} else {
$this->doAdmin($type, $this->lang['stranalyzebad']);
@@ -531,12 +560,24 @@ trait AdminTrait
[$status, $sql] = $data->vacuumDB($t, isset($_REQUEST['vacuum_analyze']), isset($_REQUEST['vacuum_full']), isset($_REQUEST['vacuum_freeze']));
if (0 !== $status) {
- return $this->doDefault(\sprintf('%s %s%s: %s<br />', $type, $msg, \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strvacuumbad']));
+ return $this->doDefault(\sprintf(
+ '%s %s%s: %s<br />',
+ $type,
+ $msg,
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strvacuumbad']
+ ));
}
- $msg .= \sprintf('%s%s %s: %s<br />', $sql, \PHP_EOL, \htmlentities($t, \ENT_QUOTES, 'UTF-8'), $this->lang['strvacuumgood']);
+ $msg .= \sprintf(
+ '%s%s %s: %s<br />',
+ $sql,
+ \PHP_EOL,
+ \htmlentities($t, \ENT_QUOTES, 'UTF-8'),
+ $this->lang['strvacuumgood']
+ );
}
// Everything went fine, back to the Default page....
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
return $this->doDefault($msg);
}
@@ -544,7 +585,7 @@ trait AdminTrait
[$status, $sql] = $data->vacuumDB($_REQUEST['table'], isset($_REQUEST['vacuum_analyze']), isset($_REQUEST['vacuum_full']), isset($_REQUEST['vacuum_freeze']));
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
return $this->doAdmin($type, \sprintf('%s%s%s', $sql, \PHP_EOL, $this->lang['strvacuumgood']));
}
@@ -647,7 +688,12 @@ trait AdminTrait
echo '</th>';
$table_hidden_inputs = ('table' === $type) ?
- \sprintf('<input type="hidden" name="table" value="%s" />%s<input type="hidden" name="subject" value="table" />', \htmlspecialchars($_REQUEST['object']), \PHP_EOL, \PHP_EOL) : '';
+ \sprintf(
+ '<input type="hidden" name="table" value="%s" />%s<input type="hidden" name="subject" value="table" />%s',
+ \htmlspecialchars($_REQUEST['object']),
+ \PHP_EOL,
+ \PHP_EOL
+ ) : '';
[$recluster_help, $reclusterconf] = $this->_getReclusterConf($data, $type, $table_hidden_inputs);
@@ -661,7 +707,7 @@ trait AdminTrait
// Vacuum
echo '<tr class="row1">' . \PHP_EOL;
echo '<td style="text-align: center; vertical-align: bottom">' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="confirm_vacuum" />' . \PHP_EOL;
echo $this->view->form;
@@ -672,7 +718,7 @@ trait AdminTrait
// Analyze
echo '<td style="text-align: center; vertical-align: bottom">' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="confirm_analyze" />' . \PHP_EOL;
echo $this->view->form;
echo $table_hidden_inputs;
@@ -685,7 +731,7 @@ trait AdminTrait
// Reindex
echo '<td style="text-align: center; vertical-align: bottom">' . \PHP_EOL;
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
echo '<p><input type="hidden" name="action" value="confirm_reindex" />' . \PHP_EOL;
echo $this->view->form;
echo $table_hidden_inputs;
@@ -803,11 +849,14 @@ trait AdminTrait
return ['', ''];
}
$script = $this->script;
- $recluster_help = \sprintf('<th class="data">%s</th>', $this->view->printHelp($this->lang['strclusterindex'], 'pg.index.cluster', false));
+ $recluster_help = \sprintf(
+ '<th class="data">%s</th>',
+ $this->view->printHelp($this->lang['strclusterindex'], 'pg.index.cluster', false)
+ );
$disabled = '';
$reclusterconf = '<td style="text-align: center; vertical-align: bottom">' . \PHP_EOL;
- $reclusterconf .= '<form action="' . self::SUBFOLDER . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
+ $reclusterconf .= '<form action="' . \containerInstance()->subFolder . "/src/views/{$script}\" method=\"post\">" . \PHP_EOL;
$reclusterconf .= $this->view->form;
$reclusterconf .= $table_hidden_inputs;
@@ -854,48 +903,55 @@ trait AdminTrait
'namespace' => [
'title' => $this->lang['strschema'],
'field' => Decorator::field('nspname'),
- 'url' => self::SUBFOLDER . "/redirect/schema?{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/schema?{$this->misc->href}&amp;",
'vars' => ['schema' => 'nspname'],
],
'relname' => [
'title' => $this->lang['strtable'],
'field' => Decorator::field('relname'),
- 'url' => self::SUBFOLDER . "/redirect/table?{$this->misc->href}&amp;",
+ 'url' => \containerInstance()->subFolder . "/redirect/table?{$this->misc->href}&amp;",
'vars' => ['table' => 'relname', 'schema' => 'nspname'],
],
'autovacuum_enabled' => [
'title' => $this->lang['strenabled'],
- 'field' => Decorator::callback($enlight, ['autovacuum_enabled', $defaults['autovacuum']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_enabled',
+ $defaults['autovacuum'], ]),
'type' => 'verbatim',
],
'autovacuum_vacuum_threshold' => [
'title' => $this->lang['strvacuumbasethreshold'],
- 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_threshold', $defaults['autovacuum_vacuum_threshold']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_threshold',
+ $defaults['autovacuum_vacuum_threshold'], ]),
'type' => 'verbatim',
],
'autovacuum_vacuum_scale_factor' => [
'title' => $this->lang['strvacuumscalefactor'],
- 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_scale_factor', $defaults['autovacuum_vacuum_scale_factor']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_scale_factor',
+ $defaults['autovacuum_vacuum_scale_factor'], ]),
'type' => 'verbatim',
],
'autovacuum_analyze_threshold' => [
'title' => $this->lang['stranalybasethreshold'],
- 'field' => Decorator::callback($enlight, ['autovacuum_analyze_threshold', $defaults['autovacuum_analyze_threshold']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_analyze_threshold',
+ $defaults['autovacuum_analyze_threshold'], ]),
'type' => 'verbatim',
],
'autovacuum_analyze_scale_factor' => [
'title' => $this->lang['stranalyzescalefactor'],
- 'field' => Decorator::callback($enlight, ['autovacuum_analyze_scale_factor', $defaults['autovacuum_analyze_scale_factor']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_analyze_scale_factor',
+ $defaults['autovacuum_analyze_scale_factor'], ]),
'type' => 'verbatim',
],
'autovacuum_vacuum_cost_delay' => [
'title' => $this->lang['strvacuumcostdelay'],
- 'field' => Decorator::concat(Decorator::callback($enlight, ['autovacuum_vacuum_cost_delay', $defaults['autovacuum_vacuum_cost_delay']]), 'ms'),
+ 'field' => Decorator::concat(Decorator::callback($enlight, ['autovacuum_vacuum_cost_delay',
+ $defaults['autovacuum_vacuum_cost_delay'], ]), 'ms'),
'type' => 'verbatim',
],
'autovacuum_vacuum_cost_limit' => [
'title' => $this->lang['strvacuumcostlimit'],
- 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_cost_limit', $defaults['autovacuum_vacuum_cost_limit']]),
+ 'field' => Decorator::callback($enlight, ['autovacuum_vacuum_cost_limit',
+ $defaults['autovacuum_vacuum_cost_limit'], ]),
'type' => 'verbatim',
],
];
@@ -935,7 +991,8 @@ trait AdminTrait
];
if ('table' === $type) {
- unset($actions['edit']['vars']['schema'],
+ unset(
+ $actions['edit']['vars']['schema'],
$actions['delete']['vars']['schema'],
$columns['namespace'],
$columns['relname']
@@ -947,7 +1004,7 @@ trait AdminTrait
if (('table' === $type) && (0 === $autovac->recordCount())) {
echo '<br />';
- echo '<a href="' . self::SUBFOLDER . "/src/views/tables?action=confeditautovac&amp;{$this->misc->href}&amp;table=";
+ echo '<a href="' . \containerInstance()->subFolder . "/src/views/tables?action=confeditautovac&amp;{$this->misc->href}&amp;table=";
echo \htmlspecialchars($_REQUEST['table']);
echo "\">{$this->lang['straddvacuumtable']}</a>";
}
diff --git a/src/traits/ExportTrait.php b/src/traits/ExportTrait.php
index 803bb58b..9098c2df 100644
--- a/src/traits/ExportTrait.php
+++ b/src/traits/ExportTrait.php
@@ -172,7 +172,7 @@ trait ExportTrait
{
$content = \sprintf(
'<form id="export_form" action="%s/%s" method="post">%s',
- self::SUBFOLDER . '/src/views',
+ \containerInstance()->subFolder . '/src/views',
$endpoint,
\PHP_EOL
);
diff --git a/src/traits/HelperTrait.php b/src/traits/HelperTrait.php
index 0728ede1..e7c3d1ef 100644
--- a/src/traits/HelperTrait.php
+++ b/src/traits/HelperTrait.php
@@ -19,29 +19,6 @@ namespace PHPPgAdmin\Traits;
trait HelperTrait
{
/**
- * static reference to subfolder in which the app is running.
- *
- * @var null|string
- */
- public static $subFolder = null;
-
- /**
- * Gets the subfolder.
- *
- * @param string $path The path
- *
- * @return string the subfolder
- */
- public function getSubfolder(string $path = ''): string
- {
- if (null === self::$subFolder) {
- self::$subFolder = $this->container->subfolder;
- }
-
- return \implode(\DIRECTORY_SEPARATOR, [self::$subFolder, $path]);
- }
-
- /**
* Halts the execution of the program. It's like calling exit() but using builtin Slim Exceptions.
*
* @param string $msg The message to show to the user
@@ -173,18 +150,6 @@ trait HelperTrait
}
/**
- * Returns a string with html <br> variant replaced with a new line.
- *
- * @param string $msg message to parse (<br> separated)
- *
- * @return string parsed message (linebreak separated)
- */
- public static function br2ln($msg)
- {
- return \str_replace(['<br>', '<br/>', '<br />'], \PHP_EOL, $msg);
- }
-
- /**
* Receives N parameters and sends them to the console adding where was it called from.
*
* @param array<int, mixed> $args
diff --git a/src/traits/InsertEditRowTrait.php b/src/traits/InsertEditRowTrait.php
index a6c2ac2a..742d518f 100644
--- a/src/traits/InsertEditRowTrait.php
+++ b/src/traits/InsertEditRowTrait.php
@@ -119,12 +119,12 @@ trait InsertEditRowTrait
$fksprops['code'] .= "var table='" . \addslashes(\htmlentities($table, \ENT_QUOTES, 'UTF-8')) . "';";
$fksprops['code'] .= "var server='" . \htmlentities($_REQUEST['server'], \ENT_QUOTES, 'UTF-8') . "';";
$fksprops['code'] .= "var database='" . \addslashes(\htmlentities($_REQUEST['database'], \ENT_QUOTES, 'UTF-8')) . "';";
- $fksprops['code'] .= "var subfolder='" . self::SUBFOLDER . "';";
+ $fksprops['code'] .= "var subfolder='" . \containerInstance()->subFolder . "';";
$fksprops['code'] .= '</script>' . \PHP_EOL;
$fksprops['code'] .= '<div id="fkbg"></div>';
$fksprops['code'] .= '<div id="fklist"></div>';
- $fksprops['code'] .= '<script src="' . self::SUBFOLDER . '/assets/js/ac_insert_row.js" type="text/javascript"></script>';
+ $fksprops['code'] .= '<script src="' . \containerInstance()->subFolder . '/assets/js/ac_insert_row.js" type="text/javascript"></script>';
} else {
/* we have no foreign keys on this table */
return false;
diff --git a/src/traits/MiscTrait.php b/src/traits/MiscTrait.php
index 7c5e21b4..be7a390c 100644
--- a/src/traits/MiscTrait.php
+++ b/src/traits/MiscTrait.php
@@ -6,6 +6,7 @@
namespace PHPPgAdmin\Traits;
+use PHPPgAdmin\ContainerUtils;
use PHPPgAdmin\Decorators\Decorator;
/**
@@ -161,11 +162,11 @@ trait MiscTrait
}
if (!isset($vars['url'])) {
- $vars['url'] = self::SUBFOLDER . '/redirect';
+ $vars['url'] = \containerInstance()->subFolder . '/redirect';
}
- if (self::SUBFOLDER . '/redirect' === $vars['url'] && isset($vars['params']['subject'])) {
- $vars['url'] = self::SUBFOLDER . '/redirect/' . $vars['params']['subject'];
+ if (containerInstance()->subFolder . '/redirect' === $vars['url'] && isset($vars['params']['subject'])) {
+ $vars['url'] = \containerInstance()->subFolder . '/redirect/' . $vars['params']['subject'];
unset($vars['params']['subject']);
}
@@ -287,7 +288,7 @@ trait MiscTrait
case 'cid':
case 'tid':
$align = 'right';
- $out = \nl2br(\htmlspecialchars(self::br2ln($str)));
+ $out = \nl2br(\htmlspecialchars(ContainerUtils::br2ln($str)));
break;
case 'yesno':
@@ -319,7 +320,7 @@ trait MiscTrait
break;
case 'nbsp':
- $out = \nl2br(\str_replace(' ', '&nbsp;', self::br2ln($str)));
+ $out = \nl2br(\str_replace(' ', '&nbsp;', ContainerUtils::br2ln($str)));
break;
case 'verbatim':
@@ -345,7 +346,7 @@ trait MiscTrait
$out = \htmlspecialchars($str);
} else {
//$tag = 'span';
- $out = \nl2br(\htmlspecialchars(self::br2ln($str)));
+ $out = \nl2br(\htmlspecialchars(ContainerUtils::br2ln($str)));
}
}
@@ -1038,14 +1039,14 @@ trait MiscTrait
return [
'sql' => [
'title' => $lang['strsql'],
- 'url' => self::SUBFOLDER . '/src/views/sqledit',
+ 'url' => \containerInstance()->subFolder . '/src/views/sqledit',
'urlvars' => ['action' => 'sql', 'subject' => 'schema'],
'help' => 'pg.sql',
'icon' => 'SqlEditor',
],
'find' => [
'title' => $lang['strfind'],
- 'url' => self::SUBFOLDER . '/src/views/sqledit',
+ 'url' => \containerInstance()->subFolder . '/src/views/sqledit',
'urlvars' => ['action' => 'find', 'subject' => 'schema'],
'icon' => 'Search',
],
@@ -1143,43 +1144,56 @@ trait MiscTrait
$tabs = [];
switch ($section) {
- case 'root':$tabs = $this->getTabsRoot($data);
+ case 'root':
+ $tabs = $this->getTabsRoot($data);
break;
- case 'server':$tabs = $this->getTabsServer($data);
+ case 'server':
+ $tabs = $this->getTabsServer($data);
break;
- case 'database':$tabs = $this->getTabsDatabase($data);
+ case 'database':
+ $tabs = $this->getTabsDatabase($data);
break;
- case 'schema':$tabs = $this->getTabsSchema($data);
+ case 'schema':
+ $tabs = $this->getTabsSchema($data);
break;
- case 'table':$tabs = $this->getTabsTable($data);
+ case 'table':
+ $tabs = $this->getTabsTable($data);
break;
- case 'view':$tabs = $this->getTabsView($data);
+ case 'view':
+ $tabs = $this->getTabsView($data);
break;
- case 'matview':$tabs = $this->getTabsMatview($data);
+ case 'matview':
+ $tabs = $this->getTabsMatview($data);
break;
- case 'function':$tabs = $this->getTabsFunction($data);
+ case 'function':
+ $tabs = $this->getTabsFunction($data);
break;
- case 'aggregate':$tabs = $this->getTabsAggregate($data);
+ case 'aggregate':
+ $tabs = $this->getTabsAggregate($data);
break;
- case 'role':$tabs = $this->getTabsRole($data);
+ case 'role':
+ $tabs = $this->getTabsRole($data);
break;
- case 'popup':$tabs = $this->getTabsPopup($data);
+ case 'popup':
+ $tabs = $this->getTabsPopup($data);
break;
- case 'column':$tabs = $this->getTabsColumn($data);
+ case 'column':
+ $tabs = $this->getTabsColumn($data);
break;
- case 'fulltext':$tabs = $this->getTabsFulltext($data);
+ case 'fulltext':
+ $tabs = $this->getTabsFulltext($data);
break;
}
diff --git a/src/traits/ViewsMatviewsTrait.php b/src/traits/ViewsMatviewsTrait.php
index 9a35516d..15813802 100644
--- a/src/traits/ViewsMatviewsTrait.php
+++ b/src/traits/ViewsMatviewsTrait.php
@@ -64,7 +64,7 @@ trait ViewsMatviewsTrait
$attrs = $data->getTableAttributes($_REQUEST[$this->keystring]);
- echo '<form action="' . self::SUBFOLDER . '/src/views/' . $this->script . '" method="post" id="selectform">';
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/' . $this->script . '" method="post" id="selectform">';
echo \PHP_EOL;
if (0 < $attrs->recordCount()) {
@@ -118,12 +118,13 @@ trait ViewsMatviewsTrait
'>', \htmlspecialchars($v), '</option>' . \PHP_EOL;
}
echo '</select></td>' . \PHP_EOL;
- echo '<td style="white-space:nowrap;">', $data->printField(
+ echo '<td style="white-space:nowrap;">';
+ echo $data->printField(
"values[{$attrs->fields['attname']}]",
$_REQUEST['values'][$attrs->fields['attname']],
$attrs->fields['type']
- ), '</td>';
- echo '</tr>' . \PHP_EOL;
+ );
+ echo '</td></tr>' . \PHP_EOL;
++$i;
$attrs->moveNext();
}
@@ -184,7 +185,7 @@ trait ViewsMatviewsTrait
$tables = $data->getAllTables();
- echo '<form action="' . self::SUBFOLDER . "/src/views/{$this->script}\" method=\"post\">" . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . "/src/views/{$this->script}\" method=\"post\">" . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strtables']}</th></tr>";
echo "<tr>\n<td class=\"data1\">" . \PHP_EOL;
@@ -322,7 +323,7 @@ trait ViewsMatviewsTrait
$status = $data->createView($_POST['formView'], $viewQuery, false, $_POST['formComment'], $is_materialized);
if (0 === $status) {
- $this->misc->setReloadBrowser(true);
+ $this->view->setReloadBrowser(true);
return $this->doDefault($this->lang['strviewcreated']);
}
@@ -375,7 +376,7 @@ trait ViewsMatviewsTrait
}
\asort($arrFields);
- echo '<form action="' . self::SUBFOLDER . '/src/views/materializedviews" method="post">' . \PHP_EOL;
+ echo '<form action="' . \containerInstance()->subFolder . '/src/views/materializedviews" method="post">' . \PHP_EOL;
echo '<table>' . \PHP_EOL;
echo "<tr><th class=\"data\">{$this->lang['strviewname']}</th></tr>";
echo "<tr>\n<td class=\"data1\">" . \PHP_EOL;
@@ -409,6 +410,7 @@ trait ViewsMatviewsTrait
for ($i = 0; $i < $linkCount; ++$i) {
// Initialise variables
+ $formLink[$i] = $formLink[$i] ?? [];
$this->coalesceArr($formLink[$i], 'operator', 'INNER JOIN');
echo "<tr>\n<td class=\"{$rowClass}\">" . \PHP_EOL;
diff --git a/src/translations/Afrikaans.php b/src/translations/Afrikaans.php
index 54633668..4a29df04 100644
--- a/src/translations/Afrikaans.php
+++ b/src/translations/Afrikaans.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Afrikaans language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Afrikaans extends AbstractLang
{
diff --git a/src/translations/Arabic.php b/src/translations/Arabic.php
index c1adb2c2..2bd22f60 100644
--- a/src/translations/Arabic.php
+++ b/src/translations/Arabic.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Arabic language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Arabic extends AbstractLang
{
diff --git a/src/translations/Catalan.php b/src/translations/Catalan.php
index f8f7697b..962f8803 100644
--- a/src/translations/Catalan.php
+++ b/src/translations/Catalan.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Catalan language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Catalan extends AbstractLang
{
diff --git a/src/translations/ChineseSim.php b/src/translations/ChineseSim.php
index 3d45e39a..7226d468 100644
--- a/src/translations/ChineseSim.php
+++ b/src/translations/ChineseSim.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseSim language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class ChineseSim extends AbstractLang
{
diff --git a/src/translations/ChineseTr.php b/src/translations/ChineseTr.php
index 0f52b9b7..e6769dbf 100644
--- a/src/translations/ChineseTr.php
+++ b/src/translations/ChineseTr.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseTr language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class ChineseTr extends AbstractLang
{
diff --git a/src/translations/ChineseUtf8ZhCn.php b/src/translations/ChineseUtf8ZhCn.php
index 4bc315f3..65e85201 100644
--- a/src/translations/ChineseUtf8ZhCn.php
+++ b/src/translations/ChineseUtf8ZhCn.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseUtf8ZhCn language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class ChineseUtf8ZhCn extends AbstractLang
{
diff --git a/src/translations/ChineseUtf8ZhTw.php b/src/translations/ChineseUtf8ZhTw.php
index dc4c5fa3..7edf1027 100644
--- a/src/translations/ChineseUtf8ZhTw.php
+++ b/src/translations/ChineseUtf8ZhTw.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for ChineseUtf8ZhTw language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class ChineseUtf8ZhTw extends AbstractLang
{
diff --git a/src/translations/Czech.php b/src/translations/Czech.php
index a331f8f3..a3a5d3e3 100644
--- a/src/translations/Czech.php
+++ b/src/translations/Czech.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Czech language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Czech extends AbstractLang
{
diff --git a/src/translations/Danish.php b/src/translations/Danish.php
index 084b475f..2603f9eb 100644
--- a/src/translations/Danish.php
+++ b/src/translations/Danish.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Danish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Danish extends AbstractLang
{
diff --git a/src/translations/Dutch.php b/src/translations/Dutch.php
index c66ef240..26a2137b 100644
--- a/src/translations/Dutch.php
+++ b/src/translations/Dutch.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Dutch language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Dutch extends AbstractLang
{
diff --git a/src/translations/English.php b/src/translations/English.php
index c1782fd0..007157a1 100644
--- a/src/translations/English.php
+++ b/src/translations/English.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Ukrainian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class English extends AbstractLang
{
diff --git a/src/translations/French.php b/src/translations/French.php
index 603b5337..32047076 100644
--- a/src/translations/French.php
+++ b/src/translations/French.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for French language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class French extends AbstractLang
{
diff --git a/src/translations/Galician.php b/src/translations/Galician.php
index 08c1fc41..37da8d75 100644
--- a/src/translations/Galician.php
+++ b/src/translations/Galician.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Galician language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Galician extends AbstractLang
{
diff --git a/src/translations/German.php b/src/translations/German.php
index 0b0c6e04..3057dfdd 100644
--- a/src/translations/German.php
+++ b/src/translations/German.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for German language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class German extends AbstractLang
{
diff --git a/src/translations/Greek.php b/src/translations/Greek.php
index 34348a6a..b02b2c17 100644
--- a/src/translations/Greek.php
+++ b/src/translations/Greek.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Greek language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Greek extends AbstractLang
{
diff --git a/src/translations/Hebrew.php b/src/translations/Hebrew.php
index b2d5f4c0..e92f2818 100644
--- a/src/translations/Hebrew.php
+++ b/src/translations/Hebrew.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Hebrew language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Hebrew extends AbstractLang
{
diff --git a/src/translations/Hungarian.php b/src/translations/Hungarian.php
index 7b9ff72b..d08856a0 100644
--- a/src/translations/Hungarian.php
+++ b/src/translations/Hungarian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Hungarian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Hungarian extends AbstractLang
{
diff --git a/src/translations/Italian.php b/src/translations/Italian.php
index f024c63d..976a143f 100644
--- a/src/translations/Italian.php
+++ b/src/translations/Italian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Italian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Italian extends AbstractLang
{
diff --git a/src/translations/Japanese.php b/src/translations/Japanese.php
index b25d1e75..6af1161e 100644
--- a/src/translations/Japanese.php
+++ b/src/translations/Japanese.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Japanese language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Japanese extends AbstractLang
{
diff --git a/src/translations/Lithuanian.php b/src/translations/Lithuanian.php
index 727d266f..428d675c 100644
--- a/src/translations/Lithuanian.php
+++ b/src/translations/Lithuanian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Lithuanian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Lithuanian extends AbstractLang
{
diff --git a/src/translations/Mongol.php b/src/translations/Mongol.php
index 6129cffe..b74aedf4 100644
--- a/src/translations/Mongol.php
+++ b/src/translations/Mongol.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Mongol language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Mongol extends AbstractLang
{
diff --git a/src/translations/Polish.php b/src/translations/Polish.php
index ce12d448..a40cb2fc 100644
--- a/src/translations/Polish.php
+++ b/src/translations/Polish.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Polish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Polish extends AbstractLang
{
diff --git a/src/translations/PortugueseBr.php b/src/translations/PortugueseBr.php
index 40b219bd..d033e61f 100644
--- a/src/translations/PortugueseBr.php
+++ b/src/translations/PortugueseBr.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for PortugueseBr language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PortugueseBr extends AbstractLang
{
diff --git a/src/translations/PortuguesePt.php b/src/translations/PortuguesePt.php
index 395b3fe4..3f876f6a 100644
--- a/src/translations/PortuguesePt.php
+++ b/src/translations/PortuguesePt.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for PortuguesePt language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class PortuguesePt extends AbstractLang
{
diff --git a/src/translations/Romanian.php b/src/translations/Romanian.php
index 184eba41..77976706 100644
--- a/src/translations/Romanian.php
+++ b/src/translations/Romanian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Romanian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Romanian extends AbstractLang
{
diff --git a/src/translations/Russian.php b/src/translations/Russian.php
index 03c37111..37d4a930 100644
--- a/src/translations/Russian.php
+++ b/src/translations/Russian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Russian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Russian extends AbstractLang
{
diff --git a/src/translations/RussianUtf8.php b/src/translations/RussianUtf8.php
index bbe96e70..4aad8cad 100644
--- a/src/translations/RussianUtf8.php
+++ b/src/translations/RussianUtf8.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for RussianUtf8 language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class RussianUtf8 extends AbstractLang
{
diff --git a/src/translations/Slovak.php b/src/translations/Slovak.php
index e3834a5e..6427a83d 100644
--- a/src/translations/Slovak.php
+++ b/src/translations/Slovak.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Slovak language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Slovak extends AbstractLang
{
diff --git a/src/translations/Spanish.php b/src/translations/Spanish.php
index 9f6d6a77..63bb9e18 100644
--- a/src/translations/Spanish.php
+++ b/src/translations/Spanish.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Spanish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Spanish extends AbstractLang
{
diff --git a/src/translations/Swedish.php b/src/translations/Swedish.php
index 6eaa8791..23818a96 100644
--- a/src/translations/Swedish.php
+++ b/src/translations/Swedish.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Swedish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Swedish extends AbstractLang
{
diff --git a/src/translations/Turkish.php b/src/translations/Turkish.php
index 897a1da6..ab32559e 100644
--- a/src/translations/Turkish.php
+++ b/src/translations/Turkish.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Turkish language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Turkish extends AbstractLang
{
diff --git a/src/translations/Ukrainian.php b/src/translations/Ukrainian.php
index d73366d9..5029df01 100644
--- a/src/translations/Ukrainian.php
+++ b/src/translations/Ukrainian.php
@@ -8,6 +8,8 @@ namespace PHPPgAdmin\Translations;
/**
* Class providing translation for Ukrainian language.
+ *
+ * @SuppressWarnings(PHPMD)
*/
class Ukrainian extends AbstractLang
{
diff --git a/src/xhtml/HTMLController.php b/src/xhtml/HTMLController.php
index 27e2f3e4..192253e7 100644
--- a/src/xhtml/HTMLController.php
+++ b/src/xhtml/HTMLController.php
@@ -6,7 +6,6 @@
namespace PHPPgAdmin\XHtml;
-use PHPPgAdmin\ContainerUtils;
use PHPPgAdmin\Decorators\Decorator;
/**
@@ -15,18 +14,6 @@ use PHPPgAdmin\Decorators\Decorator;
class HTMLController
{
use \PHPPgAdmin\Traits\HelperTrait;
- /**
- * @var string
- */
- const BASE_PATH = ContainerUtils::BASE_PATH;
- /**
- * @var string
- */
- const SUBFOLDER = ContainerUtils::SUBFOLDER;
- /**
- * @var string
- */
- const DEBUGMODE = ContainerUtils::DEBUGMODE;
public $form = '';
@@ -40,24 +27,33 @@ class HTMLController
public $controller_title = 'html';
+ /**
+ * @var \PHPPgAdmin\ViewManager
+ */
public $view;
+ /**
+ * @var \PHPPgAdmin\Misc
+ */
+ public $misc;
+
public $appName;
public $appVersion;
public $appLangFiles;
- public $misc;
-
public $conf;
public $appThemes;
+ /**
+ * @var \PHPPgAdmin\ContainerUtils
+ */
protected $container;
// Constructor
- public function __construct(\Slim\Container $container, $controller_name = null)
+ public function __construct(\PHPPgAdmin\ContainerUtils $container, $controller_name = null)
{
$this->container = $container;
$this->lang = $container->get('lang');
diff --git a/src/xhtml/HTMLFooterController.php b/src/xhtml/HTMLFooterController.php
index 17ca4695..e529a56f 100644
--- a/src/xhtml/HTMLFooterController.php
+++ b/src/xhtml/HTMLFooterController.php
@@ -55,7 +55,7 @@ class HTMLFooterController extends HTMLController
{
$reload_param = 'none';
- if ($this->misc->getReloadBrowser()) {
+ if ($this->view->getReloadBrowser()) {
$reload_param = 'other';
} elseif ($this->_reload_drop_database) {
$reload_param = 'database';
diff --git a/src/xhtml/HTMLHeaderController.php b/src/xhtml/HTMLHeaderController.php
index 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 ab1fe0cc..f57af271 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -114,6 +114,18 @@
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
+"@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"
@@ -139,6 +151,11 @@ ansi-colors@^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"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
@@ -149,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"
@@ -176,6 +198,15 @@ 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-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"
@@ -188,6 +219,62 @@ babel-eslint@^10.1.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"
@@ -206,6 +293,17 @@ callsites@^3.0.0:
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
+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"
@@ -252,6 +350,11 @@ concat-map@0.0.1:
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
+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"
@@ -261,6 +364,13 @@ cross-spawn@^7.0.2:
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:
+ ms "2.0.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"
@@ -292,7 +402,14 @@ enquirer@^2.3.5:
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=
@@ -504,6 +621,23 @@ globals@^12.1.0:
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"
@@ -514,11 +648,21 @@ has-flag@^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==
+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"
@@ -545,6 +689,13 @@ inherits@2:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+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"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
@@ -567,11 +718,16 @@ isexe@^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.14.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482"
@@ -595,6 +751,28 @@ 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=
+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:
+ less "^3.9.0"
+
levn@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
@@ -603,11 +781,83 @@ levn@^0.4.1:
prelude-ls "^1.2.1"
type-check "~0.4.0"
-lodash@^4.17.14, lodash@^4.17.19:
+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==
+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/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"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
@@ -627,11 +877,26 @@ mkdirp@^0.5.1:
dependencies:
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==
+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"
@@ -678,6 +943,11 @@ path-parse@^1.0.6:
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
+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"
@@ -690,6 +960,24 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"
+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"
@@ -700,11 +988,21 @@ progress@^2.0.0:
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==
+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"
@@ -729,6 +1027,11 @@ rimraf@2.6.3:
dependencies:
glob "^7.1.3"
+semver@^5.6.0:
+ version "5.7.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
+ integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
+
semver@^7.2.1:
version "7.3.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
@@ -746,6 +1049,13 @@ shebang-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
+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"
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"
@@ -760,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"
@@ -774,6 +1089,13 @@ string-width@^3.0.0:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"
+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:
+ ansi-regex "^2.0.0"
+
strip-ansi@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
@@ -793,6 +1115,11 @@ strip-json-comments@^3.1.0, strip-json-comments@^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"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
@@ -822,11 +1149,26 @@ text-table@^0.2.0:
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
+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.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.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"
@@ -839,6 +1181,11 @@ type-fest@^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.4.0"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602"