From bec0ff9b4f707ecd35bb00688a9747fac2fbf854 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 7 Oct 2023 21:45:14 +0200 Subject: [PATCH] release 1.4 --- CHANGELOG.md | 6 ++++++ README.md | 10 +++++----- _define.php | 4 ++-- dcstore.xml | 6 +++--- src/Backend.php | 6 +++--- src/My.php | 4 ++-- 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc9bc78..09ffe83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +tinyPacker 1.4 - 2023.10.07 +=========================================================== +* Require Dotclear 2.28 +* Require PHP 8.1 +* Update to Dotclear 2.28 + tinyPacker 1.3 - 2023.08.13 =========================================================== * Require Dotclear 2.27 diff --git a/README.md b/README.md index cc23835..e138203 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # README -[![Release](https://img.shields.io/badge/release-1.3-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/tinyPacker/releases) -[![Date](https://img.shields.io/badge/date-2023.08.13-c44d58.svg)](https://git.dotclear.watch/JcDenis/tinyPacker/releases) -[![Dotclear](https://img.shields.io/badge/dotclear-v2.27-137bbb.svg)](https://fr.dotclear.org/download) +[![Release](https://img.shields.io/badge/release-1.4-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/tinyPacker/releases) +[![Date](https://img.shields.io/badge/date-2023.10.07-c44d58.svg)](https://git.dotclear.watch/JcDenis/tinyPacker/releases) +[![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/tinyPacker) [![License](https://img.shields.io/github/license/JcDenis/tinyPacker)](https://git.dotclear.watch/JcDenis/tinyPacker/blob/master/LICENSE) @@ -20,8 +20,8 @@ _tinyPacker_ requires: * Super administrator permissions * A writable public directory. -* Dotclear 2.27 -* PHP 7.4+ +* Dotclear 2.28 +* PHP 8.1+ ## USAGE diff --git a/_define.php b/_define.php index 6d6cecd..5c6c610 100644 --- a/_define.php +++ b/_define.php @@ -18,9 +18,9 @@ $this->registerModule( 'Tiny packer', 'Quick pack theme or plugin into public dir', 'Jean-Christian Denis', - '1.3', + '1.4', [ - 'requires' => [['core', '2.27']], + 'requires' => [['core', '2.28']], 'permissions' => null, 'type' => 'plugin', 'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues', diff --git a/dcstore.xml b/dcstore.xml index d1edad2..18492b3 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -2,11 +2,11 @@ Tiny packer - 1.3 + 1.4 Jean-Christian Denis Quick pack theme or plugin into public dir - https://git.dotclear.watch/JcDenis/tinyPacker/releases/download/v1.3/plugin-tinyPacker.zip - 2.27 + https://git.dotclear.watch/JcDenis/tinyPacker/releases/download/v1.4/plugin-tinyPacker.zip + 2.28 https://git.dotclear.watch/JcDenis/tinyPacker/src/branch/master/README.md https://git.dotclear.watch/JcDenis/tinyPacker/issues diff --git a/src/Backend.php b/src/Backend.php index 56a7984..5bd2355 100644 --- a/src/Backend.php +++ b/src/Backend.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Dotclear\Plugin\tinyPacker; -use dcCore; +use Dotclear\App; use Dotclear\Core\Process; use Dotclear\Core\Backend\ModulesList; use Dotclear\Core\Backend\Notices; @@ -44,7 +44,7 @@ class Backend extends Process return false; } - dcCore::app()->addBehaviors([ + App::behavior()->addBehaviors([ 'adminModulesListGetActions' => function (ModulesList $list, string $id, array $_): string { return in_array($list->getList(), [ 'plugin-activate', @@ -60,7 +60,7 @@ class Backend extends Process # Repository directory $dir = (string) Path::real( - dcCore::app()->blog->public_path . DIRECTORY_SEPARATOR . My::TINYPACKER_DIR, + App::blog()->publicPath() . DIRECTORY_SEPARATOR . My::TINYPACKER_DIR, false ); if (!empty($dir) && !is_dir($dir)) { diff --git a/src/My.php b/src/My.php index b89de42..66cafc0 100644 --- a/src/My.php +++ b/src/My.php @@ -14,7 +14,7 @@ declare(strict_types=1); namespace Dotclear\Plugin\tinyPacker; -use dcCore; +use Dotclear\App; use Dotclear\Module\MyPlugin; class My extends MyPlugin @@ -39,6 +39,6 @@ class My extends MyPlugin public static function checkCustomContext(int $context): ?bool { - return defined('DC_CONTEXT_ADMIN') && dcCore::app()->auth->isSuperAdmin(); + return defined('DC_CONTEXT_ADMIN') && App::auth()->isSuperAdmin(); } }