From b38fa6e1ec5a7dcef768a2b6ad826105a19a4f1b Mon Sep 17 00:00:00 2001 From: grav Date: Mon, 27 Feb 2023 12:00:09 +0100 Subject: [PATCH] (Grav GitSync) Automatic Commit from grav --- plugins/admin/CHANGELOG.md | 13 + plugins/admin/admin.yaml | 2 +- plugins/admin/blueprints.yaml | 2 +- plugins/admin/classes/plugin/Admin.php | 7 + .../classes/plugin/AdminBaseController.php | 7 + .../admin/classes/plugin/AdminController.php | 7 + plugins/admin/classes/plugin/AdminForm.php | 2 +- .../admin/classes/plugin/AdminFormFactory.php | 7 + .../plugin/Controllers/AbstractController.php | 7 + .../plugin/Controllers/AdminController.php | 2 +- .../Controllers/Login/LoginController.php | 2 +- plugins/admin/classes/plugin/Gpm.php | 7 + plugins/admin/classes/plugin/Popularity.php | 7 + plugins/admin/classes/plugin/Router.php | 7 + .../classes/plugin/Routers/LoginRouter.php | 2 +- plugins/admin/classes/plugin/ScssCompiler.php | 8 + plugins/admin/classes/plugin/ScssList.php | 7 + plugins/admin/classes/plugin/Themes.php | 7 + .../plugin/Twig/AdminTwigExtension.php | 7 + plugins/admin/classes/plugin/Utils.php | 7 + plugins/admin/classes/plugin/WhiteLabel.php | 7 + plugins/admin/composer.json | 12 +- plugins/admin/composer.lock | 133 ++-- plugins/admin/vendor/autoload.php | 17 +- plugins/admin/vendor/composer/ClassLoader.php | 41 +- .../admin/vendor/composer/autoload_real.php | 27 +- plugins/admin/vendor/composer/installed.json | 18 +- plugins/admin/vendor/composer/installed.php | 10 +- .../lib/PicoFeed/Parser/DateParser.php | 2 +- plugins/flex-objects/CHANGELOG.md | 21 + .../types/default/list/list.html.twig | 2 +- .../types/pages/buttons/save.html.twig | 2 +- .../save-redirect/save-redirect.html.twig | 3 +- plugins/flex-objects/blueprints.yaml | 2 +- .../classes/Admin/AdminController.php | 1 + plugins/flex-objects/flex-objects.php | 2 +- plugins/flex-objects/languages/de.yaml | 2 + plugins/flex-objects/languages/en.yaml | 2 +- plugins/flex-objects/languages/es.yaml | 2 +- plugins/flex-objects/languages/ja.yaml | 2 +- plugins/flex-objects/languages/nl.yaml | 71 +++ plugins/form/.eslintrc | 165 ----- plugins/form/.gitignore | 5 - plugins/form/CHANGELOG.md | 89 ++- plugins/form/README.md | 2 + plugins/form/assets/form-styles.css | 81 +-- plugins/form/blueprints.yaml | 151 ++++- plugins/form/classes/BasicCaptcha.php | 12 +- plugins/form/classes/Form.php | 2 +- plugins/form/classes/Forms.php | 2 +- plugins/form/classes/TwigExtension.php | 18 +- plugins/form/composer.lock | 2 +- plugins/form/form.php | 471 ++++++++++----- plugins/form/form.yaml | 23 +- plugins/form/languages.yaml | 17 + plugins/form/scss/form-styles.scss | 28 +- .../templates/forms/default/field.html.twig | 2 +- .../templates/forms/default/fields.html.twig | 2 +- .../templates/forms/default/form.html.twig | 2 + .../basic-captcha/basic-captcha.html.twig | 2 +- .../fields/checkboxes/checkboxes.html.twig | 11 +- .../forms/fields/column/column.html.twig | 2 +- .../forms/fields/columns/columns.html.twig | 2 +- .../forms/fields/radio/radio.html.twig | 3 - .../forms/fields/select/select.html.twig | 9 +- .../forms/fields/tabs/tabs.html.twig | 4 +- .../fields/turnstile/turnstile.html.twig | 15 + plugins/form/vendor/composer/ClassLoader.php | 151 ++++- .../vendor/composer/InstalledVersions.php | 544 ++++++++++------- .../form/vendor/composer/autoload_real.php | 2 +- plugins/form/vendor/composer/installed.json | 2 +- plugins/form/vendor/composer/installed.php | 59 +- .../form/vendor/google/recaptcha/.gitignore | 7 - .../form/vendor/google/recaptcha/.travis.yml | 33 - plugins/login/.gitignore | 2 - plugins/login/CHANGELOG.md | 38 +- plugins/login/blueprints.yaml | 8 +- plugins/login/classes/Controller.php | 36 +- .../login/classes/Events/UserLoginEvent.php | 4 +- plugins/login/classes/Login.php | 133 +--- plugins/login/composer.json | 8 +- plugins/login/composer.lock | 18 +- plugins/login/languages/en.yaml | 3 +- plugins/login/login.php | 106 +++- .../vendor/bacon/bacon-qr-code/.gitignore | 9 - .../vendor/bacon/bacon-qr-code/.travis.yml | 14 - .../login/vendor/birke/rememberme/.gitignore | 4 - plugins/login/vendor/composer/ClassLoader.php | 151 ++++- .../vendor/composer/InstalledVersions.php | 571 ++++++++++-------- .../login/vendor/composer/autoload_real.php | 11 +- plugins/login/vendor/composer/installed.json | 12 +- plugins/login/vendor/composer/installed.php | 113 ++-- .../login/vendor/composer/platform_check.php | 4 +- .../login/vendor/dasprid/enum/.coveralls.yml | 2 - plugins/login/vendor/dasprid/enum/.gitignore | 3 - plugins/login/vendor/dasprid/enum/.travis.yml | 41 -- .../.github/workflows/test-bacon.yml | 30 + .../.github/workflows/test-endroid.yml | 46 ++ .../twofactorauth/.github/workflows/test.yml | 3 +- .../vendor/robthree/twofactorauth/.gitignore | 192 ------ .../vendor/robthree/twofactorauth/LICENSE | 2 +- .../vendor/robthree/twofactorauth/README.md | 174 +----- .../robthree/twofactorauth/composer.json | 2 +- .../robthree/twofactorauth/demo/demo.php | 54 +- .../robthree/twofactorauth/demo/loader.php | 50 -- .../lib/Providers/Qr/BaconQrCodeProvider.php | 13 +- .../Providers/Qr/EndroidQrCodeProvider.php | 28 +- .../Qr/EndroidQrCodeWithLogoProvider.php | 28 +- .../twofactorauth/lib/TwoFactorAuth.php | 2 +- .../vendor/robthree/twofactorauth/phpunit.xml | 1 + .../Providers/Qr/IQRCodeProviderTest.php | 38 +- .../twofactorauth/tests/TwoFactorAuthTest.php | 2 +- 112 files changed, 2474 insertions(+), 1898 deletions(-) create mode 100644 plugins/flex-objects/languages/nl.yaml delete mode 100644 plugins/form/.eslintrc delete mode 100644 plugins/form/.gitignore create mode 100644 plugins/form/templates/forms/fields/turnstile/turnstile.html.twig delete mode 100644 plugins/form/vendor/google/recaptcha/.gitignore delete mode 100644 plugins/form/vendor/google/recaptcha/.travis.yml delete mode 100644 plugins/login/.gitignore delete mode 100644 plugins/login/vendor/bacon/bacon-qr-code/.gitignore delete mode 100644 plugins/login/vendor/bacon/bacon-qr-code/.travis.yml delete mode 100644 plugins/login/vendor/birke/rememberme/.gitignore delete mode 100644 plugins/login/vendor/dasprid/enum/.coveralls.yml delete mode 100644 plugins/login/vendor/dasprid/enum/.gitignore delete mode 100644 plugins/login/vendor/dasprid/enum/.travis.yml create mode 100644 plugins/login/vendor/robthree/twofactorauth/.github/workflows/test-bacon.yml create mode 100644 plugins/login/vendor/robthree/twofactorauth/.github/workflows/test-endroid.yml delete mode 100644 plugins/login/vendor/robthree/twofactorauth/.gitignore delete mode 100644 plugins/login/vendor/robthree/twofactorauth/demo/loader.php diff --git a/plugins/admin/CHANGELOG.md b/plugins/admin/CHANGELOG.md index 4f1ffdb..29f9ac4 100644 --- a/plugins/admin/CHANGELOG.md +++ b/plugins/admin/CHANGELOG.md @@ -1,3 +1,16 @@ +# v1.10.39 +## 02/19/2023 + +1. [](#bugfix) + * Forked and fixed PicoFeed library to support PHP 8.2 + +# v1.10.38 +## 01/02/2023 + +1. [](#new) + * Update copyright dates + * Keep version number in sync with Grav version + # v1.10.37.1 ## 10/08/2022 diff --git a/plugins/admin/admin.yaml b/plugins/admin/admin.yaml index 17bc26b..c23f95b 100644 --- a/plugins/admin/admin.yaml +++ b/plugins/admin/admin.yaml @@ -27,7 +27,7 @@ edit_mode: normal frontend_preview_target: inline show_github_msg: true admin_icons: line-awesome -enable_auto_updates_check: false +enable_auto_updates_check: true notifications: feed: true dashboard: true diff --git a/plugins/admin/blueprints.yaml b/plugins/admin/blueprints.yaml index 1913b83..5bc4c7e 100644 --- a/plugins/admin/blueprints.yaml +++ b/plugins/admin/blueprints.yaml @@ -1,7 +1,7 @@ name: Admin Panel slug: admin type: plugin -version: 1.10.37.1 +version: 1.10.39 description: Adds an advanced administration panel to manage your site icon: empire author: diff --git a/plugins/admin/classes/plugin/Admin.php b/plugins/admin/classes/plugin/Admin.php index ef41488..1d6dee8 100644 --- a/plugins/admin/classes/plugin/Admin.php +++ b/plugins/admin/classes/plugin/Admin.php @@ -1,5 +1,12 @@ vendorDir = $vendorDir; + self::initializeIncludeClosure(); } /** @@ -425,7 +429,8 @@ class ClassLoader public function loadClass($class) { if ($file = $this->findFile($class)) { - includeFile($file); + $includeFile = self::$includeFile; + $includeFile($file); return true; } @@ -555,18 +560,26 @@ class ClassLoader return false; } -} -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - * - * @param string $file - * @return void - * @private - */ -function includeFile($file) -{ - include $file; + /** + * @return void + */ + private static function initializeIncludeClosure() + { + if (self::$includeFile !== null) { + return; + } + + /** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + * + * @param string $file + * @return void + */ + self::$includeFile = \Closure::bind(static function($file) { + include $file; + }, null, null); + } } diff --git a/plugins/admin/vendor/composer/autoload_real.php b/plugins/admin/vendor/composer/autoload_real.php index 3b849da..82a6a2d 100644 --- a/plugins/admin/vendor/composer/autoload_real.php +++ b/plugins/admin/vendor/composer/autoload_real.php @@ -33,25 +33,18 @@ class ComposerAutoloaderInit98c98c1c3d67f21a128f935fe4a74897 $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897::$files; - foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire98c98c1c3d67f21a128f935fe4a74897($fileIdentifier, $file); + $filesToLoad = \Composer\Autoload\ComposerStaticInit98c98c1c3d67f21a128f935fe4a74897::$files; + $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + + require $file; + } + }, null, null); + foreach ($filesToLoad as $fileIdentifier => $file) { + $requireFile($fileIdentifier, $file); } return $loader; } } - -/** - * @param string $fileIdentifier - * @param string $file - * @return void - */ -function composerRequire98c98c1c3d67f21a128f935fe4a74897($fileIdentifier, $file) -{ - if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { - $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; - - require $file; - } -} diff --git a/plugins/admin/vendor/composer/installed.json b/plugins/admin/vendor/composer/installed.json index b0202e1..9efad0d 100644 --- a/plugins/admin/vendor/composer/installed.json +++ b/plugins/admin/vendor/composer/installed.json @@ -130,17 +130,17 @@ }, { "name": "p3k/picofeed", - "version": "v0.1.40", - "version_normalized": "0.1.40.0", + "version": "1.0.0", + "version_normalized": "1.0.0.0", "source": { "type": "git", - "url": "https://github.com/aaronpk/picofeed.git", - "reference": "356fd66d48779193b10ac28532cb4a4e11bb801c" + "url": "https://github.com/rhukster/picofeed.git", + "reference": "8eacaa62f50a0935e26ca33f8d30d283344ca397" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aaronpk/picofeed/zipball/356fd66d48779193b10ac28532cb4a4e11bb801c", - "reference": "356fd66d48779193b10ac28532cb4a4e11bb801c", + "url": "https://api.github.com/repos/rhukster/picofeed/zipball/8eacaa62f50a0935e26ca33f8d30d283344ca397", + "reference": "8eacaa62f50a0935e26ca33f8d30d283344ca397", "shasum": "" }, "require": { @@ -163,7 +163,7 @@ "suggest": { "ext-curl": "PicoFeed will use cURL if present" }, - "time": "2020-04-25T17:48:36+00:00", + "time": "2023-02-19T19:58:09+00:00", "bin": [ "picofeed" ], @@ -174,7 +174,6 @@ "PicoFeed": "lib/" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -186,8 +185,7 @@ "description": "Modern library to handle RSS/Atom feeds", "homepage": "https://github.com/aaronpk/picoFeed", "support": { - "issues": "https://github.com/aaronpk/picofeed/issues", - "source": "https://github.com/aaronpk/picofeed/tree/v0.1.40" + "source": "https://github.com/rhukster/picofeed/tree/1.0.0" }, "install-path": "../p3k/picofeed" }, diff --git a/plugins/admin/vendor/composer/installed.php b/plugins/admin/vendor/composer/installed.php index d946757..fdc850d 100644 --- a/plugins/admin/vendor/composer/installed.php +++ b/plugins/admin/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'getgrav/grav-plugin-admin', 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '97ab52df8179fad32d1190b530c32053b84d5979', + 'reference' => '0d16602880413bb6cbc2c94b75f02dce3174d215', 'type' => 'grav-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ 'getgrav/grav-plugin-admin' => array( 'pretty_version' => 'dev-develop', 'version' => 'dev-develop', - 'reference' => '97ab52df8179fad32d1190b530c32053b84d5979', + 'reference' => '0d16602880413bb6cbc2c94b75f02dce3174d215', 'type' => 'grav-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -44,9 +44,9 @@ ), ), 'p3k/picofeed' => array( - 'pretty_version' => 'v0.1.40', - 'version' => '0.1.40.0', - 'reference' => '356fd66d48779193b10ac28532cb4a4e11bb801c', + 'pretty_version' => '1.0.0', + 'version' => '1.0.0.0', + 'reference' => '8eacaa62f50a0935e26ca33f8d30d283344ca397', 'type' => 'library', 'install_path' => __DIR__ . '/../p3k/picofeed', 'aliases' => array(), diff --git a/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/DateParser.php b/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/DateParser.php index 0e5b80e..b7a015d 100644 --- a/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/DateParser.php +++ b/plugins/admin/vendor/p3k/picofeed/lib/PicoFeed/Parser/DateParser.php @@ -97,7 +97,7 @@ class DateParser extends Base if ($date !== false) { $errors = DateTime::getLastErrors(); - if ($errors['error_count'] === 0 && $errors['warning_count'] === 0) { + if ($errors === false || ($errors['error_count'] === 0 && $errors['warning_count'] === 0)) { return $date; } } diff --git a/plugins/flex-objects/CHANGELOG.md b/plugins/flex-objects/CHANGELOG.md index 66dd8af..3661e3e 100644 --- a/plugins/flex-objects/CHANGELOG.md +++ b/plugins/flex-objects/CHANGELOG.md @@ -1,3 +1,24 @@ +# v1.3.4 +## 02/19/2023 + +1. [](#improved) + * Support saving via admin in current language if not translated + +# v1.3.3 +## 01/04/2023 + +1. [](#improved) + * Save `post-save` action to session + * Set default `post-save` action to `edit` for create and edit + +# v1.3.2 +## 12/02/2022 + +1. [](#improved) + * Various translation enhancements +1. [](#bugfix) + * Fixed frontend editing objects with urlencoded ids + # v1.3.1 ## 09/08/2022 diff --git a/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig b/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig index 4f90ad9..2200e53 100644 --- a/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig +++ b/plugins/flex-objects/admin/templates/flex-objects/types/default/list/list.html.twig @@ -54,7 +54,7 @@ {# FIXME: Search fields should be passed and individually customizable, right now defaulting to all fields selected #} {% set searchFields = searchFields|merge([key|replace({'.': '_'})]) %} {% endfor %} - {% set tableFields = tableFields|merge([{ name: '_actions_', title: 'Actions', titleClass: 'right' }]) %} + {% set tableFields = tableFields|merge([{ name: '_actions_', title: "PLUGIN_FLEX_OBJECTS.ACTION.ACTIONS"|tu, titleClass: 'right' }]) %} {% set list = table.jsonSerialize %} diff --git a/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/save.html.twig b/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/save.html.twig index fd401bc..7d171a5 100644 --- a/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/save.html.twig +++ b/plugins/flex-objects/admin/templates/flex-objects/types/pages/buttons/save.html.twig @@ -4,7 +4,7 @@ {{ "PLUGIN_ADMIN.SAVE"|tu }} {% if can_translate %} - {% set untranslated = admin_languages|array_diff(object_languages|merge([language])) %} + {% set untranslated = admin_languages|array_diff(object_languages) %} {% if count(untranslated) %} +