release 1.4.1
This commit is contained in:
parent
bec0ff9b4f
commit
98cb01295c
@ -1,3 +1,9 @@
|
|||||||
|
tinyPacker 1.4.1 - 2023.10.09
|
||||||
|
===========================================================
|
||||||
|
* Require Dotclear 2.28
|
||||||
|
* Require PHP 8.1+
|
||||||
|
* Code review
|
||||||
|
|
||||||
tinyPacker 1.4 - 2023.10.07
|
tinyPacker 1.4 - 2023.10.07
|
||||||
===========================================================
|
===========================================================
|
||||||
* Require Dotclear 2.28
|
* Require Dotclear 2.28
|
||||||
|
24
README.md
24
README.md
@ -1,23 +1,20 @@
|
|||||||
# README
|
# README
|
||||||
|
|
||||||
[![Release](https://img.shields.io/badge/release-1.4-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/tinyPacker/releases)
|
[![Release](https://img.shields.io/badge/release-1.4.1-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)
|
![Date](https://img.shields.io/badge/date-2023.10.07-c44d58.svg)
|
||||||
[![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download)
|
[![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)
|
[![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)
|
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/tinyPacker/src/branch/master/LICENSE)
|
||||||
|
|
||||||
## WHAT IS tinyPacker ?
|
|
||||||
|
|
||||||
_tinyPacker_ is a plugin for the open-source
|
## ABOUT
|
||||||
web publishing software called Dotclear.
|
|
||||||
|
|
||||||
It is a one button packager for plugins and theme
|
_tinyPacker_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
|
||||||
direct from Dotclear blog manager.
|
|
||||||
|
> One button packager for plugins and themes direct from Dotclear blog manager.
|
||||||
|
|
||||||
## REQUIREMENTS
|
## REQUIREMENTS
|
||||||
|
|
||||||
_tinyPacker_ requires:
|
|
||||||
|
|
||||||
* Super administrator permissions
|
* Super administrator permissions
|
||||||
* A writable public directory.
|
* A writable public directory.
|
||||||
* Dotclear 2.28
|
* Dotclear 2.28
|
||||||
@ -34,9 +31,10 @@ and it's pack into current blog public directory.
|
|||||||
|
|
||||||
## MORE
|
## MORE
|
||||||
|
|
||||||
* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html)
|
* [License](https://git.dotclear.watch/JcDenis/tinyPacker/src/branch/master/LICENSE)
|
||||||
* Source & contribution : [Gitea Page](https://git.dotclear.watch/JcDenis/tinyPacker) or [GitHub Page](https://github.com/JcDenis/tinyPacker)
|
* [Packages & details](https://git.dotclear.watch/JcDenis/tinyPacker/releases) (or on [Dotaddict](https://plugins.dotaddict.org/dc2/details/tinyPacker))
|
||||||
* Packages & details: [Gitea Page](https://git.dotclear.watch/JcDenis/tinyPacker/releases) or [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/tinyPacker)
|
* [Sources & contributions](https://git.dotclear.watch/JcDenis/tinyPacker) (or on [GitHub](https://github.com/JcDenis/tinyPacker))
|
||||||
|
* [Issues & security](https://git.dotclear.watch/JcDenis/tinyPacker/issues) (or on [GitHub](https://github.com/JcDenis/tinyPacker/issues))
|
||||||
|
|
||||||
## CONTRIBUTORS
|
## CONTRIBUTORS
|
||||||
|
|
||||||
|
29
_define.php
29
_define.php
@ -1,18 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @brief tinyPacker, a plugin for Dotclear 2
|
* @file
|
||||||
|
* @brief The plugin tinyPacker definition
|
||||||
|
* @ingroup tinyPacker
|
||||||
*
|
*
|
||||||
* @package Dotclear
|
* @defgroup tinyPacker Plugin tinyPacker.
|
||||||
* @subpackage Plugin
|
|
||||||
*
|
*
|
||||||
* @author Jean-Christian Denis
|
* Quick pack theme or plugin into public dir.
|
||||||
*
|
*
|
||||||
* @copyright Jean-Christian Denis
|
* @author Jean-Christian Denis
|
||||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
* @copyright Jean-Christian Denis
|
||||||
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
*/
|
*/
|
||||||
if (!defined('DC_RC_PATH')) {
|
declare(strict_types=1);
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->registerModule(
|
$this->registerModule(
|
||||||
'Tiny packer',
|
'Tiny packer',
|
||||||
@ -20,11 +20,10 @@ $this->registerModule(
|
|||||||
'Jean-Christian Denis',
|
'Jean-Christian Denis',
|
||||||
'1.4',
|
'1.4',
|
||||||
[
|
[
|
||||||
'requires' => [['core', '2.28']],
|
'requires' => [['core', '2.28']],
|
||||||
'permissions' => null,
|
'type' => 'plugin',
|
||||||
'type' => 'plugin',
|
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
|
||||||
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
|
'details' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/src/branch/master/README.md',
|
||||||
'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',
|
||||||
'repository' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/raw/branch/master/dcstore.xml',
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
<modules xmlns:da="http://dotaddict.org/da/">
|
<modules xmlns:da="http://dotaddict.org/da/">
|
||||||
<module id="tinyPacker">
|
<module id="tinyPacker">
|
||||||
<name>Tiny packer</name>
|
<name>Tiny packer</name>
|
||||||
<version>1.4</version>
|
<version>1.4.1</version>
|
||||||
<author>Jean-Christian Denis</author>
|
<author>Jean-Christian Denis</author>
|
||||||
<desc>Quick pack theme or plugin into public dir</desc>
|
<desc>Quick pack theme or plugin into public dir</desc>
|
||||||
<file>https://git.dotclear.watch/JcDenis/tinyPacker/releases/download/v1.4/plugin-tinyPacker.zip</file>
|
<file>https://git.dotclear.watch/JcDenis/tinyPacker/releases/download/v1.4.1/plugin-tinyPacker.zip</file>
|
||||||
<da:dcmin>2.28</da:dcmin>
|
<da:dcmin>2.28</da:dcmin>
|
||||||
<da:details>https://git.dotclear.watch/JcDenis/tinyPacker/src/branch/master/README.md</da:details>
|
<da:details>https://git.dotclear.watch/JcDenis/tinyPacker/src/branch/master/README.md</da:details>
|
||||||
<da:support>https://git.dotclear.watch/JcDenis/tinyPacker/issues</da:support>
|
<da:support>https://git.dotclear.watch/JcDenis/tinyPacker/issues</da:support>
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* @brief tinyPacker, a plugin for Dotclear 2
|
|
||||||
*
|
|
||||||
* @package Dotclear
|
|
||||||
* @subpackage Plugin
|
|
||||||
*
|
|
||||||
* @author Jean-Christian Denis
|
|
||||||
*
|
|
||||||
* @copyright Jean-Christian Denis
|
|
||||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
|
||||||
*/
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Dotclear\Plugin\tinyPacker;
|
namespace Dotclear\Plugin\tinyPacker;
|
||||||
@ -27,9 +17,14 @@ use Dotclear\Helper\Network\Http;
|
|||||||
use Exception;
|
use Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* tinyPacker admin class.
|
* @brief tinyPacker admin class.
|
||||||
|
* @ingroup tinyPacker
|
||||||
*
|
*
|
||||||
* Add action and button to modules lists.
|
* Add action and button to modules lists.
|
||||||
|
*
|
||||||
|
* @author Jean-Christian Denis
|
||||||
|
* @copyright Jean-Christian Denis
|
||||||
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
*/
|
*/
|
||||||
class Backend extends Process
|
class Backend extends Process
|
||||||
{
|
{
|
||||||
@ -49,7 +44,7 @@ class Backend extends Process
|
|||||||
return in_array($list->getList(), [
|
return in_array($list->getList(), [
|
||||||
'plugin-activate',
|
'plugin-activate',
|
||||||
'theme-activate',
|
'theme-activate',
|
||||||
]) ? (new Submit([My::id() . '[' . Html::escapeHTML($id) . ']']))->value(__('Pack'))->render() : '';
|
]) ? (new Submit([My::id() . '[' . Html::escapeHTML($id) . ']']))->__call('value', [__('Pack')])->render() : '';
|
||||||
},
|
},
|
||||||
'adminModulesListDoActions' => function (ModulesList $list, array $modules, string $type): void {
|
'adminModulesListDoActions' => function (ModulesList $list, array $modules, string $type): void {
|
||||||
# Pack action
|
# Pack action
|
||||||
|
15
src/My.php
15
src/My.php
@ -19,10 +19,18 @@ use Dotclear\Module\MyPlugin;
|
|||||||
|
|
||||||
class My extends MyPlugin
|
class My extends MyPlugin
|
||||||
{
|
{
|
||||||
/** @var string Public packages folder */
|
/**
|
||||||
|
* Public packages folder.
|
||||||
|
*
|
||||||
|
* @var string TINYPACKER_DIR
|
||||||
|
*/
|
||||||
public const TINYPACKER_DIR = 'packages';
|
public const TINYPACKER_DIR = 'packages';
|
||||||
|
|
||||||
/** @var array Excluded files and dirs */
|
/**
|
||||||
|
* Excluded files and dirs.
|
||||||
|
*
|
||||||
|
* @var array<int,string> TINYPACKER_EXCLUDE
|
||||||
|
*/
|
||||||
public const TINYPACKER_EXCLUDE = [
|
public const TINYPACKER_EXCLUDE = [
|
||||||
'\.',
|
'\.',
|
||||||
'\.\.',
|
'\.\.',
|
||||||
@ -39,6 +47,7 @@ class My extends MyPlugin
|
|||||||
|
|
||||||
public static function checkCustomContext(int $context): ?bool
|
public static function checkCustomContext(int $context): ?bool
|
||||||
{
|
{
|
||||||
return defined('DC_CONTEXT_ADMIN') && App::auth()->isSuperAdmin();
|
// Only backend and super admin
|
||||||
|
return $context === self::INSTALL ? null : App::task()->checkContext('BACKEND') && App::auth()->isSuperAdmin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user