diff --git a/composer.json b/composer.json
index 10ebfef7..7ff75c6f 100644
--- a/composer.json
+++ b/composer.json
@@ -53,9 +53,9 @@
},
"require-dev" : {
- "phpunit/phpunit" : "^9.0"
+ "phpunit/phpunit" : "^9.0",
+ "friendsofphp/php-cs-fixer" : "*"
},
-
"suggest": {
"ext-memcache": "memcache caching",
"ext-memcached": "memcached caching",
diff --git a/composer.lock b/composer.lock
index 57f4d670..abdb26e6 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "1987c8816f6fe4db47a746e24d027809",
+ "content-hash": "0f458e911a691a7695f22513afd3c612",
"packages": [
{
"name": "bower-asset/jquery",
@@ -498,6 +498,221 @@
}
],
"packages-dev": [
+ {
+ "name": "composer/semver",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/semver.git",
+ "reference": "dd61cb4efbd0cff1700b217faf24ce596af4fc4e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/semver/zipball/dd61cb4efbd0cff1700b217faf24ce596af4fc4e",
+ "reference": "dd61cb4efbd0cff1700b217faf24ce596af4fc4e",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpstan/phpstan": "^0.12.54",
+ "symfony/phpunit-bridge": "^4.2 || ^5"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Composer\\Semver\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nils Adermann",
+ "email": "naderman@naderman.de",
+ "homepage": "http://www.naderman.de"
+ },
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be"
+ },
+ {
+ "name": "Rob Bast",
+ "email": "rob.bast@gmail.com",
+ "homepage": "http://robbast.nl"
+ }
+ ],
+ "description": "Semver library that offers utilities, version constraint parsing and validation.",
+ "keywords": [
+ "semantic",
+ "semver",
+ "validation",
+ "versioning"
+ ],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/semver/issues",
+ "source": "https://github.com/composer/semver/tree/main"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-12-10T07:55:43+00:00"
+ },
+ {
+ "name": "composer/xdebug-handler",
+ "version": "1.4.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/composer/xdebug-handler.git",
+ "reference": "f28d44c286812c714741478d968104c5e604a1d4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f28d44c286812c714741478d968104c5e604a1d4",
+ "reference": "f28d44c286812c714741478d968104c5e604a1d4",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.3.2 || ^7.0 || ^8.0",
+ "psr/log": "^1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Composer\\XdebugHandler\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "John Stevenson",
+ "email": "john-stevenson@blueyonder.co.uk"
+ }
+ ],
+ "description": "Restarts a process without Xdebug.",
+ "keywords": [
+ "Xdebug",
+ "performance"
+ ],
+ "support": {
+ "irc": "irc://irc.freenode.org/composer",
+ "issues": "https://github.com/composer/xdebug-handler/issues",
+ "source": "https://github.com/composer/xdebug-handler/tree/1.4.5"
+ },
+ "funding": [
+ {
+ "url": "https://packagist.com",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/composer",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/composer/composer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-11-13T08:04:11+00:00"
+ },
+ {
+ "name": "doctrine/annotations",
+ "version": "1.12.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/annotations.git",
+ "reference": "4b3d01cfa2593aed374fa7dbd5a18ac3de8ef672"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/annotations/zipball/4b3d01cfa2593aed374fa7dbd5a18ac3de8ef672",
+ "reference": "4b3d01cfa2593aed374fa7dbd5a18ac3de8ef672",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/lexer": "1.*",
+ "ext-tokenizer": "*",
+ "php": "^7.1 || ^8.0"
+ },
+ "require-dev": {
+ "doctrine/cache": "1.*",
+ "doctrine/coding-standard": "^6.0 || ^8.1",
+ "phpstan/phpstan": "^0.12.20",
+ "phpunit/phpunit": "^7.5 || ^9.1.5"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "Docblock Annotations Parser",
+ "homepage": "https://www.doctrine-project.org/projects/annotations.html",
+ "keywords": [
+ "annotations",
+ "docblock",
+ "parser"
+ ],
+ "support": {
+ "issues": "https://github.com/doctrine/annotations/issues",
+ "source": "https://github.com/doctrine/annotations/tree/1.12.x"
+ },
+ "time": "2021-01-18T07:26:23+00:00"
+ },
{
"name": "doctrine/instantiator",
"version": "1.5.x-dev",
@@ -567,6 +782,190 @@
],
"time": "2020-11-10T19:05:51+00:00"
},
+ {
+ "name": "doctrine/lexer",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/lexer.git",
+ "reference": "cffe3e94d62f717a10a7d8614a19917f9311a5bc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/lexer/zipball/cffe3e94d62f717a10a7d8614a19917f9311a5bc",
+ "reference": "cffe3e94d62f717a10a7d8614a19917f9311a5bc",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.2 || ^8.0"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^8.0",
+ "phpstan/phpstan": "^0.12",
+ "phpunit/phpunit": "^8.2 || ^9.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com"
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org"
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com"
+ }
+ ],
+ "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
+ "homepage": "https://www.doctrine-project.org/projects/lexer.html",
+ "keywords": [
+ "annotations",
+ "docblock",
+ "lexer",
+ "parser",
+ "php"
+ ],
+ "support": {
+ "issues": "https://github.com/doctrine/lexer/issues",
+ "source": "https://github.com/doctrine/lexer/tree/master"
+ },
+ "funding": [
+ {
+ "url": "https://www.doctrine-project.org/sponsorship.html",
+ "type": "custom"
+ },
+ {
+ "url": "https://www.patreon.com/phpdoctrine",
+ "type": "patreon"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-12-02T07:27:58+00:00"
+ },
+ {
+ "name": "friendsofphp/php-cs-fixer",
+ "version": "2.17.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
+ "reference": "51f38fe809da6af624e48318a2e40c6799829769"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/51f38fe809da6af624e48318a2e40c6799829769",
+ "reference": "51f38fe809da6af624e48318a2e40c6799829769",
+ "shasum": ""
+ },
+ "require": {
+ "composer/semver": "^1.4 || ^2.0 || ^3.0",
+ "composer/xdebug-handler": "^1.2",
+ "doctrine/annotations": "^1.2",
+ "ext-json": "*",
+ "ext-tokenizer": "*",
+ "php": "^5.6 || ^7.0 || ^8.0",
+ "php-cs-fixer/diff": "^1.3",
+ "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0",
+ "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0",
+ "symfony/filesystem": "^3.0 || ^4.0 || ^5.0",
+ "symfony/finder": "^3.0 || ^4.0 || ^5.0",
+ "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0",
+ "symfony/polyfill-php70": "^1.0",
+ "symfony/polyfill-php72": "^1.4",
+ "symfony/process": "^3.0 || ^4.0 || ^5.0",
+ "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
+ },
+ "require-dev": {
+ "justinrainbow/json-schema": "^5.0",
+ "keradus/cli-executor": "^1.4",
+ "mikey179/vfsstream": "^1.6",
+ "php-coveralls/php-coveralls": "^2.4.2",
+ "php-cs-fixer/accessible-object": "^1.0",
+ "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
+ "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
+ "phpspec/prophecy-phpunit": "^1.1 || ^2.0",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5",
+ "phpunitgoodpractices/polyfill": "^1.5",
+ "phpunitgoodpractices/traits": "^1.9.1",
+ "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
+ "symfony/phpunit-bridge": "^5.2.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.",
+ "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."
+ },
+ "default-branch": true,
+ "bin": [
+ "php-cs-fixer"
+ ],
+ "type": "application",
+ "autoload": {
+ "psr-4": {
+ "PhpCsFixer\\": "src/"
+ },
+ "classmap": [
+ "tests/Test/AbstractFixerTestCase.php",
+ "tests/Test/AbstractIntegrationCaseFactory.php",
+ "tests/Test/AbstractIntegrationTestCase.php",
+ "tests/Test/Assert/AssertTokensTrait.php",
+ "tests/Test/IntegrationCase.php",
+ "tests/Test/IntegrationCaseFactory.php",
+ "tests/Test/IntegrationCaseFactoryInterface.php",
+ "tests/Test/InternalIntegrationCaseFactory.php",
+ "tests/Test/IsIdenticalConstraint.php",
+ "tests/TestCase.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Dariusz RumiĆski",
+ "email": "dariusz.ruminski@gmail.com"
+ }
+ ],
+ "description": "A tool to automatically fix PHP code style",
+ "support": {
+ "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues",
+ "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/2.17"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/keradus",
+ "type": "github"
+ }
+ ],
+ "time": "2021-01-18T03:08:14+00:00"
+ },
{
"name": "myclabs/deep-copy",
"version": "1.x-dev",
@@ -794,6 +1193,61 @@
},
"time": "2020-12-13T23:18:30+00:00"
},
+ {
+ "name": "php-cs-fixer/diff",
+ "version": "v1.3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/PHP-CS-Fixer/diff.git",
+ "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759",
+ "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0",
+ "symfony/process": "^3.3"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Kore Nordmann",
+ "email": "mail@kore-nordmann.de"
+ },
+ {
+ "name": "SpacePossum"
+ }
+ ],
+ "description": "sebastian/diff v2 backport support for PHP5.6",
+ "homepage": "https://github.com/PHP-CS-Fixer",
+ "keywords": [
+ "diff"
+ ],
+ "support": {
+ "issues": "https://github.com/PHP-CS-Fixer/diff/issues",
+ "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1"
+ },
+ "time": "2020-10-14T08:39:05+00:00"
+ },
{
"name": "phpdocumentor/reflection-common",
"version": "dev-master",
@@ -1024,16 +1478,16 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "dev-master",
+ "version": "9.2.x-dev",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "ad44fae76b874e7d49afb6923a66591e0a94bef6"
+ "reference": "cbe315f4d3b653ac0310862697866ffddabc502f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ad44fae76b874e7d49afb6923a66591e0a94bef6",
- "reference": "ad44fae76b874e7d49afb6923a66591e0a94bef6",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cbe315f4d3b653ac0310862697866ffddabc502f",
+ "reference": "cbe315f4d3b653ac0310862697866ffddabc502f",
"shasum": ""
},
"require": {
@@ -1058,7 +1512,6 @@
"ext-pcov": "*",
"ext-xdebug": "*"
},
- "default-branch": true,
"type": "library",
"extra": {
"branch-alias": {
@@ -1090,7 +1543,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2"
},
"funding": [
{
@@ -1098,7 +1551,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:26:22+00:00"
+ "time": "2021-01-02T06:24:37+00:00"
},
{
"name": "phpunit/php-file-iterator",
@@ -1106,12 +1559,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "544be757d192233486ad9119dcb297ebbf5f2dd4"
+ "reference": "ec77a26a4afef3ab3b4d4f8f25777218f935e53d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/544be757d192233486ad9119dcb297ebbf5f2dd4",
- "reference": "544be757d192233486ad9119dcb297ebbf5f2dd4",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/ec77a26a4afef3ab3b4d4f8f25777218f935e53d",
+ "reference": "ec77a26a4afef3ab3b4d4f8f25777218f935e53d",
"shasum": ""
},
"require": {
@@ -1159,7 +1612,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:27:43+00:00"
+ "time": "2021-01-18T13:04:09+00:00"
},
{
"name": "phpunit/php-invoker",
@@ -1167,12 +1620,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
- "reference": "05210af8d0ab68c811ae61a4bc42b066d62b88a0"
+ "reference": "da682a733325bf5db48ee2786bd640f8cd0f2622"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/05210af8d0ab68c811ae61a4bc42b066d62b88a0",
- "reference": "05210af8d0ab68c811ae61a4bc42b066d62b88a0",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/da682a733325bf5db48ee2786bd640f8cd0f2622",
+ "reference": "da682a733325bf5db48ee2786bd640f8cd0f2622",
"shasum": ""
},
"require": {
@@ -1223,7 +1676,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:27:51+00:00"
+ "time": "2021-01-18T13:04:19+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -1231,12 +1684,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "c1abda6e0590f8e7138eb48ade2f0b21a5c4257b"
+ "reference": "ccece2717f047bf9b04848ea84059374b07170bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/c1abda6e0590f8e7138eb48ade2f0b21a5c4257b",
- "reference": "c1abda6e0590f8e7138eb48ade2f0b21a5c4257b",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/ccece2717f047bf9b04848ea84059374b07170bc",
+ "reference": "ccece2717f047bf9b04848ea84059374b07170bc",
"shasum": ""
},
"require": {
@@ -1283,7 +1736,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:28:23+00:00"
+ "time": "2021-01-18T13:04:58+00:00"
},
{
"name": "phpunit/php-timer",
@@ -1291,12 +1744,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "59e401088c91efeb76150f0a301aa79e3ac95fd1"
+ "reference": "c9b3e07891acf6f6679cf2956c99b847aa73bcff"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/59e401088c91efeb76150f0a301aa79e3ac95fd1",
- "reference": "59e401088c91efeb76150f0a301aa79e3ac95fd1",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c9b3e07891acf6f6679cf2956c99b847aa73bcff",
+ "reference": "c9b3e07891acf6f6679cf2956c99b847aa73bcff",
"shasum": ""
},
"require": {
@@ -1343,7 +1796,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:27:59+00:00"
+ "time": "2021-01-18T13:04:29+00:00"
},
{
"name": "phpunit/phpunit",
@@ -1351,12 +1804,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "e1cc97cd56fd8342c8e58ba20c4668fa440cb421"
+ "reference": "7c0e74d039a6cc8f195fa4bac1fb173aca7a182f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e1cc97cd56fd8342c8e58ba20c4668fa440cb421",
- "reference": "e1cc97cd56fd8342c8e58ba20c4668fa440cb421",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7c0e74d039a6cc8f195fa4bac1fb173aca7a182f",
+ "reference": "7c0e74d039a6cc8f195fa4bac1fb173aca7a182f",
"shasum": ""
},
"require": {
@@ -1446,7 +1899,162 @@
"type": "github"
}
],
- "time": "2020-12-24T12:25:06+00:00"
+ "time": "2021-01-18T12:51:46+00:00"
+ },
+ {
+ "name": "psr/container",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "381524e8568e07f31d504a945b88556548c8c42e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/381524e8568e07f31d504a945b88556548c8c42e",
+ "reference": "381524e8568e07f31d504a945b88556548c8c42e",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/master"
+ },
+ "time": "2020-10-13T07:07:53+00:00"
+ },
+ {
+ "name": "psr/event-dispatcher",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/event-dispatcher.git",
+ "reference": "3ef040d7c05652f55bd05115baf059a445cfc79c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/3ef040d7c05652f55bd05115baf059a445cfc79c",
+ "reference": "3ef040d7c05652f55bd05115baf059a445cfc79c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\EventDispatcher\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Standard interfaces for event handling.",
+ "keywords": [
+ "events",
+ "psr",
+ "psr-14"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/event-dispatcher/tree/master"
+ },
+ "time": "2020-09-18T06:44:18+00:00"
+ },
+ {
+ "name": "psr/log",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "dd738d0b4491f32725492cf345f6b501f5922fec"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/dd738d0b4491f32725492cf345f6b501f5922fec",
+ "reference": "dd738d0b4491f32725492cf345f6b501f5922fec",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Log\\": "Psr/Log/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "homepage": "https://github.com/php-fig/log",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "support": {
+ "source": "https://github.com/php-fig/log/tree/master"
+ },
+ "time": "2020-09-18T06:44:51+00:00"
},
{
"name": "sebastian/cli-parser",
@@ -1454,12 +2062,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
- "reference": "7605547e80bf845bc2c1b2cc3f8ac0f5574caa63"
+ "reference": "0b90e32f4fc2ed2618af8470384335383a99eeb2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7605547e80bf845bc2c1b2cc3f8ac0f5574caa63",
- "reference": "7605547e80bf845bc2c1b2cc3f8ac0f5574caa63",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/0b90e32f4fc2ed2618af8470384335383a99eeb2",
+ "reference": "0b90e32f4fc2ed2618af8470384335383a99eeb2",
"shasum": ""
},
"require": {
@@ -1503,7 +2111,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:28:52+00:00"
+ "time": "2021-01-18T13:05:31+00:00"
},
{
"name": "sebastian/code-unit",
@@ -1567,12 +2175,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "f861b90785c30dc0743554f0e615d8f950dc8e9d"
+ "reference": "822d88cf8f07aedea4c6cdd48dde9e19b1cd35dd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/f861b90785c30dc0743554f0e615d8f950dc8e9d",
- "reference": "f861b90785c30dc0743554f0e615d8f950dc8e9d",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/822d88cf8f07aedea4c6cdd48dde9e19b1cd35dd",
+ "reference": "822d88cf8f07aedea4c6cdd48dde9e19b1cd35dd",
"shasum": ""
},
"require": {
@@ -1615,7 +2223,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:26:38+00:00"
+ "time": "2021-01-18T13:02:48+00:00"
},
{
"name": "sebastian/comparator",
@@ -1623,12 +2231,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "1cfe9edf7ec9e4c18e54bb259110a053d09a899f"
+ "reference": "b06bf31dec5ef18a8f5bccaf51c0f4af128a08e1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1cfe9edf7ec9e4c18e54bb259110a053d09a899f",
- "reference": "1cfe9edf7ec9e4c18e54bb259110a053d09a899f",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/b06bf31dec5ef18a8f5bccaf51c0f4af128a08e1",
+ "reference": "b06bf31dec5ef18a8f5bccaf51c0f4af128a08e1",
"shasum": ""
},
"require": {
@@ -1690,7 +2298,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:38:43+00:00"
+ "time": "2021-01-18T13:02:58+00:00"
},
{
"name": "sebastian/complexity",
@@ -1698,12 +2306,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "23030bf3d3722767fdc5f8f2d2d99b03f4e58122"
+ "reference": "291f1710889bce9382b87e17ffec544d9b2c3078"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/23030bf3d3722767fdc5f8f2d2d99b03f4e58122",
- "reference": "23030bf3d3722767fdc5f8f2d2d99b03f4e58122",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/291f1710889bce9382b87e17ffec544d9b2c3078",
+ "reference": "291f1710889bce9382b87e17ffec544d9b2c3078",
"shasum": ""
},
"require": {
@@ -1748,7 +2356,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:28:32+00:00"
+ "time": "2021-01-18T13:05:10+00:00"
},
{
"name": "sebastian/diff",
@@ -1756,12 +2364,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "02178c586d5fbd59d348798d7122237a2907f8a4"
+ "reference": "3b28ccb04205dbe3f54685d91c34d54f5f09c64e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/02178c586d5fbd59d348798d7122237a2907f8a4",
- "reference": "02178c586d5fbd59d348798d7122237a2907f8a4",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3b28ccb04205dbe3f54685d91c34d54f5f09c64e",
+ "reference": "3b28ccb04205dbe3f54685d91c34d54f5f09c64e",
"shasum": ""
},
"require": {
@@ -1815,7 +2423,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:26:54+00:00"
+ "time": "2021-01-18T13:03:08+00:00"
},
{
"name": "sebastian/environment",
@@ -1823,12 +2431,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "7bb5a20ec06e366cb75b0e126169649c62b397b1"
+ "reference": "1733c33db8c2fb5939ba4b3c2de53eff99528298"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/7bb5a20ec06e366cb75b0e126169649c62b397b1",
- "reference": "7bb5a20ec06e366cb75b0e126169649c62b397b1",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1733c33db8c2fb5939ba4b3c2de53eff99528298",
+ "reference": "1733c33db8c2fb5939ba4b3c2de53eff99528298",
"shasum": ""
},
"require": {
@@ -1879,7 +2487,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:27:03+00:00"
+ "time": "2021-01-18T13:03:18+00:00"
},
{
"name": "sebastian/exporter",
@@ -1887,12 +2495,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "91975a2dbcf4a89184d9e4143c06b88d89644b58"
+ "reference": "21b3e1f135974b44d51d85634a255ae84a2fe986"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/91975a2dbcf4a89184d9e4143c06b88d89644b58",
- "reference": "91975a2dbcf4a89184d9e4143c06b88d89644b58",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/21b3e1f135974b44d51d85634a255ae84a2fe986",
+ "reference": "21b3e1f135974b44d51d85634a255ae84a2fe986",
"shasum": ""
},
"require": {
@@ -1957,7 +2565,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:27:11+00:00"
+ "time": "2021-01-18T13:03:28+00:00"
},
{
"name": "sebastian/global-state",
@@ -1965,12 +2573,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "0471b24bddeb05ffd0a5edc6837796f339068c25"
+ "reference": "f51241632128604e92fb08adc3c95eec5228efe2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0471b24bddeb05ffd0a5edc6837796f339068c25",
- "reference": "0471b24bddeb05ffd0a5edc6837796f339068c25",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/f51241632128604e92fb08adc3c95eec5228efe2",
+ "reference": "f51241632128604e92fb08adc3c95eec5228efe2",
"shasum": ""
},
"require": {
@@ -2022,7 +2630,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:27:19+00:00"
+ "time": "2021-01-18T13:03:37+00:00"
},
{
"name": "sebastian/lines-of-code",
@@ -2030,12 +2638,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "219c932af1aeee0b4eccbc53af2181ff50e14b24"
+ "reference": "e79c302abc8371a61d1b0d1ff0a4aeac1fe050b8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/219c932af1aeee0b4eccbc53af2181ff50e14b24",
- "reference": "219c932af1aeee0b4eccbc53af2181ff50e14b24",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e79c302abc8371a61d1b0d1ff0a4aeac1fe050b8",
+ "reference": "e79c302abc8371a61d1b0d1ff0a4aeac1fe050b8",
"shasum": ""
},
"require": {
@@ -2080,7 +2688,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:28:42+00:00"
+ "time": "2021-01-18T13:05:21+00:00"
},
{
"name": "sebastian/object-enumerator",
@@ -2088,12 +2696,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "da36684b10f17db8718e314fa8d84b2e0ed7132e"
+ "reference": "b87fec01050be216f000b0bd1b8c44c657d25f1a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/da36684b10f17db8718e314fa8d84b2e0ed7132e",
- "reference": "da36684b10f17db8718e314fa8d84b2e0ed7132e",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/b87fec01050be216f000b0bd1b8c44c657d25f1a",
+ "reference": "b87fec01050be216f000b0bd1b8c44c657d25f1a",
"shasum": ""
},
"require": {
@@ -2138,7 +2746,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:27:27+00:00"
+ "time": "2021-01-18T13:03:48+00:00"
},
{
"name": "sebastian/object-reflector",
@@ -2146,12 +2754,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "6717d193da503616e69462cf98e2af3f4443335d"
+ "reference": "d205aaa619485dbaf797e67c2af79186c606d7ea"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6717d193da503616e69462cf98e2af3f4443335d",
- "reference": "6717d193da503616e69462cf98e2af3f4443335d",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/d205aaa619485dbaf797e67c2af79186c606d7ea",
+ "reference": "d205aaa619485dbaf797e67c2af79186c606d7ea",
"shasum": ""
},
"require": {
@@ -2194,7 +2802,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:27:35+00:00"
+ "time": "2021-01-18T13:03:58+00:00"
},
{
"name": "sebastian/recursion-context",
@@ -2202,12 +2810,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "cee249a3e471aa870067fa6155991230c7507924"
+ "reference": "141035d37fad4cf8d8d0f83097792355cfcbb379"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cee249a3e471aa870067fa6155991230c7507924",
- "reference": "cee249a3e471aa870067fa6155991230c7507924",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/141035d37fad4cf8d8d0f83097792355cfcbb379",
+ "reference": "141035d37fad4cf8d8d0f83097792355cfcbb379",
"shasum": ""
},
"require": {
@@ -2258,7 +2866,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:28:07+00:00"
+ "time": "2021-01-18T13:04:39+00:00"
},
{
"name": "sebastian/resource-operations",
@@ -2322,12 +2930,12 @@
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "67bfce3beb94968d175fdf117b80fc9a6b60bdd0"
+ "reference": "c415636f612a62bfba64ea53f2f63038e1c2e32e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/67bfce3beb94968d175fdf117b80fc9a6b60bdd0",
- "reference": "67bfce3beb94968d175fdf117b80fc9a6b60bdd0",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/c415636f612a62bfba64ea53f2f63038e1c2e32e",
+ "reference": "c415636f612a62bfba64ea53f2f63038e1c2e32e",
"shasum": ""
},
"require": {
@@ -2371,7 +2979,7 @@
"type": "github"
}
],
- "time": "2020-12-24T12:28:15+00:00"
+ "time": "2021-01-18T13:04:49+00:00"
},
{
"name": "sebastian/version",
@@ -2427,18 +3035,547 @@
],
"time": "2020-09-28T06:39:44+00:00"
},
+ {
+ "name": "symfony/console",
+ "version": "5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/console.git",
+ "reference": "356c70659d6b48595f9f275cd7c4de0d5544c49c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/console/zipball/356c70659d6b48595f9f275cd7c4de0d5544c49c",
+ "reference": "356c70659d6b48595f9f275cd7c4de0d5544c49c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.8",
+ "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"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0"
+ },
+ "require-dev": {
+ "psr/log": "~1.0",
+ "symfony/config": "^4.4|^5.0",
+ "symfony/dependency-injection": "^4.4|^5.0",
+ "symfony/event-dispatcher": "^4.4|^5.0",
+ "symfony/lock": "^4.4|^5.0",
+ "symfony/process": "^4.4|^5.0",
+ "symfony/var-dumper": "^4.4|^5.0"
+ },
+ "suggest": {
+ "psr/log": "For using the console logger",
+ "symfony/event-dispatcher": "",
+ "symfony/lock": "",
+ "symfony/process": ""
+ },
+ "default-branch": true,
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Console\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Eases the creation of beautiful and testable command line interfaces",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "cli",
+ "command line",
+ "console",
+ "terminal"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/console/tree/5.x"
+ },
+ "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": "2021-01-14T15:43:35+00:00"
+ },
+ {
+ "name": "symfony/deprecation-contracts",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "366d03137004f7fd0e9d9ae9360eaf2d5c66d1ad"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/366d03137004f7fd0e9d9ae9360eaf2d5c66d1ad",
+ "reference": "366d03137004f7fd0e9d9ae9360eaf2d5c66d1ad",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-version": "2.3",
+ "branch-alias": {
+ "dev-main": "2.3-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",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/main"
+ },
+ "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": "2021-01-01T09:26:45+00:00"
+ },
+ {
+ "name": "symfony/event-dispatcher",
+ "version": "5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/event-dispatcher.git",
+ "reference": "a6ee5cbe972e90393ff92057f9708eeac7f3b73b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a6ee5cbe972e90393ff92057f9708eeac7f3b73b",
+ "reference": "a6ee5cbe972e90393ff92057f9708eeac7f3b73b",
+ "shasum": ""
+ },
+ "require": {
+ "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"
+ },
+ "provide": {
+ "psr/event-dispatcher-implementation": "1.0",
+ "symfony/event-dispatcher-implementation": "2.0"
+ },
+ "require-dev": {
+ "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",
+ "symfony/stopwatch": "^4.4|^5.0"
+ },
+ "suggest": {
+ "symfony/dependency-injection": "",
+ "symfony/http-kernel": ""
+ },
+ "default-branch": true,
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\EventDispatcher\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/event-dispatcher/tree/5.x"
+ },
+ "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": "2021-01-11T10:44:39+00:00"
+ },
+ {
+ "name": "symfony/event-dispatcher-contracts",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/event-dispatcher-contracts.git",
+ "reference": "f4680856fc4416885ac312e709137afddb1077cc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f4680856fc4416885ac312e709137afddb1077cc",
+ "reference": "f4680856fc4416885ac312e709137afddb1077cc",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "psr/event-dispatcher": "^1"
+ },
+ "suggest": {
+ "symfony/event-dispatcher-implementation": ""
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-version": "2.3",
+ "branch-alias": {
+ "dev-main": "2.3-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\EventDispatcher\\": ""
+ }
+ },
+ "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": "Generic abstractions related to dispatching event",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/event-dispatcher-contracts/tree/main"
+ },
+ "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": "2021-01-01T09:26:45+00:00"
+ },
+ {
+ "name": "symfony/filesystem",
+ "version": "5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/filesystem.git",
+ "reference": "4ff1d2e04790e021941a9bcbed5aca383f8250da"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/4ff1d2e04790e021941a9bcbed5aca383f8250da",
+ "reference": "4ff1d2e04790e021941a9bcbed5aca383f8250da",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8"
+ },
+ "default-branch": true,
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Filesystem\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides basic utilities for the filesystem",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/filesystem/tree/5.x"
+ },
+ "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": "2021-01-11T09:50:50+00:00"
+ },
+ {
+ "name": "symfony/finder",
+ "version": "5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/finder.git",
+ "reference": "03ff88196e9fec7f273469020b3939b1330e2156"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/03ff88196e9fec7f273469020b3939b1330e2156",
+ "reference": "03ff88196e9fec7f273469020b3939b1330e2156",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5"
+ },
+ "default-branch": true,
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Finder\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Finds files and directories via an intuitive fluent interface",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/finder/tree/5.x"
+ },
+ "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": "2021-01-11T09:50:50+00:00"
+ },
+ {
+ "name": "symfony/options-resolver",
+ "version": "5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/options-resolver.git",
+ "reference": "4059853ccceaf451939a197ce0fefb0acd1124d6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4059853ccceaf451939a197ce0fefb0acd1124d6",
+ "reference": "4059853ccceaf451939a197ce0fefb0acd1124d6",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1",
+ "symfony/polyfill-php73": "~1.0",
+ "symfony/polyfill-php80": "^1.15"
+ },
+ "default-branch": true,
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\OptionsResolver\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides an improved replacement for the array_replace PHP function",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "config",
+ "configuration",
+ "options"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/options-resolver/tree/5.x"
+ },
+ "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": "2021-01-11T10:44:39+00:00"
+ },
{
"name": "symfony/polyfill-ctype",
"version": "dev-main",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "fade6deebd931cfd7a544f68479405a6a08979a3"
+ "reference": "c6c942b1ac76c82448322025e084cadc56048b4e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fade6deebd931cfd7a544f68479405a6a08979a3",
- "reference": "fade6deebd931cfd7a544f68479405a6a08979a3",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e",
+ "reference": "c6c942b1ac76c82448322025e084cadc56048b4e",
"shasum": ""
},
"require": {
@@ -2451,7 +3588,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.21-dev"
+ "dev-main": "1.22-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -2489,7 +3626,7 @@
"portable"
],
"support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/main"
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0"
},
"funding": [
{
@@ -2505,7 +3642,856 @@
"type": "tidelift"
}
],
- "time": "2020-10-26T13:35:45+00:00"
+ "time": "2021-01-07T16:49:33+00:00"
+ },
+ {
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "267a9adeb8ecb8071040a740930e077cdfb987af"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/267a9adeb8ecb8071040a740930e077cdfb987af",
+ "reference": "267a9adeb8ecb8071040a740930e077cdfb987af",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
+ },
+ "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 intl's grapheme_* functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "grapheme",
+ "intl",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.22.0"
+ },
+ "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": "2021-01-07T16:49:33+00:00"
+ },
+ {
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "6e971c891537eb617a00bb07a43d182a6915faba"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba",
+ "reference": "6e971c891537eb617a00bb07a43d182a6915faba",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-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"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.0"
+ },
+ "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": "2021-01-07T17:09:11+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
+ "reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-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"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0"
+ },
+ "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": "2021-01-07T16:49:33+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php70",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php70.git",
+ "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644",
+ "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "default-branch": true,
+ "type": "metapackage",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.20-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "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 backporting some PHP 7.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0"
+ },
+ "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-23T14:02:19+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php72",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php72.git",
+ "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
+ "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php72\\": ""
+ },
+ "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 backporting some PHP 7.2+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.0"
+ },
+ "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": "2021-01-07T16:49:33+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php73",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
+ "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "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 backporting some PHP 7.3+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.0"
+ },
+ "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": "2021-01-07T16:49:33+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91",
+ "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-main": "1.22-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"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.0"
+ },
+ "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": "2021-01-07T16:49:33+00:00"
+ },
+ {
+ "name": "symfony/process",
+ "version": "5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "b8d6eff26e48187fed15970799f4b605fa7242e4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/b8d6eff26e48187fed15970799f4b605fa7242e4",
+ "reference": "b8d6eff26e48187fed15970799f4b605fa7242e4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.15"
+ },
+ "default-branch": true,
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Process\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Executes commands in sub-processes",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/process/tree/5.x"
+ },
+ "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": "2021-01-14T15:42:36+00:00"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "dev-main",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "cea83947622b432b60b809d14c7b42df9f0f5823"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/cea83947622b432b60b809d14c7b42df9f0f5823",
+ "reference": "cea83947622b432b60b809d14c7b42df9f0f5823",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "psr/container": "^1.0"
+ },
+ "suggest": {
+ "symfony/service-implementation": ""
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "branch-version": "2.3",
+ "branch-alias": {
+ "dev-main": "2.3-dev"
+ },
+ "thanks": {
+ "name": "symfony/contracts",
+ "url": "https://github.com/symfony/contracts"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
+ },
+ "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": "Generic abstractions related to writing services",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/service-contracts/tree/main"
+ },
+ "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": "2021-01-11T09:51:46+00:00"
+ },
+ {
+ "name": "symfony/stopwatch",
+ "version": "5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/stopwatch.git",
+ "reference": "f0302d2c69902b195f6bec61dc0bc52736c38b93"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f0302d2c69902b195f6bec61dc0bc52736c38b93",
+ "reference": "f0302d2c69902b195f6bec61dc0bc52736c38b93",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/service-contracts": "^1.0|^2"
+ },
+ "default-branch": true,
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Stopwatch\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides a way to profile code",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/stopwatch/tree/5.x"
+ },
+ "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": "2021-01-11T09:51:46+00:00"
+ },
+ {
+ "name": "symfony/string",
+ "version": "5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/string.git",
+ "reference": "2f833cf54d5fe9646638c50778016a06b6fe1603"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/string/zipball/2f833cf54d5fe9646638c50778016a06b6fe1603",
+ "reference": "2f833cf54d5fe9646638c50778016a06b6fe1603",
+ "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"
+ },
+ "default-branch": true,
+ "type": "library",
+ "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": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "grapheme",
+ "i18n",
+ "string",
+ "unicode",
+ "utf-8",
+ "utf8"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/string/tree/5.x"
+ },
+ "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": "2021-01-12T14:28:55+00:00"
},
{
"name": "theseer/tokenizer",
@@ -2559,20 +4545,20 @@
},
{
"name": "webmozart/assert",
- "version": "1.9.1",
+ "version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
- "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
+ "reference": "9c89b265ccc4092d58e66d72af5d343ee77a41ae"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
- "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/9c89b265ccc4092d58e66d72af5d343ee77a41ae",
+ "reference": "9c89b265ccc4092d58e66d72af5d343ee77a41ae",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0 || ^8.0",
+ "php": "^7.2 || ^8.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
@@ -2580,9 +4566,15 @@
"vimeo/psalm": "<3.9.1"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.36 || ^7.5.13"
+ "phpunit/phpunit": "^8.5.13"
},
+ "default-branch": true,
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.10-dev"
+ }
+ },
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
@@ -2608,7 +4600,7 @@
"issues": "https://github.com/webmozart/assert/issues",
"source": "https://github.com/webmozart/assert/tree/master"
},
- "time": "2020-07-08T17:02:28+00:00"
+ "time": "2021-01-18T12:52:36+00:00"
}
],
"aliases": [],
diff --git a/core/basethemelet.php b/core/basethemelet.php
index b8289ebc..3f2e2598 100644
--- a/core/basethemelet.php
+++ b/core/basethemelet.php
@@ -72,7 +72,7 @@ class BaseThemelet
}
}
- return "".
+ return " ".
" ".
" \n";
}
diff --git a/core/imageboard/image.php b/core/imageboard/image.php
index cee3a9a4..a57d19d2 100644
--- a/core/imageboard/image.php
+++ b/core/imageboard/image.php
@@ -483,6 +483,7 @@ class Image
WHERE image_id=:id
ORDER BY tag
", ["id"=>$this->id]);
+ sort($this->tag_array);
}
return $this->tag_array;
}
diff --git a/core/permissions.php b/core/permissions.php
index 21429ae7..acb6284a 100644
--- a/core/permissions.php
+++ b/core/permissions.php
@@ -7,6 +7,9 @@ abstract class Permissions
{
public const CHANGE_SETTING = "change_setting"; # modify web-level settings, eg the config table
public const OVERRIDE_CONFIG = "override_config"; # modify sys-level settings, eg shimmie.conf.php
+ public const CHANGE_USER_SETTING = "change_user_setting"; # modify own user-level settings
+ public const CHANGE_OTHER_USER_SETTING = "change_other_user_setting"; # modify own user-level settings
+
public const BIG_SEARCH = "big_search"; # search for more than 3 tags at once (speed mode only)
public const MANAGE_EXTENSION_LIST = "manage_extension_list";
@@ -100,6 +103,7 @@ abstract class Permissions
public const SET_PRIVATE_IMAGE = "set_private_image";
public const SET_OTHERS_PRIVATE_IMAGES = "set_others_private_images";
+ public const CRON_RUN = "cron_run";
public const BULK_IMPORT = "bulk_import";
public const BULK_EXPORT = "bulk_export";
public const BULK_DOWNLOAD = "bulk_download";
diff --git a/core/userclass.php b/core/userclass.php
index a24c879e..ba77884c 100644
--- a/core/userclass.php
+++ b/core/userclass.php
@@ -100,6 +100,7 @@ new UserClass("user", "base", [
Permissions::READ_PM => true,
Permissions::SET_PRIVATE_IMAGE => true,
Permissions::BULK_DOWNLOAD => true,
+ Permissions::CHANGE_USER_SETTING => true
]);
new UserClass("hellbanned", "user", [
@@ -108,6 +109,8 @@ new UserClass("hellbanned", "user", [
new UserClass("admin", "base", [
Permissions::CHANGE_SETTING => true,
+ Permissions::CHANGE_USER_SETTING => true,
+ Permissions::CHANGE_OTHER_USER_SETTING => true,
Permissions::OVERRIDE_CONFIG => true,
Permissions::BIG_SEARCH => true,
@@ -200,6 +203,8 @@ new UserClass("admin", "base", [
Permissions::APPROVE_IMAGE => true,
Permissions::APPROVE_COMMENT => true,
+ Permissions::CRON_RUN =>true,
+
Permissions::BULK_IMPORT =>true,
Permissions::BULK_EXPORT =>true,
Permissions::BULK_DOWNLOAD => true,
diff --git a/ext/approval/theme.php b/ext/approval/theme.php
index 7b85c43c..e6033d72 100644
--- a/ext/approval/theme.php
+++ b/ext/approval/theme.php
@@ -41,9 +41,8 @@ class ApprovalTheme extends Themelet
public function display_admin_block(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Approval");
+ $sb = $event->panel->create_new_block("Approval");
$sb->add_bool_option(ApprovalConfig::IMAGES, "Posts: ");
- $event->panel->add_block($sb);
}
public function display_admin_form()
diff --git a/ext/ban_words/main.php b/ext/ban_words/main.php
index 3ed7d253..99f2d6ab 100644
--- a/ext/ban_words/main.php
+++ b/ext/ban_words/main.php
@@ -55,7 +55,7 @@ xanax
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Banned Phrases");
+ $sb = $event->panel->create_new_block("Banned Phrases");
$sb->add_label("One per line, lines that start with slashes are treated as regex ");
$sb->add_longtext_option("banned_words");
$failed = [];
@@ -69,7 +69,6 @@ xanax
if ($failed) {
$sb->add_label("Failed regexes: ".join(", ", $failed));
}
- $event->panel->add_block($sb);
}
/**
diff --git a/ext/bbcode/info.php b/ext/bbcode/info.php
index 5ee10f5a..ae10d345 100644
--- a/ext/bbcode/info.php
+++ b/ext/bbcode/info.php
@@ -12,21 +12,44 @@ class BBCodeInfo extends ExtensionInfo
public $core = true;
public $description = "Turns BBCode into HTML";
public $documentation =
-" Supported tags:
+" Basic formatting tags:
- [img]url[/img]
- [url]https://code.shishnet.org/ [/url]
- [email]webmaster@shishnet.org [/email]
[b]bold [/b]
[i]italic [/i]
[u]underline [/u]
[s]strikethrough [/s]
[sup]superscript [/sup]
[sub]subscript [/sub]
+ [h1]Heading 1[/h1]
+ [h2]Heading 2[/h2]
+ [h3]Heading 3[/h3]
+ [h4]Heading 4[/h4]
+ [align=left|center|right]Aligned Text[/align]
+
+
+ Link tags:
+
+ [img]url[/img]
+ [url]https://code.shishnet.org/ [/url]
+ [url=https://code.shishnet.org/ ]some text[/url]
+ [url]site://ext_doc/bbcode[/url]
+ [url=site://ext_doc/bbcode]Link to BBCode docs[/url]
+ [email]webmaster@shishnet.org [/email]
[[wiki article]]
[[wiki article|with some text]]
- [quote]text[/quote]
- [quote=Username]text[/quote]
>>123 (link to post #123)
+ [anchor=target]Scroll to #bb-target[/anchor]
+
+
+ More format Tags:
+
+ [list]Unordered list[/list]
+ [ul]Unordered list[/ul]
+ [ol]Ordered list[/ol]
+ [li]List Item[/li]
+ [code]print(\"Hello World!\"); [/code]
+ [spoiler]Voldemort is bad [/spoiler]
+ [quote]To be or not to be... [/quote]
+ [quote=Shakespeare]Shakespeare said: ... That is the question [/quote]
";
}
diff --git a/ext/blotter/main.php b/ext/blotter/main.php
index 08adf4bd..32c322ac 100644
--- a/ext/blotter/main.php
+++ b/ext/blotter/main.php
@@ -40,11 +40,10 @@ class Blotter extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Blotter");
+ $sb = $event->panel->create_new_block("Blotter");
$sb->add_int_option("blotter_recent", " Number of recent entries to display: ");
$sb->add_text_option("blotter_color", " Color of important updates: (ABCDEF format) ");
$sb->add_choice_option("blotter_position", ["Top of page" => "subheading", "In navigation bar" => "left"], " Position: ");
- $event->panel->add_block($sb);
}
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
diff --git a/ext/browser_search/main.php b/ext/browser_search/main.php
index 4781c9a2..b6cd8f19 100644
--- a/ext/browser_search/main.php
+++ b/ext/browser_search/main.php
@@ -78,8 +78,7 @@ class BrowserSearch extends Extension
$sort_by['Tag Count'] = 't';
$sort_by['Disabled'] = 'n';
- $sb = new SetupBlock("Browser Search");
+ $sb = $event->panel->create_new_block("Browser Search");
$sb->add_choice_option("search_suggestions_results_order", $sort_by, "Sort the suggestions by:");
- $event->panel->add_block($sb);
}
}
diff --git a/ext/bulk_actions/main.php b/ext/bulk_actions/main.php
index 3c317f01..343536ba 100644
--- a/ext/bulk_actions/main.php
+++ b/ext/bulk_actions/main.php
@@ -127,8 +127,8 @@ class BulkActions extends Extension
switch ($event->action) {
case "bulk_delete":
if ($user->can(Permissions::DELETE_IMAGE)) {
- $i = $this->delete_items($event->items);
- $page->flash("Deleted $i items");
+ $i = $this->delete_posts($event->items);
+ $page->flash("Deleted $i[0] items, totaling ".human_filesize($i[1]));
}
break;
case "bulk_tag":
@@ -227,25 +227,27 @@ class BulkActions extends Extension
return $a["position"] - $b["position"];
}
- private function delete_items(iterable $items): int
+ private function delete_posts(iterable $posts): array
{
global $page;
$total = 0;
- foreach ($items as $image) {
+ $size = 0;
+ foreach ($posts as $post) {
try {
if (class_exists("ImageBan") && isset($_POST['bulk_ban_reason'])) {
$reason = $_POST['bulk_ban_reason'];
if ($reason) {
- send_event(new AddImageHashBanEvent($image->hash, $reason));
+ send_event(new AddImageHashBanEvent($post->hash, $reason));
}
}
- send_event(new ImageDeletionEvent($image));
+ send_event(new ImageDeletionEvent($post));
$total++;
+ $size += $post->filesize;
} catch (Exception $e) {
- $page->flash("Error while removing {$image->id}: " . $e->getMessage());
+ $page->flash("Error while removing {$post->id}: " . $e->getMessage());
}
}
- return $total;
+ return [$total, $size];
}
private function tag_items(iterable $items, string $tags, bool $replace): int
diff --git a/ext/bulk_download/main.php b/ext/bulk_download/main.php
index 28ff60e9..228bb671 100644
--- a/ext/bulk_download/main.php
+++ b/ext/bulk_download/main.php
@@ -30,13 +30,11 @@ class BulkDownload extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Bulk Download");
+ $sb = $event->panel->create_new_block("Bulk Download");
$sb->start_table();
$sb->add_shorthand_int_option(BulkDownloadConfig::SIZE_LIMIT, "Size Limit", true);
$sb->end_table();
-
- $event->panel->add_block($sb);
}
public function onBulkAction(BulkActionEvent $event)
diff --git a/ext/comment/main.php b/ext/comment/main.php
index 3ded122f..ca471aa0 100644
--- a/ext/comment/main.php
+++ b/ext/comment/main.php
@@ -379,7 +379,7 @@ class CommentList extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Comment Options");
+ $sb = $event->panel->create_new_block("Comment Options");
$sb->add_bool_option("comment_captcha", "Require CAPTCHA for anonymous comments: ");
$sb->add_label(" Limit to ");
$sb->add_int_option("comment_limit");
@@ -394,7 +394,6 @@ class CommentList extends Extension
$sb->add_label(" comments per image on the list");
$sb->add_label(" Make samefags public ");
$sb->add_bool_option("comment_samefags_public");
- $event->panel->add_block($sb);
}
public function onSearchTermParse(SearchTermParseEvent $event)
diff --git a/ext/cron_uploader/config.php b/ext/cron_uploader/config.php
index 91c7917b..1e0448f9 100644
--- a/ext/cron_uploader/config.php
+++ b/ext/cron_uploader/config.php
@@ -5,66 +5,8 @@ abstract class CronUploaderConfig
{
public const DEFAULT_PATH = "cron_uploader";
- public const KEY = "cron_uploader_key";
public const DIR = "cron_uploader_dir";
- public const USER = "cron_uploader_user";
public const STOP_ON_ERROR = "cron_uploader_stop_on_error";
public const INCLUDE_ALL_LOGS = "cron_uploader_include_all_logs";
public const LOG_LEVEL = "cron_uploader_log_level";
-
- public static function set_defaults(): void
- {
- global $config;
- $config->set_default_string(self::DIR, data_path(self::DEFAULT_PATH));
- $config->set_default_bool(self::INCLUDE_ALL_LOGS, false);
- $config->set_default_bool(self::STOP_ON_ERROR, false);
- $config->set_default_int(self::LOG_LEVEL, SCORE_LOG_INFO);
- $upload_key = $config->get_string(self::KEY, "");
- if (empty($upload_key)) {
- $upload_key = generate_key();
-
- $config->set_string(self::KEY, $upload_key);
- }
- }
-
- public static function get_user(): int
- {
- global $config;
- return $config->get_int(self::USER);
- }
-
- public static function set_user(int $value): void
- {
- global $config;
- $config->set_int(self::USER, $value);
- }
-
- public static function get_key(): string
- {
- global $config;
- return $config->get_string(self::KEY);
- }
-
- public static function set_key(string $value): void
- {
- global $config;
- $config->set_string(self::KEY, $value);
- }
-
- public static function get_dir(): string
- {
- global $config;
- $value = $config->get_string(self::DIR);
- if (empty($value)) {
- $value = data_path("cron_uploader");
- self::set_dir($value);
- }
- return $value;
- }
-
- public static function set_dir(string $value): void
- {
- global $config;
- $config->set_string(self::DIR, $value);
- }
}
diff --git a/ext/cron_uploader/main.php b/ext/cron_uploader/main.php
index f8bce0a1..cfbaad90 100644
--- a/ext/cron_uploader/main.php
+++ b/ext/cron_uploader/main.php
@@ -17,12 +17,40 @@ class CronUploader extends Extension
private static $IMPORT_RUNNING = false;
- public function onInitExt(InitExtEvent $event)
+ public function onInitUserConfig(InitUserConfigEvent $event)
{
- // Set default values
- CronUploaderConfig::set_defaults();
+ $event->user_config->set_default_string(
+ CronUploaderConfig::DIR,
+ data_path(CronUploaderConfig::DEFAULT_PATH.DIRECTORY_SEPARATOR.$event->user->name)
+ );
+ $event->user_config->set_default_bool(CronUploaderConfig::INCLUDE_ALL_LOGS, false);
+ $event->user_config->set_default_bool(CronUploaderConfig::STOP_ON_ERROR, false);
+ $event->user_config->set_default_int(CronUploaderConfig::LOG_LEVEL, SCORE_LOG_INFO);
}
+ public function onUserOptionsBuilding(UserOptionsBuildingEvent $event)
+ {
+ if ($event->user->can(Permissions::CRON_ADMIN)) {
+ $documentation_link = make_http(make_link("cron_upload"));
+
+ $sb = $event->panel->create_new_block("Cron Uploader");
+ $sb->start_table();
+ $sb->add_text_option(CronUploaderConfig::DIR, "Root dir", true);
+ $sb->add_bool_option(CronUploaderConfig::STOP_ON_ERROR, "Stop On Error", true);
+ $sb->add_choice_option(CronUploaderConfig::LOG_LEVEL, [
+ LOGGING_LEVEL_NAMES[SCORE_LOG_DEBUG] => SCORE_LOG_DEBUG,
+ LOGGING_LEVEL_NAMES[SCORE_LOG_INFO] => SCORE_LOG_INFO,
+ LOGGING_LEVEL_NAMES[SCORE_LOG_WARNING] => SCORE_LOG_WARNING,
+ LOGGING_LEVEL_NAMES[SCORE_LOG_ERROR] => SCORE_LOG_ERROR,
+ LOGGING_LEVEL_NAMES[SCORE_LOG_CRITICAL] => SCORE_LOG_CRITICAL,
+ ], "Output Log Level: ", true);
+ $sb->add_bool_option(CronUploaderConfig::INCLUDE_ALL_LOGS, "Include All Logs", true);
+ $sb->end_table();
+ $sb->add_label("Read the documentation for cron setup instructions.");
+ }
+ }
+
+
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
{
if ($event->parent=="system") {
@@ -39,42 +67,14 @@ class CronUploader extends Extension
global $user;
if ($event->page_matches("cron_upload")) {
- if ($event->count_args() == 1) {
- $this->process_upload($event->get_arg(0)); // Start upload
- } elseif ($user->can(Permissions::CRON_ADMIN)) {
+ if ($event->count_args() == 1 && $event->get_arg(0) =="run") {
+ $this->process_upload(); // Start upload
+ } elseif ($user->can(Permissions::CRON_RUN)) {
$this->display_documentation();
}
}
}
- public function onSetupBuilding(SetupBuildingEvent $event)
- {
- global $database;
-
- $documentation_link = make_http(make_link("cron_upload"));
-
- $users = $database->get_pairs("SELECT name, id FROM users UNION ALL SELECT '', null order by name");
-
- $sb = new SetupBlock("Cron Uploader");
- $sb->start_table();
- $sb->add_text_option(CronUploaderConfig::DIR, "Root dir", true);
- $sb->add_text_option(CronUploaderConfig::KEY, "Key", true);
- $sb->add_choice_option(CronUploaderConfig::USER, $users, "User", true);
- $sb->add_bool_option(CronUploaderConfig::STOP_ON_ERROR, "Stop On Error", true);
- $sb->add_choice_option(CronUploaderConfig::LOG_LEVEL, [
- LOGGING_LEVEL_NAMES[SCORE_LOG_DEBUG] => SCORE_LOG_DEBUG,
- LOGGING_LEVEL_NAMES[SCORE_LOG_INFO] => SCORE_LOG_INFO,
- LOGGING_LEVEL_NAMES[SCORE_LOG_WARNING] => SCORE_LOG_WARNING,
- LOGGING_LEVEL_NAMES[SCORE_LOG_ERROR] => SCORE_LOG_ERROR,
- LOGGING_LEVEL_NAMES[SCORE_LOG_CRITICAL] => SCORE_LOG_CRITICAL,
- ], "Output Log Level: ", true);
- $sb->add_bool_option(CronUploaderConfig::INCLUDE_ALL_LOGS, "Include All Logs", true);
- $sb->end_table();
- $sb->add_label("Read the documentation for cron setup instructions.");
-
- $event->panel->add_block($sb);
- }
-
public function onAdminBuilding(AdminBuildingEvent $event)
{
$failed_dir = $this->get_failed_dir();
@@ -118,19 +118,20 @@ class CronUploader extends Extension
public function onLog(LogEvent $event)
{
- global $config;
- $all = $config->get_bool(CronUploaderConfig::INCLUDE_ALL_LOGS);
- if (self::$IMPORT_RUNNING &&
- $event->priority >= $config->get_int(CronUploaderConfig::LOG_LEVEL) &&
- ($event->section==self::NAME || $all)
- ) {
- $output = "[" . date('Y-m-d H:i:s') . "] " . ($all ? '['. $event->section .'] ' :'') . "[" . LOGGING_LEVEL_NAMES[$event->priority] . "] " . $event->message ;
+ global $user_config;
- echo $output . "\r\n";
- flush_output();
+ if (self::$IMPORT_RUNNING) {
+ $all = $user_config->get_bool(CronUploaderConfig::INCLUDE_ALL_LOGS);
+ if ($event->priority >= $user_config->get_int(CronUploaderConfig::LOG_LEVEL) &&
+ ($event->section==self::NAME || $all)) {
+ $output = "[" . date('Y-m-d H:i:s') . "] " . ($all ? '[' . $event->section . '] ' : '') . "[" . LOGGING_LEVEL_NAMES[$event->priority] . "] " . $event->message;
- $log_path = $this->get_log_file();
- file_put_contents($log_path, $output);
+ echo $output . "\r\n";
+ flush_output();
+
+ $log_path = $this->get_log_file();
+ file_put_contents($log_path, $output);
+ }
}
}
@@ -193,8 +194,8 @@ class CronUploader extends Extension
private function clear_folder($folder)
{
- global $page;
- $path = join_path(CronUploaderConfig::get_dir(), $folder);
+ global $page, $user_config;
+ $path = join_path($user_config->get_string(CronUploaderConfig::DIR), $folder);
deltree($path);
$page->flash("Cleared $path");
}
@@ -202,7 +203,11 @@ class CronUploader extends Extension
private function get_cron_url()
{
- return make_http(make_link("/cron_upload/" . CronUploaderConfig::get_key()));
+ global $user_config;
+
+ $user_api_key = $user_config->get_string(UserConfig::API_KEY);
+
+ return make_http(make_link("/cron_upload/run", "api_key=".urlencode($user_api_key)));
}
private function get_cron_cmd()
@@ -258,26 +263,34 @@ class CronUploader extends Extension
public function get_queue_dir()
{
- $dir = CronUploaderConfig::get_dir();
+ global $user_config;
+
+ $dir = $user_config->get_string(CronUploaderConfig::DIR);
return join_path($dir, self::QUEUE_DIR);
}
public function get_uploaded_dir()
{
- $dir = CronUploaderConfig::get_dir();
+ global $user_config;
+
+ $dir = $user_config->get_string(CronUploaderConfig::DIR);
return join_path($dir, self::UPLOADED_DIR);
}
public function get_failed_dir()
{
- $dir = CronUploaderConfig::get_dir();
+ global $user_config;
+
+ $dir = $user_config->get_string(CronUploaderConfig::DIR);
return join_path($dir, self::FAILED_DIR);
}
private function prep_root_dir(): string
{
+ global $user_config;
+
// Determine directory (none = default)
- $dir = CronUploaderConfig::get_dir();
+ $dir = $user_config->get_string(CronUploaderConfig::DIR);
// Make the directory if it doesn't exist yet
if (!is_dir($this->get_queue_dir())) {
@@ -295,35 +308,36 @@ class CronUploader extends Extension
private function get_lock_file(): string
{
- $root_dir = CronUploaderConfig::get_dir();
+ global $user_config;
+
+ $root_dir = $user_config->get_string(CronUploaderConfig::DIR);
return join_path($root_dir, ".lock");
}
/**
* Uploads the image & handles everything
*/
- public function process_upload(string $key, ?int $upload_count = null): bool
+ public function process_upload(): bool
{
- global $database, $config, $_shm_load_start;
+ global $database, $user, $user_config, $config, $_shm_load_start;
$max_time = intval(ini_get('max_execution_time'))*.8;
$this->set_headers();
- if ($key!=CronUploaderConfig::get_key()) {
- throw new SCoreException("Cron upload key incorrect");
- }
- $user_id = CronUploaderConfig::get_user();
- if (empty($user_id)) {
- throw new SCoreException("Cron upload user not set");
- }
- $my_user = User::by_id($user_id);
- if ($my_user == null) {
- throw new SCoreException("No user found for cron upload user $user_id");
+ if (!$config->get_bool(UserConfig::ENABLE_API_KEYS)) {
+ throw new SCoreException("User API keys are note enabled. Please enable them for the cron upload functionality to work.");
}
- send_event(new UserLoginEvent($my_user));
- $this->log_message(SCORE_LOG_INFO, "Logged in as user {$my_user->name}");
+ if ($user->is_anonymous()) {
+ throw new SCoreException("User not present. Please specify the api_key for the user to run cron upload as.");
+ }
+
+ $this->log_message(SCORE_LOG_INFO, "Logged in as user {$user->name}");
+
+ if (!$user->can(Permissions::CRON_RUN)) {
+ throw new SCoreException("User does not have permission to run cron upload");
+ }
$lockfile = fopen($this->get_lock_file(), "w");
if (!flock($lockfile, LOCK_EX | LOCK_NB)) {
@@ -335,7 +349,7 @@ class CronUploader extends Extension
//set_time_limit(0);
$output_subdir = date('Ymd-His', time());
- $image_queue = $this->generate_image_queue(CronUploaderConfig::get_dir());
+ $image_queue = $this->generate_image_queue($user_config->get_string(CronUploaderConfig::DIR));
// Randomize Images
//shuffle($this->image_queue);
@@ -349,6 +363,9 @@ class CronUploader extends Extension
$execution_time = microtime(true) - $_shm_load_start;
if ($execution_time>$max_time) {
break;
+ } else {
+ $remaining = $max_time - $execution_time;
+ $this->log_message(SCORE_LOG_DEBUG, "Max run time remaining: $remaining");
}
try {
$database->begin_transaction();
@@ -374,7 +391,7 @@ class CronUploader extends Extension
$failed++;
$this->log_message(SCORE_LOG_ERROR, "(" . gettype($e) . ") " . $e->getMessage());
$this->log_message(SCORE_LOG_ERROR, $e->getTraceAsString());
- if ($config->get_bool(CronUploaderConfig::STOP_ON_ERROR)) {
+ if ($user_config->get_bool(CronUploaderConfig::STOP_ON_ERROR)) {
break;
} else {
$this->move_uploaded($img[0], $img[1], $output_subdir, true);
@@ -403,7 +420,9 @@ class CronUploader extends Extension
private function move_uploaded(string $path, string $filename, string $output_subdir, bool $corrupt = false)
{
- $rootDir = CronUploaderConfig::get_dir();
+ global $user_config;
+
+ $rootDir = $user_config->get_string(CronUploaderConfig::DIR);
$rootLength = strlen($rootDir);
if ($rootDir[$rootLength-1]=="/"||$rootDir[$rootLength-1]=="\\") {
$rootLength--;
@@ -540,7 +559,11 @@ class CronUploader extends Extension
private function get_log_file(): string
{
- return join_path(CronUploaderConfig::get_dir(), "uploads.log");
+ global $user_config;
+
+ $dir = $user_config->get_string(CronUploaderConfig::DIR);
+
+ return join_path($dir, "uploads.log");
}
private function set_headers(): void
diff --git a/ext/cron_uploader/script.js b/ext/cron_uploader/script.js
new file mode 100644
index 00000000..e61f39f3
--- /dev/null
+++ b/ext/cron_uploader/script.js
@@ -0,0 +1,7 @@
+function copyInputToClipboard(inputId) {
+ // Referenced from https://www.w3schools.com/howto/howto_js_copy_clipboard.asp
+ let source = document.getElementById(inputId);
+ source.select();
+ source.setSelectionRange(0, 99999); /*For mobile devices*/
+ document.execCommand("copy");
+}
diff --git a/ext/cron_uploader/theme.php b/ext/cron_uploader/theme.php
index a829781a..07d3edde 100644
--- a/ext/cron_uploader/theme.php
+++ b/ext/cron_uploader/theme.php
@@ -1,5 +1,18 @@
set_title("Cron Uploader");
+ $page->set_heading("Cron Uploader");
- $info_html = "Information
+ if (!$config->get_bool(UserConfig::ENABLE_API_KEYS)) {
+ $info_html .= "THIS EXTENSION REQUIRES USER API KEYS TO BE ENABLED IN BOARD ADMIN ";
+ } else {
+ }
+
+ $info_html .= "Information
" . ($running ? "Cron upload is currently running " : "") . "
@@ -41,9 +62,13 @@ class CronUploaderTheme extends Themelet
{$failed_dirinfo['path']}
- Cron Command:
- Create a cron job with the command above.
- Read the documentation if you're not sure what to do. ";
+ Cron Command:
+ Copy
+ Create a cron job with the command above.
+ Read the documentation if you're not sure what to do.
+ URL:
+ Copy
";
+
$install_html = "
This cron uploader is fairly easy to use but has to be configured first.
@@ -76,12 +101,10 @@ class CronUploaderTheme extends Themelet
If an import is already running, another cannot start until it is done.
Each time it runs it will import for up to ".number_format($max_time)." seconds. This is controlled by the PHP max execution time.
Uploaded images will be moved to the 'uploaded' directory into a subfolder named after the time the import started. It's recommended that you remove everything out of this directory from time to time. If you have admin controls enabled, this can be done from Board Admin .
- If you enable the db logging extension, you can view the log output on this screen. Otherwise the log will be written to a file at ".CronUploaderConfig::get_dir().DIRECTORY_SEPARATOR."uploads.log
+ If you enable the db logging extension, you can view the log output on this screen. Otherwise the log will be written to a file at ".$user_config->get_string(CronUploaderConfig::DIR).DIRECTORY_SEPARATOR."uploads.log
";
- $page->set_title("Cron Uploader");
- $page->set_heading("Cron Uploader");
$block = new Block("Cron Uploader", $info_html, "main", 10);
$block_install = new Block("Setup Guide", $install_html, "main", 30);
@@ -101,6 +124,40 @@ class CronUploaderTheme extends Themelet
}
}
+ public function get_user_options(string $dir, bool $stop_on_error, int $log_level, bool $all_logs): string
+ {
+ $form = SHM_SIMPLE_FORM(
+ "user_admin/cron_uploader",
+ TABLE(
+ ["class"=>"form"],
+ TBODY(
+ TR(
+ TH("Cron Uploader")
+ ),
+ TR(
+ TH("Root dir"),
+ TD(INPUT(["type"=>'text', "name"=>'name', "required"=>true]))
+ ),
+ TR(
+ TH(),
+ TD(
+ LABEL(INPUT(["type"=>'checkbox', "name"=>'stop_on_error']), "Stop On Error")
+ )
+ ),
+ TR(
+ TH(rawHTML("Repeat Password")),
+ TD(INPUT(["type"=>'password', "name"=>'pass2', "required"=>true]))
+ )
+ ),
+ TFOOT(
+ TR(TD(["colspan"=>"2"], INPUT(["type"=>"submit", "value"=>"Save Settings"])))
+ )
+ )
+ );
+ $html = emptyHTML($form);
+ return (string)$html;
+ }
+
public function display_form(array $failed_dirs)
{
global $page;
diff --git a/ext/custom_html_headers/main.php b/ext/custom_html_headers/main.php
index 52a09687..3fa6e665 100644
--- a/ext/custom_html_headers/main.php
+++ b/ext/custom_html_headers/main.php
@@ -5,7 +5,7 @@ class CustomHtmlHeaders extends Extension
# Adds setup block for custom content
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Custom HTML Headers");
+ $sb = $event->panel->create_new_block("Custom HTML Headers");
// custom headers
$sb->add_longtext_option(
@@ -19,8 +19,6 @@ class CustomHtmlHeaders extends Extension
"as prefix" => "prefix",
"as suffix" => "suffix"
], " Add website name in title");
-
- $event->panel->add_block($sb);
}
public function onInitExt(InitExtEvent $event)
diff --git a/ext/downtime/main.php b/ext/downtime/main.php
index 29507e69..6bc823aa 100644
--- a/ext/downtime/main.php
+++ b/ext/downtime/main.php
@@ -12,10 +12,9 @@ class Downtime extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Downtime");
+ $sb = $event->panel->create_new_block("Downtime");
$sb->add_bool_option("downtime", "Disable non-admin access: ");
$sb->add_longtext_option("downtime_message", " ");
- $event->panel->add_block($sb);
}
public function onPageRequest(PageRequestEvent $event)
diff --git a/ext/eokm/main.php b/ext/eokm/main.php
index 83e43633..45b0f32f 100644
--- a/ext/eokm/main.php
+++ b/ext/eokm/main.php
@@ -38,13 +38,11 @@ class Eokm extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("EOKM Filter");
+ $sb = $event->panel->create_new_block("EOKM Filter");
$sb->start_table();
$sb->add_text_option("eokm_username", "Username", true);
$sb->add_text_option("eokm_password", "Password", true);
$sb->end_table();
-
- $event->panel->add_block($sb);
}
}
diff --git a/ext/forum/main.php b/ext/forum/main.php
index b2aac68f..f4d941a2 100644
--- a/ext/forum/main.php
+++ b/ext/forum/main.php
@@ -62,13 +62,12 @@ class Forum extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Forum");
+ $sb = $event->panel->create_new_block("Forum");
$sb->add_int_option("forumTitleSubString", "Title max long: ");
$sb->add_int_option("forumThreadsPerPage", " Threads per page: ");
$sb->add_int_option("forumPostsPerPage", " Posts per page: ");
$sb->add_int_option("forumMaxCharsPerPost", " Max chars per post: ");
- $event->panel->add_block($sb);
}
public function onUserPageBuilding(UserPageBuildingEvent $event)
diff --git a/ext/google_analytics/main.php b/ext/google_analytics/main.php
index c38f8100..72c0f4e9 100644
--- a/ext/google_analytics/main.php
+++ b/ext/google_analytics/main.php
@@ -5,10 +5,9 @@ class GoogleAnalytics extends Extension
# Add analytics to config
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Google Analytics");
+ $sb = $event->panel->create_new_block("Google Analytics");
$sb->add_text_option("google_analytics_id", "Analytics ID: ");
$sb->add_label(" (eg. UA-xxxxxxxx-x)");
- $event->panel->add_block($sb);
}
# Load Analytics tracking code on page request
diff --git a/ext/handle_archive/main.php b/ext/handle_archive/main.php
index d6a57098..55c7b686 100644
--- a/ext/handle_archive/main.php
+++ b/ext/handle_archive/main.php
@@ -12,11 +12,10 @@ class ArchiveFileHandler extends DataHandlerExtension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Archive Handler Options");
+ $sb = $event->panel->create_new_block("Archive Handler Options");
$sb->add_text_option("archive_tmp_dir", "Temporary folder: ");
$sb->add_text_option("archive_extract_command", " Extraction command: ");
$sb->add_label(" %f for archive, %d for temporary directory");
- $event->panel->add_block($sb);
}
public function onDataUpload(DataUploadEvent $event)
diff --git a/ext/handle_pixel/theme.php b/ext/handle_pixel/theme.php
index 485b6b5a..10dc2c24 100644
--- a/ext/handle_pixel/theme.php
+++ b/ext/handle_pixel/theme.php
@@ -30,7 +30,7 @@ class PixelFileHandlerTheme extends Themelet
}
$html = " width}' data-height='{$image->height}'>";
+ "data-width='{$image->width}' data-height='{$image->height} data-mime='{$image->get_mime()}'>";
$page->add_block(new Block("Image", $html, "main", 10));
}
}
diff --git a/ext/handle_video/main.php b/ext/handle_video/main.php
index e0134103..11d3a356 100644
--- a/ext/handle_video/main.php
+++ b/ext/handle_video/main.php
@@ -46,14 +46,13 @@ class VideoFileHandler extends DataHandlerExtension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Video Options");
+ $sb = $event->panel->create_new_block("Video Options");
$sb->start_table();
$sb->add_bool_option(VideoFileHandlerConfig::PLAYBACK_AUTOPLAY, "Autoplay", true);
$sb->add_bool_option(VideoFileHandlerConfig::PLAYBACK_LOOP, "Loop", true);
$sb->add_bool_option(VideoFileHandlerConfig::PLAYBACK_MUTE, "Mute", true);
$sb->add_multichoice_option(VideoFileHandlerConfig::ENABLED_FORMATS, $this->get_options(), "Enabled Formats", true);
$sb->end_table();
- $event->panel->add_block($sb);
}
protected function media_check_properties(MediaCheckPropertiesEvent $event): void
diff --git a/ext/holiday/main.php b/ext/holiday/main.php
index 9c722fd9..7d911c36 100644
--- a/ext/holiday/main.php
+++ b/ext/holiday/main.php
@@ -13,9 +13,8 @@ class Holiday extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Holiday Theme");
+ $sb = $event->panel->create_new_block("Holiday Theme");
$sb->add_bool_option("holiday_aprilfools", "Enable April Fools");
- $event->panel->add_block($sb);
}
public function onPageRequest(PageRequestEvent $event)
diff --git a/ext/home/main.php b/ext/home/main.php
index 4da456ed..6dbcfbf4 100644
--- a/ext/home/main.php
+++ b/ext/home/main.php
@@ -27,11 +27,10 @@ class Home extends Extension
$counters[ucfirst($name)] = $name;
}
- $sb = new SetupBlock("Home Page");
+ $sb = $event->panel->create_new_block("Home Page");
$sb->add_longtext_option("home_links", 'Page Links (Use BBCode, leave blank for defaults)');
$sb->add_longtext_option("home_text", " Page Text: ");
$sb->add_choice_option("home_counter", $counters, " Counter: ");
- $event->panel->add_block($sb);
}
diff --git a/ext/image/main.php b/ext/image/main.php
index 0c568c65..80a03391 100644
--- a/ext/image/main.php
+++ b/ext/image/main.php
@@ -256,7 +256,7 @@ class ImageIO extends Extension
{
global $config;
- $sb = new SetupBlock("Post Options");
+ $sb = $event->panel->create_new_block("Post Options");
$sb->start_table();
$sb->position = 30;
// advanced only
@@ -270,9 +270,8 @@ class ImageIO extends Extension
$sb->add_bool_option(ImageConfig::SHOW_META, "Show metadata", true);
}
$sb->end_table();
- $event->panel->add_block($sb);
- $sb = new SetupBlock("Thumbnailing");
+ $sb = $event->panel->create_new_block("Thumbnailing");
$sb->start_table();
$sb->add_choice_option(ImageConfig::THUMB_ENGINE, self::THUMBNAIL_ENGINES, "Engine", true);
$sb->add_choice_option(ImageConfig::THUMB_MIME, self::THUMBNAIL_TYPES, "Filetype", true);
@@ -294,8 +293,6 @@ class ImageIO extends Extension
}
$sb->end_table();
-
- $event->panel->add_block($sb);
}
public function onParseLinkTemplate(ParseLinkTemplateEvent $event)
diff --git a/ext/image/theme.php b/ext/image/theme.php
index 26c268d7..d85a7cb5 100644
--- a/ext/image/theme.php
+++ b/ext/image/theme.php
@@ -9,11 +9,11 @@ class ImageIOTheme extends Themelet
*/
public function get_deleter_html(int $image_id): string
{
- return (string)SHM_SIMPLE_FORM(
+ return (string)"".SHM_SIMPLE_FORM(
"image/delete",
INPUT(["type"=>'hidden', "name"=>'image_id', "value"=>$image_id]),
- INPUT(["type"=>'submit', "value"=>'Delete', "onclick"=>'return confirm("Delete the image?");']),
- );
+ INPUT(["type"=>'submit', "value"=>'Delete', "onclick"=>'return confirm("Delete the image?");', "id"=>"image_delete_button"]),
+ )." ";
}
/**
diff --git a/ext/image_view_counter/main.php b/ext/image_view_counter/main.php
index 77f67f94..d4b4b682 100644
--- a/ext/image_view_counter/main.php
+++ b/ext/image_view_counter/main.php
@@ -5,6 +5,14 @@ class ImageViewCounter extends Extension
protected $theme;
private $view_interval = 3600; # allows views to be added each hour
+ # Add Setup Block with options for view counter
+ public function onSetupBuilding(SetupBuildingEvent $event)
+ {
+ $sb = $event->panel->create_new_block("Post View Counter");
+ $sb->add_bool_option("image_viewcounter_adminonly", "Display view counter only to admin");
+ }
+
+ # Adds view to database if needed
public function onDisplayingImage(DisplayingImageEvent $event)
{
global $database, $user;
diff --git a/ext/index/main.php b/ext/index/main.php
index cd73aa16..20e7793e 100644
--- a/ext/index/main.php
+++ b/ext/index/main.php
@@ -120,14 +120,12 @@ class Index extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Index Options");
+ $sb = $event->panel->create_new_block("Index Options");
$sb->position = 20;
$sb->add_label("Show ");
$sb->add_int_option(IndexConfig::IMAGES);
$sb->add_label(" images on the post list");
-
- $event->panel->add_block($sb);
}
public function onPageNavBuilding(PageNavBuildingEvent $event)
diff --git a/ext/ipban/main.php b/ext/ipban/main.php
index 7c7da3be..99b36e78 100644
--- a/ext/ipban/main.php
+++ b/ext/ipban/main.php
@@ -209,7 +209,7 @@ class IPBan extends Extension
{
global $config;
- $sb = new SetupBlock("IP Ban");
+ $sb = $event->panel->create_new_block("IP Ban");
$sb->add_longtext_option("ipban_message", 'Message to show to banned users: (with $IP, $DATE, $ADMIN, $REASON, and $CONTACT)');
if ($config->get_string("ipban_message_ghost")) {
$sb->add_longtext_option("ipban_message_ghost", 'Message to show to ghost users:');
@@ -217,7 +217,6 @@ class IPBan extends Extension
if ($config->get_string("ipban_message_anon-ghost")) {
$sb->add_longtext_option("ipban_message_anon-ghost", 'Message to show to ghost anons:');
}
- $event->panel->add_block($sb);
}
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
diff --git a/ext/link_image/main.php b/ext/link_image/main.php
index 11e70cb5..d0fe036c 100644
--- a/ext/link_image/main.php
+++ b/ext/link_image/main.php
@@ -13,9 +13,8 @@ class LinkImage extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Link to Post");
+ $sb = $event->panel->create_new_block("Link to Post");
$sb->add_text_option("ext_link-img_text-link_format", "Text Link Format: ");
- $event->panel->add_block($sb);
}
public function onInitExt(InitExtEvent $event)
diff --git a/ext/livefeed/main.php b/ext/livefeed/main.php
index 730881c3..259be290 100644
--- a/ext/livefeed/main.php
+++ b/ext/livefeed/main.php
@@ -4,9 +4,8 @@ class LiveFeed extends Extension
{
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Live Feed");
+ $sb = $event->panel->create_new_block("Live Feed");
$sb->add_text_option("livefeed_host", "IP:port to send events to: ");
- $event->panel->add_block($sb);
}
public function onUserCreation(UserCreationEvent $event)
diff --git a/ext/log_db/main.php b/ext/log_db/main.php
index f290fc5a..71ad422c 100644
--- a/ext/log_db/main.php
+++ b/ext/log_db/main.php
@@ -235,7 +235,7 @@ class LogDatabase extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Logging (Database)");
+ $sb = $event->panel->create_new_block("Logging (Database)");
$sb->add_choice_option("log_db_priority", [
LOGGING_LEVEL_NAMES[SCORE_LOG_DEBUG] => SCORE_LOG_DEBUG,
LOGGING_LEVEL_NAMES[SCORE_LOG_INFO] => SCORE_LOG_INFO,
@@ -243,7 +243,6 @@ class LogDatabase extends Extension
LOGGING_LEVEL_NAMES[SCORE_LOG_ERROR] => SCORE_LOG_ERROR,
LOGGING_LEVEL_NAMES[SCORE_LOG_CRITICAL] => SCORE_LOG_CRITICAL,
], "Debug Level: ");
- $event->panel->add_block($sb);
}
public function onPageRequest(PageRequestEvent $event)
diff --git a/ext/media/main.php b/ext/media/main.php
index b9371965..a636814e 100644
--- a/ext/media/main.php
+++ b/ext/media/main.php
@@ -79,7 +79,7 @@ class Media extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Media Engines");
+ $sb = $event->panel->create_new_block("Media Engines");
// if (self::imagick_available()) {
// try {
@@ -101,8 +101,6 @@ class Media extends Extension
$sb->add_shorthand_int_option(MediaConfig::MEM_LIMIT, "Mem limit", true);
$sb->end_table();
-
- $event->panel->add_block($sb);
}
public function onImageAdminBlockBuilding(ImageAdminBlockBuildingEvent $event)
diff --git a/ext/media/media_engine.php b/ext/media/media_engine.php
index bb10ae1e..2adcf926 100644
--- a/ext/media/media_engine.php
+++ b/ext/media/media_engine.php
@@ -47,6 +47,7 @@ abstract class MediaEngine
MimeType::GIF,
MimeType::JPEG,
MimeType::PNG,
+ MimeType::TGA,
MimeType::WEBP,
MimeType::WEBP_LOSSLESS,
],
@@ -57,6 +58,7 @@ abstract class MediaEngine
MimeType::PNG,
MimeType::PPM,
MimeType::PSD,
+ MimeType::TGA,
MimeType::TIFF,
MimeType::WEBP,
MimeType::WEBP_LOSSLESS,
diff --git a/ext/mime/file_extension.php b/ext/mime/file_extension.php
index e570ae4d..8f7ace92 100644
--- a/ext/mime/file_extension.php
+++ b/ext/mime/file_extension.php
@@ -51,6 +51,7 @@ class FileExtension
public const RSS = 'rss';
public const SVG = 'svg';
public const TAR = 'tar';
+ public const TGA = 'tga';
public const TEXT = 'txt';
public const TIFF = 'tiff';
public const TIF = 'tif';
diff --git a/ext/mime/mime_map.php b/ext/mime/mime_map.php
index 23245ae4..9f2bf8cd 100644
--- a/ext/mime/mime_map.php
+++ b/ext/mime/mime_map.php
@@ -184,6 +184,11 @@ class MimeMap
self::MAP_EXT => [FileExtension::TAR],
self::MAP_MIME => [MimeType::TAR],
],
+ MimeType::TGA => [
+ self::MAP_NAME => "TGA",
+ self::MAP_EXT => [FileExtension::TGA],
+ self::MAP_MIME => [MimeType::TGA, 'image/x-targa'],
+ ],
MimeType::TEXT => [
self::MAP_NAME => "Text",
self::MAP_EXT => [FileExtension::TEXT, FileExtension::ASC],
diff --git a/ext/mime/mime_type.php b/ext/mime/mime_type.php
index 418f427a..a879dfc1 100644
--- a/ext/mime/mime_type.php
+++ b/ext/mime/mime_type.php
@@ -44,6 +44,7 @@ class MimeType
public const RSS = 'application/rss+xml';
public const SVG = 'image/svg+xml';
public const TAR = 'application/x-tar';
+ public const TGA = 'image/x-tga';
public const TEXT = 'text/plain';
public const TIFF = 'image/tiff';
public const WAV = 'audio/x-wav';
diff --git a/ext/pools/main.php b/ext/pools/main.php
index 86ec0484..c4d4366e 100644
--- a/ext/pools/main.php
+++ b/ext/pools/main.php
@@ -177,7 +177,7 @@ class Pools extends Extension
// Add a block to the Board Config / Setup
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Pools");
+ $sb = $event->panel->create_new_block("Pools");
$sb->add_int_option(PoolsConfig::MAX_IMPORT_RESULTS, "Max results on import: ");
$sb->add_int_option(PoolsConfig::IMAGES_PER_PAGE, " Posts per page: ");
$sb->add_int_option(PoolsConfig::LISTS_PER_PAGE, " Index list items per page: ");
@@ -186,8 +186,6 @@ class Pools extends Extension
$sb->add_bool_option(PoolsConfig::SHOW_NAV_LINKS, " Show 'Prev' & 'Next' links when viewing pool images: ");
$sb->add_bool_option(PoolsConfig::AUTO_INCREMENT_ORDER, " Autoincrement order when post is added to pool:");
//$sb->add_bool_option(PoolsConfig::ADDER_ON_VIEW_IMAGE, " Show pool adder on image: ");
-
- $event->panel->add_block($sb);
}
public function onPageNavBuilding(PageNavBuildingEvent $event)
diff --git a/ext/post_peek/info.php b/ext/post_peek/info.php
new file mode 100644
index 00000000..a6072544
--- /dev/null
+++ b/ext/post_peek/info.php
@@ -0,0 +1,12 @@
+candidateSize) {
+ candidateSize = newCandidateSize;
+ candidate = newCandidate;
+ }
+ }
+
+ peekerElement.style.left = candidate[0];
+ peekerElement.style.right = candidate[1];
+ peekerElement.style.top =candidate[2];
+ peekerElement.style.bottom = candidate[3];
+
+ peekerElement.style.width = candidate[4][0] + "px";
+ peekerElement.style.height = candidate[4][1] + "px";
+
+
+ peekerElement.appendChild(imgElement);
+
+ if(!peekerOpen) {
+ document.body.appendChild(peekerElement);
+ }
+
+ peekerOpen = true;
+ }
+ linkElement.onmouseleave = function (e) {
+ if(peekerOpen) {
+ document.body.removeChild(peekerElement);
+ peekerOpen = false;
+ }
+ }
+
+ parent.appendChild(linkElement);
+
+
+ //
+ // var offsetX = (item.offsetWidth - newWidth)/2;
+ // var offsetY = (item.offsetHeight - newHeight)/2;
+ //
+ // var scaleX = newWidth / frameWidth;
+ // var scaleY = newHeight / frameHeight;
+ // var scale = scaleX;
+ // if(scaleY" + inWidth + ":" + inHeight + "
");
+ // $(parent).append(frame);
+ }
+ });
+}
+
+
+document.addEventListener('DOMContentLoaded', () => {
+ postPeekAddPeeker();
+});
diff --git a/ext/post_peek/theme.php b/ext/post_peek/theme.php
new file mode 100644
index 00000000..79efa1af
--- /dev/null
+++ b/ext/post_peek/theme.php
@@ -0,0 +1,5 @@
+panel->create_new_block("Post Titles");
$sb->start_table();
$sb->add_bool_option(PostTitlesConfig::DEFAULT_TO_FILENAME, "Default to filename", true);
$sb->add_bool_option(PostTitlesConfig::SHOW_IN_WINDOW_TITLE, "Show in window title", true);
$sb->end_table();
-
- $event->panel->add_block($sb);
}
public function onBulkExport(BulkExportEvent $event)
diff --git a/ext/private_image/main.php b/ext/private_image/main.php
index fcb17dd8..08786317 100644
--- a/ext/private_image/main.php
+++ b/ext/private_image/main.php
@@ -25,15 +25,11 @@ class PrivateImage extends Extension
public function onUserOptionsBuilding(UserOptionsBuildingEvent $event)
{
- global $user, $user_config;
-
- $event->add_html(
- $this->theme->get_user_options(
- $user,
- $user_config->get_bool(PrivateImageConfig::USER_SET_DEFAULT),
- $user_config->get_bool(PrivateImageConfig::USER_VIEW_DEFAULT),
- )
- );
+ $sb = $event->panel->create_new_block("Private Posts");
+ $sb->start_table();
+ $sb->add_bool_option(PrivateImageConfig::USER_SET_DEFAULT, "Mark posts private by default", true);
+ $sb->add_bool_option(PrivateImageConfig::USER_VIEW_DEFAULT, "View private posts by default", true);
+ $sb->end_table();
}
public function onPageRequest(PageRequestEvent $event)
diff --git a/ext/private_image/theme.php b/ext/private_image/theme.php
index b937c924..dac0d9dd 100644
--- a/ext/private_image/theme.php
+++ b/ext/private_image/theme.php
@@ -36,31 +36,4 @@ class PrivateImageTheme extends Themelet
';
}
-
- public function get_user_options(User $user, bool $set_by_default, bool $view_by_default): string
- {
- $html = "
- ".make_form(make_link("user_admin/private_image"))."
-
-
-
- ";
- return $html;
- }
}
diff --git a/ext/random_image/main.php b/ext/random_image/main.php
index e0e59355..b9092f49 100644
--- a/ext/random_image/main.php
+++ b/ext/random_image/main.php
@@ -43,9 +43,8 @@ class RandomImage extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Random Post");
+ $sb = $event->panel->create_new_block("Random Post");
$sb->add_bool_option("show_random_block", "Show Random Block: ");
- $event->panel->add_block($sb);
}
public function onPostListBuilding(PostListBuildingEvent $event)
diff --git a/ext/random_list/main.php b/ext/random_list/main.php
index 95a43ee0..17d47267 100644
--- a/ext/random_list/main.php
+++ b/ext/random_list/main.php
@@ -57,15 +57,13 @@ class RandomList extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Random Posts List");
+ $sb = $event->panel->create_new_block("Random Posts List");
// custom headers
$sb->add_int_option(
"random_images_list_count",
"Amount of Random posts to display "
);
-
- $event->panel->add_block($sb);
}
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
diff --git a/ext/rating/main.php b/ext/rating/main.php
index 661831e2..42ed72d6 100644
--- a/ext/rating/main.php
+++ b/ext/rating/main.php
@@ -143,15 +143,19 @@ class Ratings extends Extension
public function onUserOptionsBuilding(UserOptionsBuildingEvent $event)
{
- global $user;
+ global $user, $_shm_ratings;
- $event->add_html(
- $this->theme->get_user_options(
- $user,
- self::get_user_default_ratings($user),
- self::get_user_class_privs($user)
- )
- );
+ $levels = self::get_user_class_privs($user);
+ $options = [];
+ foreach ($levels as $level) {
+ $options[$_shm_ratings[$level]->name] = $level;
+ }
+
+ $sb = $event->panel->create_new_block("Default Rating Filter");
+ $sb->start_table();
+ $sb->add_multichoice_option(RatingsConfig::USER_DEFAULTS, $options, "Output Log Level: ", true);
+ $sb->end_table();
+ $sb->add_label("This controls the default rating search results will be filtered by, and nothing else. To override in your search results, add rating:* to your search.");
}
public function onSetupBuilding(SetupBuildingEvent $event)
@@ -165,7 +169,7 @@ class Ratings extends Extension
$options[$rating->name] = $rating->code;
}
- $sb = new SetupBlock("Post Ratings");
+ $sb = $event->panel->create_new_block("Post Ratings");
$sb->start_table();
foreach (array_keys($_shm_user_classes) as $key) {
if ($key == "base" || $key == "hellbanned") {
@@ -174,8 +178,6 @@ class Ratings extends Extension
$sb->add_multichoice_option("ext_rating_" . $key . "_privs", $options, $key, true);
}
$sb->end_table();
-
- $event->panel->add_block($sb);
}
public function onDisplayingImage(DisplayingImageEvent $event)
@@ -417,33 +419,6 @@ class Ratings extends Extension
$page->set_redirect(make_link("post/list"));
}
}
-
- if ($event->page_matches("user_admin")) {
- if (!$user->check_auth_token()) {
- return;
- }
- switch ($event->get_arg(0)) {
- case "default_ratings":
- if (!array_key_exists("id", $_POST) || empty($_POST["id"])) {
- return;
- }
- if (!array_key_exists("rating", $_POST) || empty($_POST["rating"])) {
- return;
- }
- $id = intval($_POST["id"]);
- if ($id != $user->id) {
- throw new SCoreException("Cannot change another user's settings");
- }
- $ratings = $_POST["rating"];
-
- $user_config->set_array(RatingsConfig::USER_DEFAULTS, $ratings);
-
- $page->set_mode(PageMode::REDIRECT);
- $page->set_redirect(make_link("user"));
-
- break;
- }
- }
}
public static function get_sorted_ratings(): array
@@ -464,9 +439,9 @@ class Ratings extends Extension
return $config->get_array("ext_rating_".$user->class->name."_privs");
}
- public static function get_user_default_ratings(User $user): array
+ public static function get_user_default_ratings(): array
{
- global $user_config;
+ global $user_config, $user;
$available = self::get_user_class_privs($user);
$selected = $user_config->get_array(RatingsConfig::USER_DEFAULTS);
diff --git a/ext/rating/theme.php b/ext/rating/theme.php
index 52317ea1..7ff8393e 100644
--- a/ext/rating/theme.php
+++ b/ext/rating/theme.php
@@ -96,7 +96,7 @@ class RatingsTheme extends Themelet
- Default Rating Filter
+
This controls the default rating search results will be filtered by, and nothing else. To override in your search results, add rating:* to your search.
diff --git a/ext/report_image/main.php b/ext/report_image/main.php
index 65580cbf..e1547706 100644
--- a/ext/report_image/main.php
+++ b/ext/report_image/main.php
@@ -157,7 +157,7 @@ class ReportImage extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Post Reports");
+ $sb = $event->panel->create_new_block("Post Reports");
$opts = [
"Reporter Only" => "user",
@@ -166,8 +166,6 @@ class ReportImage extends Extension
"None" => "none",
];
$sb->add_choice_option("report_image_publicity", $opts, "Show publicly: ");
-
- $event->panel->add_block($sb);
}
public function delete_reports_by(int $user_id)
diff --git a/ext/res_limit/main.php b/ext/res_limit/main.php
index e5df6be9..700e7f1e 100644
--- a/ext/res_limit/main.php
+++ b/ext/res_limit/main.php
@@ -58,7 +58,7 @@ class ResolutionLimit extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Resolution Limits");
+ $sb = $event->panel->create_new_block("Resolution Limits");
$sb->add_label("Min ");
$sb->add_int_option("upload_min_width");
@@ -77,7 +77,5 @@ class ResolutionLimit extends Extension
$sb->add_label(" Ratios ");
$sb->add_text_option("upload_ratios");
$sb->add_label(" (eg. '4:3 16:9', blank for no limit)");
-
- $event->panel->add_block($sb);
}
}
diff --git a/ext/resize/main.php b/ext/resize/main.php
index 234fb232..f3a7af4c 100644
--- a/ext/resize/main.php
+++ b/ext/resize/main.php
@@ -50,7 +50,7 @@ class ResizeImage extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Image Resize");
+ $sb = $event->panel->create_new_block("Image Resize");
$sb->start_table();
$sb->add_choice_option(ResizeConfig::ENGINE, MediaEngine::IMAGE_ENGINES, "Engine", true);
$sb->add_bool_option(ResizeConfig::ENABLED, "Allow resizing images", true);
@@ -67,7 +67,6 @@ class ResizeImage extends Extension
$sb->add_label("px ");
$sb->add_label("(enter 0 for no default) ");
$sb->end_table();
- $event->panel->add_block($sb);
}
public function onDataUpload(DataUploadEvent $event)
diff --git a/ext/rotate/main.php b/ext/rotate/main.php
index b947ce0d..c0b3d8a6 100644
--- a/ext/rotate/main.php
+++ b/ext/rotate/main.php
@@ -38,12 +38,11 @@ class RotateImage extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Image Rotate");
+ $sb = $event->panel->create_new_block("Image Rotate");
$sb->add_bool_option("rotate_enabled", "Allow rotating images: ");
$sb->add_label(" Default Orientation: ");
$sb->add_int_option("rotate_default_deg");
$sb->add_label(" deg");
- $event->panel->add_block($sb);
}
public function onPageRequest(PageRequestEvent $event)
diff --git a/ext/setup/main.php b/ext/setup/main.php
index 430b3695..305d71fd 100644
--- a/ext/setup/main.php
+++ b/ext/setup/main.php
@@ -40,10 +40,19 @@ class SetupPanel
{
/** @var SetupBlock[] */
public $blocks = [];
+ /** @var BaseConfig */
+ public $config;
- public function add_block(SetupBlock $block)
+ public function __construct(BaseConfig $config)
{
+ $this->config = $config;
+ }
+
+ public function create_new_block(string $title): SetupBlock
+ {
+ $block = new SetupBlock($title, $this->config);
$this->blocks[] = $block;
+ return $block;
}
}
@@ -53,10 +62,13 @@ class SetupBlock extends Block
public $header;
/** @var string */
public $body;
+ /** @var BaseConfig */
+ public $config;
- public function __construct(string $title)
+ public function __construct(string $title, BaseConfig $config)
{
parent::__construct($title, "", "main", 50);
+ $this->config = $config;
}
public function add_label(string $text)
@@ -166,8 +178,7 @@ class SetupBlock extends Block
public function add_text_option(string $name, string $label=null, bool $table_row = false)
{
- global $config;
- $val = html_escape($config->get_string($name));
+ $val = html_escape($this->config->get_string($name));
$html = " \n";
$html .= " \n";
@@ -177,8 +188,7 @@ class SetupBlock extends Block
public function add_longtext_option(string $name, string $label=null, bool $table_row = false)
{
- global $config;
- $val = html_escape($config->get_string($name));
+ $val = html_escape($this->config->get_string($name));
$rows = max(3, min(10, count(explode("\n", $val))));
$html = "\n";
@@ -189,8 +199,7 @@ class SetupBlock extends Block
public function add_bool_option(string $name, string $label=null, bool $table_row = false)
{
- global $config;
- $checked = $config->get_bool($name) ? " checked" : "";
+ $checked = $this->config->get_bool($name) ? " checked" : "";
$html = "";
if (!$table_row&&!is_null($label)) {
@@ -215,8 +224,7 @@ class SetupBlock extends Block
public function add_int_option(string $name, string $label=null, bool $table_row = false)
{
- global $config;
- $val = $config->get_int($name);
+ $val = $this->config->get_int($name);
$html = " \n";
$html .= " \n";
@@ -226,8 +234,7 @@ class SetupBlock extends Block
public function add_shorthand_int_option(string $name, string $label=null, bool $table_row = false)
{
- global $config;
- $val = to_shorthand_int($config->get_int($name));
+ $val = to_shorthand_int($this->config->get_int($name));
$html = " \n";
$html .= " \n";
@@ -236,11 +243,10 @@ class SetupBlock extends Block
public function add_choice_option(string $name, array $options, string $label=null, bool $table_row = false)
{
- global $config;
if (is_int(array_values($options)[0])) {
- $current = $config->get_int($name);
+ $current = $this->config->get_int($name);
} else {
- $current = $config->get_string($name);
+ $current = $this->config->get_string($name);
}
$html = "";
@@ -260,8 +266,7 @@ class SetupBlock extends Block
public function add_multichoice_option(string $name, array $options, string $label=null, bool $table_row = false)
{
- global $config;
- $current = $config->get_array($name);
+ $current = $this->config->get_array($name);
$html = "";
foreach ($options as $optname => $optval) {
@@ -281,8 +286,7 @@ class SetupBlock extends Block
public function add_color_option(string $name, string $label=null, bool $table_row = false)
{
- global $config;
- $val = html_escape($config->get_string($name));
+ $val = html_escape($this->config->get_string($name));
$html = " \n";
$html .= " \n";
@@ -320,7 +324,7 @@ class Setup extends Extension
$this->theme->display_permission_denied();
} else {
if ($event->count_args() == 0) {
- $panel = new SetupPanel();
+ $panel = new SetupPanel($config);
send_event(new SetupBuildingEvent($panel));
$this->theme->display_page($page, $panel);
} elseif ($event->get_arg(0) == "save" && $user->check_auth_token()) {
@@ -370,7 +374,7 @@ class Setup extends Extension
}
});
";
- $sb = new SetupBlock("General");
+ $sb = $event->panel->create_new_block("General");
$sb->position = 0;
$sb->add_text_option(SetupConfig::TITLE, "Site title: ");
$sb->add_text_option(SetupConfig::FRONT_PAGE, " Front page: ");
@@ -380,20 +384,18 @@ class Setup extends Extension
//$sb->add_multichoice_option("testarray", array("a" => "b", "c" => "d"), " Test Array: ");
$sb->add_bool_option("nice_urls", " Nice URLs: ");
$sb->add_label("(Javascript inactive, can't test!) $nicescript");
- $event->panel->add_block($sb);
- $sb = new SetupBlock("Remote API Integration");
+ $sb = $event->panel->create_new_block("Remote API Integration");
$sb->add_label("Akismet ");
$sb->add_text_option("comment_wordpress_key", " API key: ");
$sb->add_label(" ReCAPTCHA ");
$sb->add_text_option("api_recaptcha_privkey", " Secret key: ");
$sb->add_text_option("api_recaptcha_pubkey", " Site key: ");
- $event->panel->add_block($sb);
}
public function onConfigSave(ConfigSaveEvent $event)
{
- global $config;
+ $config = $event->config;
foreach ($_POST as $_name => $junk) {
if (substr($_name, 0, 6) == "_type_") {
$name = substr($_name, 6);
diff --git a/ext/setup/theme.php b/ext/setup/theme.php
index 71aa0d9f..1c039c1a 100644
--- a/ext/setup/theme.php
+++ b/ext/setup/theme.php
@@ -8,7 +8,7 @@ class SetupTheme extends Themelet
* $panel = the container of the blocks
* $panel->blocks the blocks to be displayed, unsorted
*
- * It's recommented that the theme sort the blocks before doing anything
+ * It's recommended that the theme sort the blocks before doing anything
* else, using: usort($panel->blocks, "blockcmp");
*
* The page should wrap all the options in a form which links to setup_save
diff --git a/ext/site_description/main.php b/ext/site_description/main.php
index c6b73902..38b19fb2 100644
--- a/ext/site_description/main.php
+++ b/ext/site_description/main.php
@@ -17,9 +17,8 @@ class SiteDescription extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Site Description");
+ $sb = $event->panel->create_new_block("Site Description");
$sb->add_text_option("site_description", "Description: ");
$sb->add_text_option("site_keywords", " Keywords: ");
- $event->panel->add_block($sb);
}
}
diff --git a/ext/sitemap/main.php b/ext/sitemap/main.php
index 5c940d4e..3983ce82 100644
--- a/ext/sitemap/main.php
+++ b/ext/sitemap/main.php
@@ -28,13 +28,11 @@ class XMLSitemap extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Sitemap");
+ $sb = $event->panel->create_new_block("Sitemap");
$sb->add_bool_option("sitemap_generatefull", "Generate full sitemap");
$sb->add_label(" (Enabled: every image and tag in sitemap, generation takes longer)");
$sb->add_label(" (Disabled: only display the last 50 uploads in the sitemap)");
-
- $event->panel->add_block($sb);
}
// sitemap with only the latest 50 images
diff --git a/ext/source_history/main.php b/ext/source_history/main.php
index 788dcc6b..5bf2fac3 100644
--- a/ext/source_history/main.php
+++ b/ext/source_history/main.php
@@ -61,12 +61,11 @@ class SourceHistory extends Extension
// so let's default to -1 and the user can go advanced if
// they /really/ want to
public function onSetupBuilding(SetupBuildingEvent $event) {
- $sb = new SetupBlock("Source History");
+ $sb = $event->panel->create_new_block("Source History");
$sb->add_label("Limit to ");
$sb->add_int_option("history_limit");
$sb->add_label(" entires per image");
$sb->add_label(" (-1 for unlimited)");
- $event->panel->add_block($sb);
}
*/
diff --git a/ext/tag_editcloud/main.php b/ext/tag_editcloud/main.php
index d8c69755..27e2f89c 100644
--- a/ext/tag_editcloud/main.php
+++ b/ext/tag_editcloud/main.php
@@ -34,7 +34,7 @@ class TagEditCloud extends Extension
{
$sort_by = ['Alphabetical'=>'a','Popularity'=>'p','Relevance'=>'r','Categories'=>'c'];
- $sb = new SetupBlock("Tag Edit Cloud");
+ $sb = $event->panel->create_new_block("Tag Edit Cloud");
$sb->add_bool_option("tageditcloud_disable", "Disable Tag Selection Cloud: ");
$sb->add_choice_option("tageditcloud_sort", $sort_by, " Sort the tags by:");
$sb->add_bool_option("tageditcloud_usedfirst", " Always show used tags first: ");
@@ -47,8 +47,6 @@ class TagEditCloud extends Extension
$sb->add_label(" tags.");
$sb->add_label("Relevance sort : Ignore tags (space separated): ");
$sb->add_text_option("tageditcloud_ignoretags");
-
- $event->panel->add_block($sb);
}
private function build_tag_map(Image $image): ?string
diff --git a/ext/tag_history/main.php b/ext/tag_history/main.php
index ae898f07..f99a7df9 100644
--- a/ext/tag_history/main.php
+++ b/ext/tag_history/main.php
@@ -61,12 +61,11 @@ class TagHistory extends Extension
// so let's default to -1 and the user can go advanced if
// they /really/ want to
public function onSetupBuilding(SetupBuildingEvent $event) {
- $sb = new SetupBlock("Tag History");
+ $sb = $event->panel->create_new_block("Tag History");
$sb->add_label("Limit to ");
$sb->add_int_option("history_limit");
$sb->add_label(" entires per image");
$sb->add_label(" (-1 for unlimited)");
- $event->panel->add_block($sb);
}
*/
diff --git a/ext/tag_list/main.php b/ext/tag_list/main.php
index 610c3aa5..2b8a38bb 100644
--- a/ext/tag_list/main.php
+++ b/ext/tag_list/main.php
@@ -97,13 +97,12 @@ class TagList extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Tag Map Options");
+ $sb = $event->panel->create_new_block("Tag Map Options");
$sb->add_int_option(TagListConfig::TAGS_MIN, "Only show tags used at least ");
$sb->add_label(" times");
$sb->add_bool_option(TagListConfig::PAGES, " Paged tag lists: ");
- $event->panel->add_block($sb);
- $sb = new SetupBlock("Popular / Related Tag List");
+ $sb = $event->panel->create_new_block("Popular / Related Tag List");
$sb->add_int_option(TagListConfig::LENGTH, "Show top ");
$sb->add_label(" related tags");
$sb->add_int_option(TagListConfig::POPULAR_TAG_LIST_LENGTH, " Show top ");
@@ -131,7 +130,6 @@ class TagList extends Extension
);
$sb->add_bool_option("tag_list_numbers", "Show tag counts", true);
$sb->end_table();
- $event->panel->add_block($sb);
}
/**
diff --git a/ext/tag_tools/main.php b/ext/tag_tools/main.php
index b6a61686..42d2d381 100644
--- a/ext/tag_tools/main.php
+++ b/ext/tag_tools/main.php
@@ -6,36 +6,6 @@ class TagTools extends Extension
/** @var TagToolsTheme */
protected $theme;
- public function onPageRequest(PageRequestEvent $event)
- {
- global $database, $page, $user;
-
- if ($event->page_matches("admin")) {
- if (!$user->can(Permissions::MANAGE_ADMINTOOLS)) {
- $this->theme->display_permission_denied();
- } else {
- if ($event->count_args() == 0) {
- send_event(new AdminBuildingEvent($page));
- } else {
- $action = $event->get_arg(0);
- $aae = new AdminActionEvent($action);
-
- if ($user->check_auth_token()) {
- log_info("admin", "Util: $action");
- set_time_limit(0);
- $database->set_timeout(300000);
- send_event($aae);
- }
-
- if ($aae->redirect) {
- $page->set_mode(PageMode::REDIRECT);
- $page->set_redirect(make_link("admin"));
- }
- }
- }
- }
- }
-
public function onAdminBuilding(AdminBuildingEvent $event)
{
$this->theme->display_form();
diff --git a/ext/transcode/main.php b/ext/transcode/main.php
index 04fc468f..130f4d91 100644
--- a/ext/transcode/main.php
+++ b/ext/transcode/main.php
@@ -25,7 +25,8 @@ class TranscodeImage extends Extension
"PPM" => MimeType::PPM,
"PSD" => MimeType::PSD,
"TIFF" => MimeType::TIFF,
- "WEBP" => MimeType::WEBP
+ "WEBP" => MimeType::WEBP,
+ "TGA" => MimeType::TGA
];
const OUTPUT_MIMES = [
@@ -141,7 +142,7 @@ class TranscodeImage extends Extension
$engine = $config->get_string(TranscodeConfig::ENGINE);
- $sb = new SetupBlock("Image Transcode");
+ $sb = $event->panel->create_new_block("Image Transcode");
$sb->start_table();
$sb->add_bool_option(TranscodeConfig::ENABLED, "Allow transcoding images", true);
$sb->add_bool_option(TranscodeConfig::GET_ENABLED, "Enable GET args", true);
@@ -156,7 +157,6 @@ class TranscodeImage extends Extension
$sb->add_int_option(TranscodeConfig::QUALITY, "Lossy Format Quality", true);
$sb->add_color_option(TranscodeConfig::ALPHA_COLOR, "Alpha Conversion Color", true);
$sb->end_table();
- $event->panel->add_block($sb);
}
public function onDataUpload(DataUploadEvent $event)
diff --git a/ext/transcode_video/main.php b/ext/transcode_video/main.php
index 8ca820de..ce7a4613 100644
--- a/ext/transcode_video/main.php
+++ b/ext/transcode_video/main.php
@@ -54,12 +54,13 @@ class TranscodeVideo extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Video Transcode");
+ global $config;
+
+ $sb = $event->panel->create_new_block("Video Transcode");
$sb->start_table();
$sb->add_bool_option(TranscodeVideoConfig::ENABLED, "Allow transcoding images: ", true);
$sb->add_bool_option(TranscodeVideoConfig::UPLOAD_TO_NATIVE_CONTAINER, "Convert videos using MPEG-4 or WEBM to their native containers:", true);
$sb->end_table();
- $event->panel->add_block($sb);
}
public function onDataUpload(DataUploadEvent $event)
diff --git a/ext/update/main.php b/ext/update/main.php
index d6d5c36f..94c24492 100644
--- a/ext/update/main.php
+++ b/ext/update/main.php
@@ -15,9 +15,8 @@ class Update extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Update");
+ $sb = $event->panel->create_new_block("Update");
$sb->add_text_option("update_guserrepo", "User/Repo: ");
- $event->panel->add_block($sb);
}
public function onAdminBuilding(AdminBuildingEvent $event)
diff --git a/ext/upload/main.php b/ext/upload/main.php
index 6ffb4cc8..f30b2a88 100644
--- a/ext/upload/main.php
+++ b/ext/upload/main.php
@@ -132,7 +132,7 @@ class Upload extends Extension
$tes["fopen"] = "fopen";
$tes["WGet"] = "wget";
- $sb = new SetupBlock("Upload");
+ $sb = $event->panel->create_new_block("Upload");
$sb->position = 10;
// Output the limits from PHP so the user has an idea of what they can set.
$sb->add_int_option(UploadConfig::COUNT, "Max uploads: ");
@@ -141,7 +141,6 @@ class Upload extends Extension
$sb->add_label("PHP Limit = " . ini_get('upload_max_filesize') . " ");
$sb->add_choice_option(UploadConfig::TRANSLOAD_ENGINE, $tes, " Transload: ");
$sb->add_bool_option(UploadConfig::TLSOURCE, " Use transloaded URL as source if none is provided: ");
- $event->panel->add_block($sb);
}
diff --git a/ext/user/events.php b/ext/user/events.php
index ad012a63..0fd73f1e 100644
--- a/ext/user/events.php
+++ b/ext/user/events.php
@@ -14,10 +14,21 @@ class UserBlockBuildingEvent extends Event
}
}
-class UserOptionsBuildingEvent extends Event
+class UserOperationsBuildingEvent extends Event
{
/** @var array */
public $parts = [];
+ /** @var User */
+ public $user = [];
+ /** @var BaseConfig */
+ public $user_config = [];
+
+ public function __construct(User $user, BaseConfig $user_config)
+ {
+ parent::__construct();
+ $this->user = $user;
+ $this->user_config = $user_config;
+ }
public function add_html(string $html)
{
diff --git a/ext/user/main.php b/ext/user/main.php
index b3d54433..e80ff95c 100644
--- a/ext/user/main.php
+++ b/ext/user/main.php
@@ -240,10 +240,11 @@ class UserPage extends Extension
if (!$user->is_anonymous()) {
if ($user->id == $event->display_user->id || $user->can("edit_user_info")) {
- $uobe = new UserOptionsBuildingEvent();
- send_event($uobe);
+ $user_config = UserConfig::get_for_user($event->display_user->id);
- $page->add_block(new Block("Options", $this->theme->build_options($event->display_user, $uobe), "main", 60));
+ $uobe = new UserOperationsBuildingEvent($event->display_user, $user_config);
+ send_event($uobe);
+ $page->add_block(new Block("Operations", $this->theme->build_operations($event->display_user, $uobe), "main", 60));
}
}
@@ -275,7 +276,7 @@ class UserPage extends Extension
"Gravatar" => "gravatar"
];
- $sb = new SetupBlock("User Options");
+ $sb = $event->panel->create_new_block("User Options");
$sb->start_table();
$sb->add_bool_option(UserConfig::ENABLE_API_KEYS, "Enable user API keys", true);
$sb->add_bool_option("login_signup_enabled", "Allow new signups", true);
@@ -316,8 +317,6 @@ class UserPage extends Extension
);
}
$sb->end_table();
-
- $event->panel->add_block($sb);
}
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
@@ -361,8 +360,8 @@ class UserPage extends Extension
}
}
- public const USER_SEARCH_REGEX = "/^(?:poster|user)[=|:](.*)$/i";
- public const USER_ID_SEARCH_REGEX = "/^(?:poster|user)_id[=|:]([0-9]+)$/i";
+ public const USER_SEARCH_REGEX = "/^(?:poster|user)(!?)[=|:](.*)$/i";
+ public const USER_ID_SEARCH_REGEX = "/^(?:poster|user)_id(!?)[=|:]([0-9]+)$/i";
public static function has_user_query(array $context): bool
{
@@ -385,11 +384,11 @@ class UserPage extends Extension
$matches = [];
if (preg_match(self::USER_SEARCH_REGEX, $event->term, $matches)) {
- $user_id = User::name_to_id($matches[1]);
- $event->add_querylet(new Querylet("images.owner_id = $user_id"));
+ $user_id = User::name_to_id($matches[2]);
+ $event->add_querylet(new Querylet("images.owner_id ${matches[1]}= $user_id"));
} elseif (preg_match(self::USER_ID_SEARCH_REGEX, $event->term, $matches)) {
- $user_id = int_escape($matches[1]);
- $event->add_querylet(new Querylet("images.owner_id = $user_id"));
+ $user_id = int_escape($matches[2]);
+ $event->add_querylet(new Querylet("images.owner_id ${matches[1]}= $user_id"));
} elseif ($user->can(Permissions::VIEW_IP) && preg_match("/^(?:poster|user)_ip[=|:]([0-9\.]+)$/i", $event->term, $matches)) {
$user_ip = $matches[1]; // FIXME: ip_escape?
$event->add_querylet(new Querylet("images.owner_ip = '$user_ip'"));
diff --git a/ext/user/test.php b/ext/user/test.php
index d548c0fe..947cf6a8 100644
--- a/ext/user/test.php
+++ b/ext/user/test.php
@@ -5,12 +5,12 @@ class UserPageTest extends ShimmiePHPUnitTestCase
{
$this->get_page('user');
$this->assert_title("Not Logged In");
- $this->assert_no_text("Options");
- $this->assert_no_text("More Options");
+ $this->assert_no_text("Stats");
$this->get_page('user/demo');
$this->assert_title("demo's Page");
$this->assert_text("Joined:");
+ $this->assert_no_text("Operations");
$this->get_page('user/MauMau');
$this->assert_title("No Such User");
@@ -19,7 +19,7 @@ class UserPageTest extends ShimmiePHPUnitTestCase
// should be on the user page
$this->get_page('user/test');
$this->assert_title("test's Page");
- $this->assert_text("Options");
+ $this->assert_text("Operations");
// FIXME: check class
//$this->assert_no_text("Admin:");
$this->log_out();
@@ -28,7 +28,7 @@ class UserPageTest extends ShimmiePHPUnitTestCase
// should be on the user page
$this->get_page('user/demo');
$this->assert_title("demo's Page");
- $this->assert_text("Options");
+ $this->assert_text("Operations");
// FIXME: check class
//$this->assert_text("Admin:");
$this->log_out();
diff --git a/ext/user/theme.php b/ext/user/theme.php
index 0add94ad..35854925 100644
--- a/ext/user/theme.php
+++ b/ext/user/theme.php
@@ -229,7 +229,8 @@ class UserPageTheme extends Themelet
$page->add_block(new Block("Stats", join(" ", $stats), "main", 10));
}
- public function build_options(User $duser, UserOptionsBuildingEvent $event): string
+
+ public function build_operations(User $duser, UserOperationsBuildingEvent $event): string
{
global $config, $user;
$html = emptyHTML();
diff --git a/ext/user_config/main.php b/ext/user_config/main.php
index 4a9510e1..7d47abb3 100644
--- a/ext/user_config/main.php
+++ b/ext/user_config/main.php
@@ -19,6 +19,27 @@ class InitUserConfigEvent extends Event
}
}
+
+class UserOptionsBuildingEvent extends Event
+{
+ /** @var SetupTheme */
+ protected $theme;
+
+ /** @var SetupPanel */
+ public $panel;
+
+ /** @var User */
+ public $user = [];
+
+
+ public function __construct(User $user, SetupPanel $panel)
+ {
+ parent::__construct();
+ $this->user = $user;
+ $this->panel = $panel;
+ }
+}
+
class UserConfig extends Extension
{
/** @var UserConfigTheme */
@@ -36,10 +57,20 @@ class UserConfig extends Extension
public function onUserLogin(UserLoginEvent $event)
{
- global $database, $user_config;
+ global $user_config;
- $user_config = new DatabaseConfig($database, "user_config", "user_id", "{$event->user->id}");
- send_event(new InitUserConfigEvent($event->user, $user_config));
+ $user_config = self::get_for_user($event->user->id);
+ }
+
+ public static function get_for_user(int $id): BaseConfig
+ {
+ global $database;
+
+ $user = User::by_id($id);
+
+ $user_config = new DatabaseConfig($database, "user_config", "user_id", "$id");
+ send_event(new InitUserConfigEvent($user, $user_config));
+ return $user_config;
}
public function onDatabaseUpgrade(DatabaseUpgradeEvent $event): void
@@ -60,9 +91,17 @@ class UserConfig extends Extension
}
}
+ public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
+ {
+ global $user;
+ if ($event->parent==="user" && !$user->is_anonymous()) {
+ $event->add_nav_link("user_config", new Link('user_config'), "User Options", false, 40);
+ }
+ }
+
public function onPageRequest(PageRequestEvent $event)
{
- global $user, $database, $config, $page;
+ global $user, $database, $config, $page, $user_config;
if ($config->get_bool(self::ENABLE_API_KEYS)) {
if (!empty($_GET["api_key"]) && $user->is_anonymous()) {
@@ -79,8 +118,6 @@ class UserConfig extends Extension
}
}
- global $user_config;
-
if ($event->page_matches("user_admin")) {
if (!$user->check_auth_token()) {
return;
@@ -96,22 +133,58 @@ class UserConfig extends Extension
}
}
}
- }
- public function onUserOptionsBuilding(UserOptionsBuildingEvent $event)
- {
- global $config, $user_config;
+ if ($event->page_matches("user_config")) {
+ if (!$user->can(Permissions::CHANGE_USER_SETTING)) {
+ $this->theme->display_permission_denied();
+ } else {
+ if ($event->count_args() == 0) {
+ $display_user = ($event->count_args() == 0) ? $user : User::by_name($event->get_arg(0));
- if ($config->get_bool(self::ENABLE_API_KEYS)) {
- $key = $user_config->get_string(self::API_KEY, "");
- if (empty($key)) {
- $key = generate_key();
- $user_config->set_string(self::API_KEY, $key);
+ if ($user->id!=$display_user->id && !$user->can(Permissions::CHANGE_OTHER_USER_SETTING)) {
+ $this->theme->display_permission_denied();
+ return;
+ }
+
+ $uobe = new UserOptionsBuildingEvent($display_user, new SetupPanel($user_config));
+ send_event($uobe);
+
+ $this->theme->display_user_config_page($page, $uobe->user, $uobe->panel);
+ } elseif ($event->get_arg(0) == "save" && $user->check_auth_token()) {
+ $input = validate_input([
+ 'id' => 'user_id,exists'
+ ]);
+ $duser = User::by_id($input['id']);
+
+ if ($user->id!=$duser->id && !$user->can(Permissions::CHANGE_OTHER_USER_SETTING)) {
+ $this->theme->display_permission_denied();
+ return;
+ }
+
+ $target_config = UserConfig::get_for_user($duser->id);
+ send_event(new ConfigSaveEvent($target_config));
+ $target_config->save();
+ $page->flash("Config saved");
+ $page->set_mode(PageMode::REDIRECT);
+ $page->set_redirect(make_link("user_config"));
+ }
}
- $event->add_html($this->theme->get_user_options($key));
}
}
+ public function onUserOperationsBuilding(UserOperationsBuildingEvent $event)
+ {
+ global $config;
+
+ if ($config->get_bool(self::ENABLE_API_KEYS)) {
+ $key = $event->user_config->get_string(self::API_KEY, "");
+ if (empty($key)) {
+ $key = generate_key();
+ $event->user_config->set_string(self::API_KEY, $key);
+ }
+ $event->add_html($this->theme->get_user_operations($key));
+ }
+ }
// This needs to happen before any other events, but after db upgrade
public function get_priority(): int
diff --git a/ext/user_config/style.css b/ext/user_config/style.css
new file mode 100644
index 00000000..bc460fa4
--- /dev/null
+++ b/ext/user_config/style.css
@@ -0,0 +1,43 @@
+.setupblocks {
+ column-width: 400px;
+ -moz-column-width: 400px;
+ -webkit-column-width: 400px;
+ max-width: 1200px;
+ margin: auto;
+}
+.setupblocks > .setupblock:first-of-type { margin-top: 0; }
+
+.setupblock {
+ break-inside: avoid;
+ -moz-break-inside: avoid;
+ -webkit-break-inside: avoid;
+ column-break-inside: avoid;
+ -moz-column-break-inside: avoid;
+ -webkit-column-break-inside: avoid;
+ text-align: center;
+ width: 90%;
+}
+.setupblock TEXTAREA {
+ width: 100%;
+ font-size: 0.75em;
+ resize: vertical;
+}
+
+.helpable {
+ border-bottom: 1px dashed gray;
+}
+
+.ok {
+ background: #AFA;
+}
+.bad {
+ background: #FAA;
+}
+
+#Setupmain .blockbody {
+ background: none;
+ border: none;
+ box-shadow: none;
+ margin: 0;
+ padding: 0;
+}
diff --git a/ext/user_config/test.php b/ext/user_config/test.php
new file mode 100644
index 00000000..bc4b0b43
--- /dev/null
+++ b/ext/user_config/test.php
@@ -0,0 +1,17 @@
+get_page('user_config');
+ $this->assert_title("Permission Denied");
+ $this->assert_no_text(self::OPTIONS_BLOCK_TITLE);
+
+ $this->log_in_as_user();
+ $this->get_page('user_config');
+ $this->assert_title(self::OPTIONS_BLOCK_TITLE);
+ $this->log_out();
+ }
+}
diff --git a/ext/user_config/theme.php b/ext/user_config/theme.php
index ebca7c3d..144eca67 100644
--- a/ext/user_config/theme.php
+++ b/ext/user_config/theme.php
@@ -2,7 +2,7 @@
class UserConfigTheme extends Themelet
{
- public function get_user_options(string $key): string
+ public function get_user_operations(string $key): string
{
$html = "
".make_form(make_link("user_admin/reset_api_key"))."
@@ -22,4 +22,57 @@ class UserConfigTheme extends Themelet
";
return $html;
}
+
+
+ /*
+ * Display a set of setup option blocks
+ *
+ * $panel = the container of the blocks
+ * $panel->blocks the blocks to be displayed, unsorted
+ *
+ * It's recommended that the theme sort the blocks before doing anything
+ * else, using: usort($panel->blocks, "blockcmp");
+ *
+ * The page should wrap all the options in a form which links to setup_save
+ */
+ public function display_user_config_page(Page $page, User $user, SetupPanel $panel)
+ {
+ usort($panel->blocks, "blockcmp");
+
+ /*
+ * Try and keep the two columns even; count the line breaks in
+ * each an calculate where a block would work best
+ */
+ $setupblock_html = "";
+ foreach ($panel->blocks as $block) {
+ $setupblock_html .= $this->sb_to_html($block);
+ }
+
+ $table = "
+ ".make_form(make_link("user_config/save"))."
+
+
$setupblock_html
+
+
+ ";
+
+ $page->set_title("User Options");
+ $page->set_heading("User Options");
+ $page->add_block(new Block("User Options", $table));
+ $page->set_mode(PageMode::PAGE);
+ }
+
+ protected function sb_to_html(SetupBlock $block)
+ {
+ $h = $block->header;
+ $b = $block->body;
+ $i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup";
+ $html = "
+
+ ";
+ return $html;
+ }
}
diff --git a/ext/view/main.php b/ext/view/main.php
index e6a4f79a..552088fb 100644
--- a/ext/view/main.php
+++ b/ext/view/main.php
@@ -77,7 +77,13 @@ class ViewImage extends Extension
if (!$image->is_locked() || $user->can(Permissions::EDIT_IMAGE_LOCK)) {
send_event(new ImageInfoSetEvent($image));
$page->set_mode(PageMode::REDIRECT);
- $page->set_redirect(make_link("post/view/$image_id", url_escape(@$_POST['query'])));
+
+ if (isset($_GET['search'])) {
+ $query = "search=" . url_escape($_GET['search']);
+ } else {
+ $query = null;
+ }
+ $page->set_redirect(make_link("post/view/$image_id", null, $query));
} else {
$this->theme->display_error(403, "Post Locked", "An admin has locked this post");
}
diff --git a/ext/view/script.js b/ext/view/script.js
index 3c966a11..3c8799f3 100644
--- a/ext/view/script.js
+++ b/ext/view/script.js
@@ -1,18 +1,29 @@
+function joinUrlSegments(base, query) {
+ let separatorChar = "?";
+ if(base.includes("?")) {
+ separatorChar = "&";
+ }
+ return base + separatorChar + query;
+}
+
document.addEventListener('DOMContentLoaded', () => {
if(document.location.hash.length > 3) {
var query = document.location.hash.substring(1);
$('LINK#prevlink').attr('href', function(i, attr) {
- return attr + '?' + query;
+ return joinUrlSegments(attr,query);
});
$('LINK#nextlink').attr('href', function(i, attr) {
- return attr + '?' + query;
+ return joinUrlSegments(attr,query);
});
$('A#prevlink').attr('href', function(i, attr) {
- return attr + '?' + query;
+ return joinUrlSegments(attr,query);
});
$('A#nextlink').attr('href', function(i, attr) {
- return attr + '?' + query;
+ return joinUrlSegments(attr,query);
});
+ $('span#image_delete_form form').attr('action', function(i, attr) {
+ return joinUrlSegments(attr,query);
+ });
}
});
diff --git a/ext/wiki/main.php b/ext/wiki/main.php
index a0bc8d81..c7e5f4b9 100644
--- a/ext/wiki/main.php
+++ b/ext/wiki/main.php
@@ -117,11 +117,9 @@ class Wiki extends Extension
// Add a block to the Board Config / Setup
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Wiki");
+ $sb = $event->panel->create_new_block("Wiki");
$sb->add_bool_option(WikiConfig::ENABLE_REVISIONS, "Enable wiki revisions: ");
$sb->add_bool_option(WikiConfig::TAG_SHORTWIKIS, "Show shortwiki entry when searching for a single tag: ");
-
- $event->panel->add_block($sb);
}
public function onDatabaseUpgrade(DatabaseUpgradeEvent $event)
diff --git a/ext/word_filter/main.php b/ext/word_filter/main.php
index 306cdb2a..1b3bd4e9 100644
--- a/ext/word_filter/main.php
+++ b/ext/word_filter/main.php
@@ -16,10 +16,9 @@ class WordFilter extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
- $sb = new SetupBlock("Word Filter");
+ $sb = $event->panel->create_new_block("Word Filter");
$sb->add_longtext_option("word_filter");
$sb->add_label(" (each line should be search term and replace term, separated by a comma)");
- $event->panel->add_block($sb);
}
private function filter(string $text): string
diff --git a/themes/lite/user_config.theme.php b/themes/lite/user_config.theme.php
new file mode 100644
index 00000000..c1b6f68e
--- /dev/null
+++ b/themes/lite/user_config.theme.php
@@ -0,0 +1,42 @@
+header;
+ $b = $block->body;
+ $i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup";
+ $html = "
+
+
+ ";
+
+ return $this->rr($html);
+ }
+}
diff --git a/themes/rule34v2/header.inc b/themes/rule34v2/header.inc
index 1938ed97..eb5a3bb3 100644
--- a/themes/rule34v2/header.inc
+++ b/themes/rule34v2/header.inc
@@ -1,7 +1,7 @@
-
+