diff --git a/composer.json b/composer.json index 9cc2c229..7ff75c6f 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,12 @@ "license" : "GPL-2.0-or-later", "minimum-stability" : "dev", + "config": { + "platform": { + "php": "7.3.0" + } + }, + "repositories" : [ { "type": "composer", @@ -47,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 f6b9d8ae..abdb26e6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,14 +4,14 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7bec754711e9dae28c4237a723ad824a", + "content-hash": "0f458e911a691a7695f22513afd3c612", "packages": [ { "name": "bower-asset/jquery", "version": "1.12.4", "source": { "type": "git", - "url": "git@github.com:jquery/jquery-dist.git", + "url": "https://github.com/jquery/jquery-dist.git", "reference": "5e89585e0121e72ff47de177c5ef604f3089a53d" }, "dist": { @@ -128,6 +128,10 @@ "captcha", "security" ], + "support": { + "issues": "https://github.com/dapphp/securimage/issues", + "source": "https://github.com/dapphp/securimage/tree/3.6.8" + }, "time": "2020-05-30T09:43:22+00:00" }, { @@ -169,6 +173,10 @@ } ], "description": "An SVG sanitizer for PHP", + "support": { + "issues": "https://github.com/darylldoyle/svg-sanitizer/issues", + "source": "https://github.com/darylldoyle/svg-sanitizer/tree/develop" + }, "time": "2020-01-20T01:34:17+00:00" }, { @@ -222,6 +230,10 @@ ], "description": "Flexihash is a small PHP library which implements consistent hashing", "homepage": "https://github.com/pda/flexihash", + "support": { + "issues": "https://github.com/pda/flexihash/issues", + "source": "https://github.com/pda/flexihash/tree/v2.0.2" + }, "time": "2016-04-22T21:03:23+00:00" }, { @@ -246,6 +258,7 @@ "php-coveralls/php-coveralls": "^2.1", "phpunit/phpunit": "^4.8.36|^5.7.27|^6.59|^7.5.11" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -269,6 +282,11 @@ "recaptcha", "spam" ], + "support": { + "forum": "https://groups.google.com/forum/#!forum/recaptcha", + "issues": "https://github.com/google/recaptcha/issues", + "source": "https://github.com/google/recaptcha" + }, "time": "2020-10-01T15:14:41+00:00" }, { @@ -322,6 +340,10 @@ ], "description": "An API to write JSON traces as used by the Chrome Trace Viewer", "homepage": "https://github.com/shish/eventtracer-php", + "support": { + "issues": "https://github.com/shish/eventtracer-php/issues", + "source": "https://github.com/shish/eventtracer-php/tree/v2.0.1" + }, "time": "2020-10-24T14:53:38+00:00" }, { @@ -365,6 +387,10 @@ ], "description": "A collection of workarounds for stupid PHP things", "homepage": "https://github.com/shish/ffsphp", + "support": { + "issues": "https://github.com/shish/ffsphp/issues", + "source": "https://github.com/shish/ffsphp/tree/v1.0.4" + }, "time": "2020-10-24T15:13:36+00:00" }, { @@ -414,6 +440,10 @@ "crud", "generator" ], + "support": { + "issues": "https://github.com/shish/microcrud/issues", + "source": "https://github.com/shish/microcrud/tree/v2.0.4" + }, "time": "2020-10-25T10:39:48+00:00" }, { @@ -460,42 +490,256 @@ "generator", "html" ], + "support": { + "issues": "https://github.com/shish/microhtml/issues", + "source": "https://github.com/shish/microhtml/tree/v2.0.3" + }, "time": "2020-10-24T14:48:32+00:00" } ], "packages-dev": [ { - "name": "doctrine/instantiator", - "version": "dev-master", + "name": "composer/semver", + "version": "dev-main", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "3e7a22aed197e9333cc929e7f6b4300bdae91fcc" + "url": "https://github.com/composer/semver.git", + "reference": "dd61cb4efbd0cff1700b217faf24ce596af4fc4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/3e7a22aed197e9333cc929e7f6b4300bdae91fcc", - "reference": "3e7a22aed197e9333cc929e7f6b4300bdae91fcc", + "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", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "6410c4b8352cb64218641457cef64997e6b784fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/6410c4b8352cb64218641457cef64997e6b784fb", + "reference": "6410c4b8352cb64218641457cef64997e6b784fb", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", + "doctrine/coding-standard": "^8.0", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -509,7 +753,7 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", @@ -518,6 +762,10 @@ "constructor", "instantiate" ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.x" + }, "funding": [ { "url": "https://www.doctrine-project.org/sponsorship.html", @@ -532,7 +780,191 @@ "type": "tidelift" } ], - "time": "2020-06-15T18:51:04+00:00" + "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", @@ -540,12 +972,12 @@ "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "00aba97fc36feabc8d94667eebd5d43959e60008" + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/00aba97fc36feabc8d94667eebd5d43959e60008", - "reference": "00aba97fc36feabc8d94667eebd5d43959e60008", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { @@ -559,6 +991,7 @@ "doctrine/common": "^2.6", "phpunit/phpunit": "^7.1" }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -580,26 +1013,30 @@ "object", "object graph" ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, "funding": [ { "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", "type": "tidelift" } ], - "time": "2020-10-01T09:35:15+00:00" + "time": "2020-11-13T09:40:50+00:00" }, { "name": "nikic/php-parser", - "version": "v4.10.2", + "version": "v4.10.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "658f1be311a230e0907f5dfe0213742aff0596de" + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/658f1be311a230e0907f5dfe0213742aff0596de", - "reference": "658f1be311a230e0907f5dfe0213742aff0596de", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", + "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", "shasum": "" }, "require": { @@ -638,7 +1075,11 @@ "parser", "php" ], - "time": "2020-09-26T10:30:38+00:00" + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.4" + }, + "time": "2020-12-20T10:01:03+00:00" }, { "name": "phar-io/manifest", @@ -661,6 +1102,7 @@ "phar-io/version": "^3.0.1", "php": "^7.2 || ^8.0" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -694,20 +1136,24 @@ } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.1" + }, "time": "2020-06-27T14:33:11+00:00" }, { "name": "phar-io/version", - "version": "3.0.2", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "c6bb6825def89e0a32220f88337f8ceaf1975fa0" + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/c6bb6825def89e0a32220f88337f8ceaf1975fa0", - "reference": "c6bb6825def89e0a32220f88337f8ceaf1975fa0", + "url": "https://api.github.com/repos/phar-io/version/zipball/e4782611070e50613683d2b9a57730e9a3ba5451", + "reference": "e4782611070e50613683d2b9a57730e9a3ba5451", "shasum": "" }, "require": { @@ -741,7 +1187,66 @@ } ], "description": "Library for handling version information and constraints", - "time": "2020-06-27T14:39:04+00:00" + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.0.4" + }, + "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", @@ -760,6 +1265,7 @@ "require": { "php": ">=7.1" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -790,6 +1296,10 @@ "reflection", "static analysis" ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master" + }, "time": "2020-06-19T17:42:03+00:00" }, { @@ -798,12 +1308,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "reference": "e3324ecbde7319b0bbcf0fd7ca4af19469c38da9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e3324ecbde7319b0bbcf0fd7ca4af19469c38da9", + "reference": "e3324ecbde7319b0bbcf0fd7ca4af19469c38da9", "shasum": "" }, "require": { @@ -816,6 +1326,7 @@ "require-dev": { "mockery/mockery": "~1.3.2" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -842,34 +1353,38 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-09-03T19:13:55+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-11-18T14:27:38+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "dev-master", + "version": "1.x-dev", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "94f3ddc5d77e49daadadd33b798b933e52dde82c" + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/94f3ddc5d77e49daadadd33b798b933e52dde82c", - "reference": "94f3ddc5d77e49daadadd33b798b933e52dde82c", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "shasum": "" }, "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.2", - "mockery/mockery": "~1" + "ext-tokenizer": "*" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -888,20 +1403,24 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-06-19T19:40:27+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" }, { "name": "phpspec/prophecy", - "version": "1.12.1", + "version": "1.12.2", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d" + "reference": "245710e971a030f42e08f4912863805570f23d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/8ce87516be71aae9b956f81906aaf0338e0d8a2d", - "reference": "8ce87516be71aae9b956f81906aaf0338e0d8a2d", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", + "reference": "245710e971a030f42e08f4912863805570f23d39", "shasum": "" }, "require": { @@ -913,7 +1432,7 @@ }, "require-dev": { "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0 <9.3" + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { @@ -951,34 +1470,38 @@ "spy", "stub" ], - "time": "2020-09-29T09:10:42+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.12.2" + }, + "time": "2020-12-19T10:15:11+00:00" }, { "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": "ed363c3ce393560a1c300dce0298bbf0f0528b13" + "reference": "cbe315f4d3b653ac0310862697866ffddabc502f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ed363c3ce393560a1c300dce0298bbf0f0528b13", - "reference": "ed363c3ce393560a1c300dce0298bbf0f0528b13", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cbe315f4d3b653ac0310862697866ffddabc502f", + "reference": "cbe315f4d3b653ac0310862697866ffddabc502f", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.8", + "nikic/php-parser": "^4.10.2", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", "sebastian/code-unit-reverse-lookup": "^2.0.2", "sebastian/complexity": "^2.0", "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0", + "sebastian/lines-of-code": "^1.0.3", "sebastian/version": "^3.0.1", "theseer/tokenizer": "^1.2.0" }, @@ -1018,13 +1541,17 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T15:46:21+00:00" + "time": "2021-01-02T06:24:37+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1032,12 +1559,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "86daa943fbb765aa0129d16f84c5bf7aaec44582" + "reference": "ec77a26a4afef3ab3b4d4f8f25777218f935e53d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/86daa943fbb765aa0129d16f84c5bf7aaec44582", - "reference": "86daa943fbb765aa0129d16f84c5bf7aaec44582", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/ec77a26a4afef3ab3b4d4f8f25777218f935e53d", + "reference": "ec77a26a4afef3ab3b4d4f8f25777218f935e53d", "shasum": "" }, "require": { @@ -1046,6 +1573,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1074,13 +1602,17 @@ "filesystem", "iterator" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T04:57:30+00:00" + "time": "2021-01-18T13:04:09+00:00" }, { "name": "phpunit/php-invoker", @@ -1088,12 +1620,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "dd5300fef2ede06687642585706f912c073a0cc5" + "reference": "da682a733325bf5db48ee2786bd640f8cd0f2622" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/dd5300fef2ede06687642585706f912c073a0cc5", - "reference": "dd5300fef2ede06687642585706f912c073a0cc5", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/da682a733325bf5db48ee2786bd640f8cd0f2622", + "reference": "da682a733325bf5db48ee2786bd640f8cd0f2622", "shasum": "" }, "require": { @@ -1106,6 +1638,7 @@ "suggest": { "ext-pcntl": "*" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1133,13 +1666,17 @@ "keywords": [ "process" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T04:57:38+00:00" + "time": "2021-01-18T13:04:19+00:00" }, { "name": "phpunit/php-text-template", @@ -1147,12 +1684,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "60c51e16ad53fc17844f6fd6e608e80d9743f320" + "reference": "ccece2717f047bf9b04848ea84059374b07170bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/60c51e16ad53fc17844f6fd6e608e80d9743f320", - "reference": "60c51e16ad53fc17844f6fd6e608e80d9743f320", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/ccece2717f047bf9b04848ea84059374b07170bc", + "reference": "ccece2717f047bf9b04848ea84059374b07170bc", "shasum": "" }, "require": { @@ -1161,6 +1698,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1188,13 +1726,17 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T05:38:01+00:00" + "time": "2021-01-18T13:04:58+00:00" }, { "name": "phpunit/php-timer", @@ -1202,12 +1744,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "c9b3e07891acf6f6679cf2956c99b847aa73bcff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/c9b3e07891acf6f6679cf2956c99b847aa73bcff", + "reference": "c9b3e07891acf6f6679cf2956c99b847aa73bcff", "shasum": "" }, "require": { @@ -1216,6 +1758,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1243,26 +1786,30 @@ "keywords": [ "timer" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2021-01-18T13:04:29+00:00" }, { "name": "phpunit/phpunit", - "version": "dev-master", + "version": "9.5.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d3b55c36f95329c062e69f6c10441106cf712f7f" + "reference": "7c0e74d039a6cc8f195fa4bac1fb173aca7a182f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d3b55c36f95329c062e69f6c10441106cf712f7f", - "reference": "d3b55c36f95329c062e69f6c10441106cf712f7f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7c0e74d039a6cc8f195fa4bac1fb173aca7a182f", + "reference": "7c0e74d039a6cc8f195fa4bac1fb173aca7a182f", "shasum": "" }, "require": { @@ -1278,7 +1825,7 @@ "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2", + "phpunit/php-code-coverage": "^9.2.3", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -1338,6 +1885,10 @@ "testing", "xunit" ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5" + }, "funding": [ { "url": "https://phpunit.de/donate.html", @@ -1348,7 +1899,162 @@ "type": "github" } ], - "time": "2020-10-26T06:27:31+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", @@ -1356,12 +2062,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "bb3529e836d10bd4d2713ae050a2c5251eb9ff3e" + "reference": "0b90e32f4fc2ed2618af8470384335383a99eeb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/bb3529e836d10bd4d2713ae050a2c5251eb9ff3e", - "reference": "bb3529e836d10bd4d2713ae050a2c5251eb9ff3e", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/0b90e32f4fc2ed2618af8470384335383a99eeb2", + "reference": "0b90e32f4fc2ed2618af8470384335383a99eeb2", "shasum": "" }, "require": { @@ -1370,6 +2076,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1394,17 +2101,21 @@ ], "description": "Library for parsing CLI options", "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T04:58:42+00:00" + "time": "2021-01-18T13:05:31+00:00" }, { "name": "sebastian/code-unit", - "version": "dev-master", + "version": "1.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", @@ -1446,6 +2157,10 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -1460,12 +2175,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "aed227b805d6b8d279d05cee266b46f5512b8ea4" + "reference": "822d88cf8f07aedea4c6cdd48dde9e19b1cd35dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/aed227b805d6b8d279d05cee266b46f5512b8ea4", - "reference": "aed227b805d6b8d279d05cee266b46f5512b8ea4", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/822d88cf8f07aedea4c6cdd48dde9e19b1cd35dd", + "reference": "822d88cf8f07aedea4c6cdd48dde9e19b1cd35dd", "shasum": "" }, "require": { @@ -1474,6 +2189,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1497,13 +2213,17 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T04:56:19+00:00" + "time": "2021-01-18T13:02:48+00:00" }, { "name": "sebastian/comparator", @@ -1511,12 +2231,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "b06bf31dec5ef18a8f5bccaf51c0f4af128a08e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/b06bf31dec5ef18a8f5bccaf51c0f4af128a08e1", + "reference": "b06bf31dec5ef18a8f5bccaf51c0f4af128a08e1", "shasum": "" }, "require": { @@ -1527,6 +2247,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1567,13 +2288,17 @@ "compare", "equality" ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2021-01-18T13:02:58+00:00" }, { "name": "sebastian/complexity", @@ -1581,12 +2306,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "291f1710889bce9382b87e17ffec544d9b2c3078" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/291f1710889bce9382b87e17ffec544d9b2c3078", + "reference": "291f1710889bce9382b87e17ffec544d9b2c3078", "shasum": "" }, "require": { @@ -1596,6 +2321,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1620,13 +2346,17 @@ ], "description": "Library for calculating the complexity of PHP code units", "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2021-01-18T13:05:10+00:00" }, { "name": "sebastian/diff", @@ -1634,12 +2364,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "3b28ccb04205dbe3f54685d91c34d54f5f09c64e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3b28ccb04205dbe3f54685d91c34d54f5f09c64e", + "reference": "3b28ccb04205dbe3f54685d91c34d54f5f09c64e", "shasum": "" }, "require": { @@ -1649,6 +2379,7 @@ "phpunit/phpunit": "^9.3", "symfony/process": "^4.2 || ^5" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1682,13 +2413,17 @@ "unidiff", "unified diff" ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2021-01-18T13:03:08+00:00" }, { "name": "sebastian/environment", @@ -1696,12 +2431,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "621594614bd6158ea0c1d6af09c6e5af01d8b1e8" + "reference": "1733c33db8c2fb5939ba4b3c2de53eff99528298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/621594614bd6158ea0c1d6af09c6e5af01d8b1e8", - "reference": "621594614bd6158ea0c1d6af09c6e5af01d8b1e8", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1733c33db8c2fb5939ba4b3c2de53eff99528298", + "reference": "1733c33db8c2fb5939ba4b3c2de53eff99528298", "shasum": "" }, "require": { @@ -1713,6 +2448,7 @@ "suggest": { "ext-posix": "*" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1741,13 +2477,17 @@ "environment", "hhvm" ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T04:56:46+00:00" + "time": "2021-01-18T13:03:18+00:00" }, { "name": "sebastian/exporter", @@ -1755,12 +2495,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "1c85999374d0f9e8c7c11ff1e93d0c75343eba8e" + "reference": "21b3e1f135974b44d51d85634a255ae84a2fe986" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1c85999374d0f9e8c7c11ff1e93d0c75343eba8e", - "reference": "1c85999374d0f9e8c7c11ff1e93d0c75343eba8e", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/21b3e1f135974b44d51d85634a255ae84a2fe986", + "reference": "21b3e1f135974b44d51d85634a255ae84a2fe986", "shasum": "" }, "require": { @@ -1771,6 +2511,7 @@ "ext-mbstring": "*", "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1814,13 +2555,17 @@ "export", "exporter" ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T04:56:54+00:00" + "time": "2021-01-18T13:03:28+00:00" }, { "name": "sebastian/global-state", @@ -1828,12 +2573,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455" + "reference": "f51241632128604e92fb08adc3c95eec5228efe2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/a90ccbddffa067b51f574dea6eb25d5680839455", - "reference": "a90ccbddffa067b51f574dea6eb25d5680839455", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/f51241632128604e92fb08adc3c95eec5228efe2", + "reference": "f51241632128604e92fb08adc3c95eec5228efe2", "shasum": "" }, "require": { @@ -1848,6 +2593,7 @@ "suggest": { "ext-uopz": "*" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1874,13 +2620,17 @@ "keywords": [ "global state" ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T15:55:19+00:00" + "time": "2021-01-18T13:03:37+00:00" }, { "name": "sebastian/lines-of-code", @@ -1888,12 +2638,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "acf76492a65401babcf5283296fa510782783a7a" + "reference": "e79c302abc8371a61d1b0d1ff0a4aeac1fe050b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/acf76492a65401babcf5283296fa510782783a7a", - "reference": "acf76492a65401babcf5283296fa510782783a7a", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e79c302abc8371a61d1b0d1ff0a4aeac1fe050b8", + "reference": "e79c302abc8371a61d1b0d1ff0a4aeac1fe050b8", "shasum": "" }, "require": { @@ -1903,6 +2653,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1927,13 +2678,17 @@ ], "description": "Library for counting the lines of code in PHP source code", "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T17:03:56+00:00" + "time": "2021-01-18T13:05:21+00:00" }, { "name": "sebastian/object-enumerator", @@ -1941,12 +2696,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "b87fec01050be216f000b0bd1b8c44c657d25f1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/b87fec01050be216f000b0bd1b8c44c657d25f1a", + "reference": "b87fec01050be216f000b0bd1b8c44c657d25f1a", "shasum": "" }, "require": { @@ -1957,6 +2712,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -1980,13 +2736,17 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2021-01-18T13:03:48+00:00" }, { "name": "sebastian/object-reflector", @@ -1994,12 +2754,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "d205aaa619485dbaf797e67c2af79186c606d7ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/d205aaa619485dbaf797e67c2af79186c606d7ea", + "reference": "d205aaa619485dbaf797e67c2af79186c606d7ea", "shasum": "" }, "require": { @@ -2008,6 +2768,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -2031,13 +2792,17 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2021-01-18T13:03:58+00:00" }, { "name": "sebastian/recursion-context", @@ -2045,12 +2810,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "be9bb5ea038598dd67ac9d40c5c37205d73deff9" + "reference": "141035d37fad4cf8d8d0f83097792355cfcbb379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/be9bb5ea038598dd67ac9d40c5c37205d73deff9", - "reference": "be9bb5ea038598dd67ac9d40c5c37205d73deff9", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/141035d37fad4cf8d8d0f83097792355cfcbb379", + "reference": "141035d37fad4cf8d8d0f83097792355cfcbb379", "shasum": "" }, "require": { @@ -2059,6 +2824,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -2090,13 +2856,17 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T13:20:23+00:00" + "time": "2021-01-18T13:04:39+00:00" }, { "name": "sebastian/resource-operations", @@ -2118,6 +2888,7 @@ "require-dev": { "phpunit/phpunit": "^9.0" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -2141,6 +2912,10 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2155,12 +2930,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2" + "reference": "c415636f612a62bfba64ea53f2f63038e1c2e32e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/81cd61ab7bbf2de744aba0ea61fae32f721df3d2", - "reference": "81cd61ab7bbf2de744aba0ea61fae32f721df3d2", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/c415636f612a62bfba64ea53f2f63038e1c2e32e", + "reference": "c415636f612a62bfba64ea53f2f63038e1c2e32e", "shasum": "" }, "require": { @@ -2169,6 +2944,7 @@ "require-dev": { "phpunit/phpunit": "^9.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -2193,13 +2969,17 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/master" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" } ], - "time": "2020-10-26T13:18:59+00:00" + "time": "2021-01-18T13:04:49+00:00" }, { "name": "sebastian/version", @@ -2218,6 +2998,7 @@ "require": { "php": ">=7.3" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { @@ -2242,6 +3023,10 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, "funding": [ { "url": "https://github.com/sebastianbergmann", @@ -2250,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": { @@ -2270,10 +3584,11 @@ "suggest": { "ext-ctype": "For best performance" }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.21-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2310,6 +3625,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.0" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -2324,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", @@ -2364,6 +4531,10 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/master" + }, "funding": [ { "url": "https://github.com/theseer", @@ -2374,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": { @@ -2395,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/" @@ -2419,7 +4596,11 @@ "check", "validate" ], - "time": "2020-07-08T17:02:28+00:00" + "support": { + "issues": "https://github.com/webmozart/assert/issues", + "source": "https://github.com/webmozart/assert/tree/master" + }, + "time": "2021-01-18T12:52:36+00:00" } ], "aliases": [], @@ -2434,5 +4615,8 @@ "ext-fileinfo": "*" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "platform-overrides": { + "php": "7.3.0" + }, + "plugin-api-version": "2.0.0" } 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 "". "$h_tip". "\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/admin/info.php b/ext/admin/info.php index 55cea22d..333c452b 100644 --- a/ext/admin/info.php +++ b/ext/admin/info.php @@ -9,15 +9,7 @@ class AdminPageInfo extends ExtensionInfo public $url = self::SHIMMIE_URL; public $authors = self::SHISH_AUTHOR; public $license = self::LICENSE_GPLV2; - public $description = "Various things to make admins' lives easier"; - public $documentation = -"Various moderate-level tools for admins; for advanced, obscure, and possibly dangerous tools see the shimmie2-utils script set -

Lowercase all tags: -
Set all tags to lowercase for consistency -

Recount tag use: -
If the counts of posts per tag get messed up somehow, this will reset them, and remove any unused tags -

Database dump: -
Download the contents of the database in plain text format, useful for backups. -

Post dump: -
Download all the posts as a .zip file (Requires ZipArchive)"; + public $description = "Provides a base for various small admin functions"; + public $core = true; + public $visibility = self::VISIBLE_HIDDEN; } diff --git a/ext/admin/main.php b/ext/admin/main.php index b45555d2..005b55c0 100644 --- a/ext/admin/main.php +++ b/ext/admin/main.php @@ -132,7 +132,6 @@ class AdminPage extends Extension public function onAdminBuilding(AdminBuildingEvent $event) { $this->theme->display_page(); - $this->theme->display_form(); } public function onPageSubNavBuilding(PageSubNavBuildingEvent $event) @@ -152,46 +151,4 @@ class AdminPage extends Extension $event->add_link("Board Admin", make_link("admin")); } } - - public function onAdminAction(AdminActionEvent $event) - { - $action = $event->action; - if (method_exists($this, $action)) { - $event->redirect = $this->$action(); - } - } - - private function set_tag_case() - { - global $database; - $database->execute( - "UPDATE tags SET tag=:tag1 WHERE LOWER(tag) = LOWER(:tag2)", - ["tag1" => $_POST['tag'], "tag2" => $_POST['tag']] - ); - log_info("admin", "Fixed the case of {$_POST['tag']}", "Fixed case"); - return true; - } - - private function lowercase_all_tags() - { - global $database; - $database->execute("UPDATE tags SET tag=lower(tag)"); - log_warning("admin", "Set all tags to lowercase", "Set all tags to lowercase"); - return true; - } - - private function recount_tag_use() - { - global $database; - $database->execute(" - UPDATE tags - SET count = COALESCE( - (SELECT COUNT(image_id) FROM image_tags WHERE tag_id=tags.id GROUP BY tag_id), - 0 - ) - "); - $database->execute("DELETE FROM tags WHERE count=0"); - log_warning("admin", "Re-counted tags", "Re-counted tags"); - return true; - } } diff --git a/ext/admin/test.php b/ext/admin/test.php index e0f5b919..27d0de8d 100644 --- a/ext/admin/test.php +++ b/ext/admin/test.php @@ -19,59 +19,6 @@ class AdminPageTest extends ShimmiePHPUnitTestCase $this->assertEquals("Admin Tools", $page->title); } - public function testLowercaseAndSetCase() - { - // Create a problem - $ts = time(); // we need a tag that hasn't been used before - send_event(new UserLoginEvent(User::by_name(self::$admin_name))); - $image_id_1 = $this->post_image("tests/pbx_screenshot.jpg", "TeStCase$ts"); - - // Validate problem - $page = $this->get_page("post/view/$image_id_1"); - $this->assertEquals("Post $image_id_1: TeStCase$ts", $page->title); - - // Fix - send_event(new AdminActionEvent('lowercase_all_tags')); - - // Validate fix - $this->get_page("post/view/$image_id_1"); - $this->assert_title("Post $image_id_1: testcase$ts"); - - // Change - $_POST["tag"] = "TestCase$ts"; - send_event(new AdminActionEvent('set_tag_case')); - - // Validate change - $this->get_page("post/view/$image_id_1"); - $this->assert_title("Post $image_id_1: TestCase$ts"); - } - - # FIXME: make sure the admin tools actually work - public function testRecount() - { - global $database; - - // Create a problem - $ts = time(); // we need a tag that hasn't been used before - send_event(new UserLoginEvent(User::by_name(self::$admin_name))); - $database->execute( - "INSERT INTO tags(tag, count) VALUES(:tag, :count)", - ["tag"=>"tes$ts", "count"=>42] - ); - - // Fix - send_event(new AdminActionEvent('recount_tag_use')); - - // Validate fix - $this->assertEquals( - 0, - $database->get_one( - "SELECT count FROM tags WHERE tag = :tag", - ["tag"=>"tes$ts"] - ) - ); - } - public function testCommands() { send_event(new UserLoginEvent(User::by_name(self::$admin_name))); diff --git a/ext/admin/theme.php b/ext/admin/theme.php index 6979aa59..88177e77 100644 --- a/ext/admin/theme.php +++ b/ext/admin/theme.php @@ -14,41 +14,4 @@ class AdminPageTheme extends Themelet $page->set_heading("Admin Tools"); $page->add_block(new NavBlock()); } - - protected function button(string $name, string $action, bool $protected=false): string - { - $c_protected = $protected ? " protected" : ""; - $html = make_form(make_link("admin/$action"), "POST", false, "admin$c_protected"); - if ($protected) { - $html .= ""; - $html .= ""; - } else { - $html .= ""; - } - $html .= "\n"; - return $html; - } - - /* - * Show a form which links to admin_utils with POST[action] set to one of: - * 'lowercase all tags' - * 'recount tag use' - * etc - */ - public function display_form() - { - global $page; - - $html = ""; - $html .= $this->button("All tags to lowercase", "lowercase_all_tags", true); - $html .= $this->button("Recount tag use", "recount_tag_use", false); - $page->add_block(new Block("Misc Admin Tools", $html)); - - $html = (string)SHM_SIMPLE_FORM( - "admin/set_tag_case", - INPUT(["type"=>'text', "name"=>'tag', "placeholder"=>'Enter tag with correct case', "class"=>'autocomplete_tags', "autocomplete"=>'off']), - SHM_SUBMIT('Set Tag Case'), - ); - $page->add_block(new Block("Set Tag Case", $html)); - } } 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:

+
+ Link tags: + +
+ More format Tags: + "; } 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 ? "" : "") . " @@ -41,9 +62,13 @@ class CronUploaderTheme extends Themelet
Cron upload is currently running
{$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: +
+
Create a cron job with the command above. + Read the documentation if you're not sure what to do.
+
URL: +
"; + $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 = "main image"; + "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"))." - - - - - - - - - - - - - -
    Private Images
    - -
    - -
    - - "; - 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 - + 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(""); $sb->add_label(""); $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 = ""; 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/config.php b/ext/tag_list/config.php index dc4560d6..0af8f3e1 100644 --- a/ext/tag_list/config.php +++ b/ext/tag_list/config.php @@ -14,11 +14,13 @@ class TagListConfig public const OMIT_TAGS = "tag_list_omit_tags"; public const TYPE_RELATED = "related"; - public const TYPE_TAGS= "tags"; + public const TYPE_TAGS = "tags"; + public const TYPE_BOTH = "both"; public const TYPE_CHOICES = [ "Post's tags only" => TagListConfig::TYPE_TAGS, - "Show related" => TagListConfig::TYPE_RELATED + "Related tags only" => TagListConfig::TYPE_RELATED, + "Both" => TagListConfig::TYPE_BOTH ]; public const SORT_ALPHABETICAL = "alphabetical"; diff --git a/ext/tag_list/main.php b/ext/tag_list/main.php index 0a60c021..2b8a38bb 100644 --- a/ext/tag_list/main.php +++ b/ext/tag_list/main.php @@ -81,27 +81,28 @@ class TagList extends Extension { global $config, $page; if ($config->get_int(TagListConfig::LENGTH) > 0) { - if ($config->get_string(TagListConfig::IMAGE_TYPE) == TagListConfig::TYPE_RELATED) { - $this->add_related_block($page, $event->image); - } else { + $type = $config->get_string(TagListConfig::IMAGE_TYPE); + if ($type == TagListConfig::TYPE_TAGS || $type == TagListConfig::TYPE_BOTH) { if (class_exists("TagCategories") and $config->get_bool(TagCategoriesConfig::SPLIT_ON_VIEW)) { $this->add_split_tags_block($page, $event->image); } else { $this->add_tags_block($page, $event->image); } } + if ($type == TagListConfig::TYPE_RELATED || $type == TagListConfig::TYPE_BOTH) { + $this->add_related_block($page, $event->image); + } } } 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 "); @@ -129,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); } /** @@ -441,7 +441,7 @@ class TagList extends Extension $tags = $database->get_all($query, $args); if (count($tags) > 0) { - $this->theme->display_related_block($page, $tags); + $this->theme->display_related_block($page, $tags, "Related Tags"); } } @@ -479,7 +479,7 @@ class TagList extends Extension $tags = $database->get_all($query, $args); if (count($tags) > 0) { - $this->theme->display_related_block($page, $tags); + $this->theme->display_related_block($page, $tags, "Tags"); } } diff --git a/ext/tag_list/theme.php b/ext/tag_list/theme.php index 6f771871..0de9cc29 100644 --- a/ext/tag_list/theme.php +++ b/ext/tag_list/theme.php @@ -118,11 +118,7 @@ class TagListTheme extends Themelet } if ($main_html != null) { - if ($config->get_string(TagListConfig::IMAGE_TYPE)==TagListConfig::TYPE_TAGS) { - $page->add_block(new Block("Tags", $main_html, "left", 10)); - } else { - $page->add_block(new Block("Related Tags", $main_html, "left", 10)); - } + $page->add_block(new Block("Tags", $main_html, "left", 10)); } } @@ -164,7 +160,7 @@ class TagListTheme extends Themelet * ... * ) */ - public function display_related_block(Page $page, $tag_infos) + public function display_related_block(Page $page, $tag_infos, $block_name) { global $config; @@ -173,11 +169,7 @@ class TagListTheme extends Themelet $config->get_string(TagListConfig::RELATED_SORT) ); - if ($config->get_string(TagListConfig::IMAGE_TYPE)==TagListConfig::TYPE_TAGS) { - $page->add_block(new Block("Tags", $main_html, "left", 10)); - } else { - $page->add_block(new Block("Related Tags", $main_html, "left", 10)); - } + $page->add_block(new Block($block_name, $main_html, "left", 10)); } diff --git a/ext/tag_tools/info.php b/ext/tag_tools/info.php new file mode 100644 index 00000000..6b0ac75a --- /dev/null +++ b/ext/tag_tools/info.php @@ -0,0 +1,13 @@ +theme->display_form(); + } + + public function onAdminAction(AdminActionEvent $event) + { + $action = $event->action; + if (method_exists($this, $action)) { + $event->redirect = $this->$action(); + } + } + + private function set_tag_case() + { + global $database; + $database->execute( + "UPDATE tags SET tag=:tag1 WHERE LOWER(tag) = LOWER(:tag2)", + ["tag1" => $_POST['tag'], "tag2" => $_POST['tag']] + ); + log_info("admin", "Fixed the case of {$_POST['tag']}", "Fixed case"); + return true; + } + + private function lowercase_all_tags() + { + global $database; + $database->execute("UPDATE tags SET tag=lower(tag)"); + log_warning("admin", "Set all tags to lowercase", "Set all tags to lowercase"); + return true; + } + + private function recount_tag_use() + { + global $database; + $database->execute(" + UPDATE tags + SET count = COALESCE( + (SELECT COUNT(image_id) FROM image_tags WHERE tag_id=tags.id GROUP BY tag_id), + 0 + ) + "); + $database->execute("DELETE FROM tags WHERE count=0"); + log_warning("admin", "Re-counted tags", "Re-counted tags"); + return true; + } +} diff --git a/ext/tag_tools/test.php b/ext/tag_tools/test.php new file mode 100644 index 00000000..4700a3c7 --- /dev/null +++ b/ext/tag_tools/test.php @@ -0,0 +1,56 @@ +post_image("tests/pbx_screenshot.jpg", "TeStCase$ts"); + + // Validate problem + $page = $this->get_page("post/view/$image_id_1"); + $this->assertEquals("Post $image_id_1: TeStCase$ts", $page->title); + + // Fix + send_event(new AdminActionEvent('lowercase_all_tags')); + + // Validate fix + $this->get_page("post/view/$image_id_1"); + $this->assert_title("Post $image_id_1: testcase$ts"); + + // Change + $_POST["tag"] = "TestCase$ts"; + send_event(new AdminActionEvent('set_tag_case')); + + // Validate change + $this->get_page("post/view/$image_id_1"); + $this->assert_title("Post $image_id_1: TestCase$ts"); + } + + # FIXME: make sure the admin tools actually work + public function testRecount() + { + global $database; + + // Create a problem + $ts = time(); // we need a tag that hasn't been used before + send_event(new UserLoginEvent(User::by_name(self::$admin_name))); + $database->execute( + "INSERT INTO tags(tag, count) VALUES(:tag, :count)", + ["tag"=>"tes$ts", "count"=>42] + ); + + // Fix + send_event(new AdminActionEvent('recount_tag_use')); + + // Validate fix + $this->assertEquals( + 0, + $database->get_one( + "SELECT count FROM tags WHERE tag = :tag", + ["tag"=>"tes$ts"] + ) + ); + } +} diff --git a/ext/tag_tools/theme.php b/ext/tag_tools/theme.php new file mode 100644 index 00000000..69f296d9 --- /dev/null +++ b/ext/tag_tools/theme.php @@ -0,0 +1,42 @@ +"; + $html .= ""; + } else { + $html .= ""; + } + $html .= "\n"; + return $html; + } + + /* + * Show a form which links to admin_utils with POST[action] set to one of: + * 'lowercase all tags' + * 'recount tag use' + * etc + */ + public function display_form() + { + global $page; + + $html = ""; + $html .= $this->button("All tags to lowercase", "lowercase_all_tags", true); + $html .= $this->button("Recount tag use", "recount_tag_use", false); + $page->add_block(new Block("Misc Admin Tools", $html)); + + $html = (string)SHM_SIMPLE_FORM( + "admin/set_tag_case", + INPUT(["type"=>'text', "name"=>'tag', "placeholder"=>'Enter tag with correct case', "class"=>'autocomplete_tags', "autocomplete"=>'off']), + SHM_SUBMIT('Set Tag Case'), + ); + $page->add_block(new Block("Set Tag Case", $html)); + } +} 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 = " +
    + $h +
    $b
    +
    + "; + 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 5c63c97f..30d5aba6 100644 --- a/ext/wiki/main.php +++ b/ext/wiki/main.php @@ -101,6 +101,7 @@ abstract class WikiConfig const TAG_PAGE_TEMPLATE = "wiki_tag_page_template"; const EMPTY_TAGINFO = "wiki_empty_taginfo"; const TAG_SHORTWIKIS = "shortwikis_on_tags"; + const ENABLE_REVISIONS = "wiki_revisions"; } class Wiki extends Extension @@ -118,21 +119,17 @@ class Wiki extends Extension [b]Auto tags: [/b][i]{autotags}[/i]"); $config->set_default_string(WikiConfig::EMPTY_TAGINFO, "none"); $config->set_default_bool(WikiConfig::TAG_SHORTWIKIS, false); + $config->set_default_bool(WikiConfig::ENABLE_REVISIONS, true); } // Add a block to the Board Config / Setup public function onSetupBuilding(SetupBuildingEvent $event) { - $sb = new SetupBlock("Wiki"); - - $sb->start_table(); - $sb->add_longtext_option(WikiConfig::TAG_PAGE_TEMPLATE, "Tag page template", true); - $sb->add_text_option(WikiConfig::EMPTY_TAGINFO, "Empty list text", true); - $sb->end_table(); - + $sb = $event->panel->create_new_block("Wiki"); + $sb->add_bool_option(WikiConfig::ENABLE_REVISIONS, "Enable wiki revisions: "); + $sb->add_longtext_option(WikiConfig::TAG_PAGE_TEMPLATE, "Tag page template: "); + $sb->add_text_option(WikiConfig::EMPTY_TAGINFO, "Empty list text: "); $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) @@ -243,16 +240,29 @@ class Wiki extends Extension public function onWikiUpdate(WikiUpdateEvent $event) { - global $database; + global $database, $config; $wpage = $event->wikipage; + + $exists = $database->exists("SELECT id FROM wiki_pages WHERE title = :title", ["title"=>$wpage->title]); + try { - $database->execute( - " - INSERT INTO wiki_pages(owner_id, owner_ip, date, title, revision, locked, body) - VALUES (:owner_id, :owner_ip, now(), :title, :revision, :locked, :body)", - ["owner_id"=>$event->user->id, "owner_ip"=>$_SERVER['REMOTE_ADDR'], - "title"=>$wpage->title, "revision"=>$wpage->revision, "locked"=>$wpage->locked, "body"=>$wpage->body] - ); + if ($config->get_bool(WikiConfig::ENABLE_REVISIONS) || ! $exists) { + $database->execute( + " + INSERT INTO wiki_pages(owner_id, owner_ip, date, title, revision, locked, body) + VALUES (:owner_id, :owner_ip, now(), :title, :revision, :locked, :body)", + ["owner_id"=>$event->user->id, "owner_ip"=>$_SERVER['REMOTE_ADDR'], + "title"=>$wpage->title, "revision"=>$wpage->revision, "locked"=>$wpage->locked, "body"=>$wpage->body] + ); + } else { + $database->execute( + " + UPDATE wiki_pages SET owner_id=:owner_id, owner_ip=:owner_ip, date=now(), locked=:locked, body=:body + WHERE title = :title ORDER BY revision DESC LIMIT 1", + ["owner_id"=>$event->user->id, "owner_ip"=>$_SERVER['REMOTE_ADDR'], + "title"=>$wpage->title, "locked"=>$wpage->locked, "body"=>$wpage->body] + ); + } } catch (Exception $e) { throw new WikiUpdateException("Somebody else edited that page at the same time :-("); } 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 = " + +
    + $h +
    $b
    +
    + "; + + 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 @@
    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.
    px
    (enter 0 for no default)