From bee9b19cfca6ad19a481957b42ecd72ae4c2ab1b Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Tue, 10 Oct 2023 23:37:45 +0200 Subject: [PATCH] release 2023.10.11 --- CHANGELOG.md | 6 ++++++ README.md | 8 ++++---- _define.php | 33 ++++++++++++++++---------------- dcstore.xml | 6 +++--- src/Backend.php | 9 +++++++++ src/Install.php | 21 ++++++++++----------- src/Manage.php | 20 ++++++++------------ src/My.php | 44 +++++++++++++++++++++++++++++++------------ src/MyUrlHandlers.php | 21 ++++++++++----------- src/Prepend.php | 21 ++++++++++----------- src/Uninstall.php | 21 ++++++++++----------- 11 files changed, 119 insertions(+), 91 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dded805..52a1e53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +myUrlHandlers 2023.10.11 +=========================================================== +* Require Dotclear 2.28 +* Require PHP 8.1 +* Code review + myUrlHandlers 2023.10.07 =========================================================== * Require Dotclear 2.28 diff --git a/README.md b/README.md index c6f7da1..273f514 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # README -[![Release](https://img.shields.io/badge/release-2023.08.13-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/myUrlHandlers/releases) -![Date](https://img.shields.io/badge/date-2023.08.13-c44d58.svg) -[![Dotclear](https://img.shields.io/badge/dotclear-v2.27-137bbb.svg)](https://fr.dotclear.org/download) +[![Release](https://img.shields.io/badge/release-2023.10.11-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/myUrlHandlers/releases) +![Date](https://img.shields.io/badge/date-2023.10.11-c44d58.svg) +[![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/myUrlHandlers) [![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/myUrlHandlers/src/branch/master/LICENSE) @@ -36,7 +36,7 @@ or you can add dashboard icon. ## CONTRIBUTORS -* Alex pirine (First author) +* Alex pirine (Author) * te2dy * Jean-Christian Denis diff --git a/_define.php b/_define.php index 62d7b97..0630c9f 100644 --- a/_define.php +++ b/_define.php @@ -1,31 +1,32 @@ registerModule( 'URL handlers', 'Change Dotclear URL handlers', 'Alex Pirine and contributors', - '2023.08.13', + '2023.10.11', [ 'requires' => [['core', '2.28']], - 'permissions' => App::auth()->makePermissions([ - App::auth()::PERMISSION_CONTENT_ADMIN, - ]), - 'priority' => 150000, - 'type' => 'plugin', - 'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues', - 'details' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/src/branch/master/README.md', - 'repository' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/raw/branch/master/dcstore.xml', + 'permissions' => 'My', + 'priority' => 150000, + 'type' => 'plugin', + 'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues', + 'details' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/src/branch/master/README.md', + 'repository' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/raw/branch/master/dcstore.xml', ] ); diff --git a/dcstore.xml b/dcstore.xml index 9d05a4b..f5ceeda 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -2,11 +2,11 @@ URL handlers - 2023.08.13 + 2023.10.11 Alex Pirine and contributors Change Dotclear URL handlers - https://github.com/JcDenis/myUrlHandlers/releases/download/v2023.08.13/plugin-myUrlHandlers.zip - 2.27 + https://git.dotclear.watch/JcDenis/myUrlHandlers/releases/download/v2023.10.11/plugin-myUrlHandlers.zip + 2.28 https://git.dotclear.watch/JcDenis/myUrlHandlers/src/branch/master/README.md https://git.dotclear.watch/JcDenis/myUrlHandlers/issues diff --git a/src/Backend.php b/src/Backend.php index 41ee57b..1600950 100644 --- a/src/Backend.php +++ b/src/Backend.php @@ -18,6 +18,15 @@ use Dotclear\App; use Dotclear\Core\Process; use Dotclear\Core\Backend\Favorites; +/** + * @brief myUrlHandlers backend class. + * @ingroup myUrlHandlers + * + * @author Alex Pirine and contributors + * @author Jean-Christian Denis + * @copyright Alex Pirine + * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html + */ class Backend extends Process { public static function init(): bool diff --git a/src/Install.php b/src/Install.php index 4213ad3..899eeb2 100644 --- a/src/Install.php +++ b/src/Install.php @@ -1,15 +1,5 @@ !App::task()->checkContext('BACKEND') + || ( + App::blog()->isDefined() + && App::auth()->check(App::auth()->makePermissions([ + App::auth()::PERMISSION_CONTENT_ADMIN, + ]), App::blog()->id()) + ), + + default => null, + }; + } } diff --git a/src/MyUrlHandlers.php b/src/MyUrlHandlers.php index f785fcc..cb5985d 100644 --- a/src/MyUrlHandlers.php +++ b/src/MyUrlHandlers.php @@ -1,15 +1,5 @@