Compare commits
No commits in common. "master" and "v2023.10.13" have entirely different histories.
master
...
v2023.10.1
13
CHANGELOG.md
13
CHANGELOG.md
@ -1,16 +1,3 @@
|
||||
pacKman 2023.11.04
|
||||
===========================================================
|
||||
* Require Dotclear 2.28
|
||||
* Require PHP 8.1+
|
||||
* Fix typo
|
||||
* Code review
|
||||
|
||||
pacKman 2023.10.19
|
||||
===========================================================
|
||||
* Require Dotclear 2.28
|
||||
* Require PHP 8.1+
|
||||
* cosmetic code review
|
||||
|
||||
pacKman 2023.10.13
|
||||
===========================================================
|
||||
* Require Dotclear 2.28
|
||||
|
14
README.md
14
README.md
@ -1,7 +1,7 @@
|
||||
# README
|
||||
|
||||
[![Release](https://img.shields.io/badge/release-2023.11.04-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/pacKman/releases)
|
||||
![Date](https://img.shields.io/badge/date-2023.11.04-c44d58.svg)
|
||||
[![Release](https://img.shields.io/badge/release-2023.10.13-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/pacKman/releases)
|
||||
![Date](https://img.shields.io/badge/date-2023.10.13-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/pacKman)
|
||||
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/pacKman/src/branch/master/LICENSE)
|
||||
@ -16,9 +16,9 @@ _pacKman_ is a plugin for the open-source web publishing software called [Dotcle
|
||||
|
||||
* Dotclear 2.28
|
||||
* PHP 8.1+
|
||||
* Dotclear super administrator permissions
|
||||
* System writable cache directory
|
||||
* System writable directory to put packages. (can be VAR dir)
|
||||
* Super administrator permissions
|
||||
* A writable cache directory
|
||||
* A writable directory to put packages. (can be VAR dir)
|
||||
|
||||
## USAGE
|
||||
|
||||
@ -37,11 +37,11 @@ Once it's done you can manage your packages from menu
|
||||
* [Packages & details](https://git.dotclear.watch/JcDenis/pacKman/releases) (or on [Dotaddict](https://plugins.dotaddict.org/dc2/details/pacKman))
|
||||
* [Sources & contributions](https://git.dotclear.watch/JcDenis/pacKman) (or on [GitHub](https://github.com/JcDenis/pacKman))
|
||||
* [Issues & security](https://git.dotclear.watch/JcDenis/pacKman/issues) (or on [GitHub](https://github.com/JcDenis/pacKman/issues))
|
||||
* [Discuss & help](https://forum.dotclear.org/viewtopic.php?id=40066)
|
||||
* [Discuss and help](https://forum.dotclear.org/viewtopic.php?id=40066)
|
||||
|
||||
## CONTRIBUTORS
|
||||
|
||||
* Jean-Christian Denis (author)
|
||||
* Jean-Christian Denis
|
||||
* Philippe aka Dissitou
|
||||
* franck-paul
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
* Manage your Dotclear packages.
|
||||
*
|
||||
* @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);
|
||||
@ -17,10 +18,9 @@ $this->registerModule(
|
||||
'Packages repository',
|
||||
'Manage your Dotclear packages',
|
||||
'Jean-Christian Denis',
|
||||
'2023.11.04',
|
||||
'2023.10.13',
|
||||
[
|
||||
'requires' => [['core', '2.28']],
|
||||
'permissions' => 'My',
|
||||
'type' => 'plugin',
|
||||
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
|
||||
'details' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/src/branch/master/README.md',
|
||||
|
@ -2,10 +2,10 @@
|
||||
<modules xmlns:da="http://dotaddict.org/da/">
|
||||
<module id="pacKman">
|
||||
<name>Packages repository</name>
|
||||
<version>2023.11.04</version>
|
||||
<version>2023.10.13</version>
|
||||
<author>Jean-Christian Denis</author>
|
||||
<desc>Manage your Dotclear packages</desc>
|
||||
<file>https://git.dotclear.watch/JcDenis/pacKman/releases/download/v2023.11.04/plugin-pacKman.zip</file>
|
||||
<file>https://git.dotclear.watch/JcDenis/pacKman/releases/download/v2023.10.13/plugin-pacKman.zip</file>
|
||||
<da:dcmin>2.28</da:dcmin>
|
||||
<da:details>https://git.dotclear.watch/JcDenis/pacKman/src/branch/master/README.md</da:details>
|
||||
<da:support>https://git.dotclear.watch/JcDenis/pacKman/issues</da:support>
|
||||
|
@ -1,10 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* @brief The plugin pacKman locales resources
|
||||
* @ingroup pacKman
|
||||
* @brief pacKman, 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
|
||||
*/
|
||||
\Dotclear\App::backend()->resources()->set('help', 'pacKman', __DIR__ . '/help/help.html');
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!isset(dcCore::app()->resources['help']['pacKman'])) {
|
||||
dcCore::app()->resources['help']['pacKman'] = __DIR__ . '/help/help.html';
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ use Dotclear\Core\Backend\Favorites;
|
||||
* @ingroup pacKman
|
||||
*
|
||||
* @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
|
||||
|
@ -25,6 +25,7 @@ use Exception;
|
||||
* @ingroup pacKman
|
||||
*
|
||||
* @author Jean-Christian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Config extends Process
|
||||
@ -111,7 +112,7 @@ class Config extends Process
|
||||
// pack_repository
|
||||
(new Para())->items([
|
||||
(new Label($check_repo . __('Path to repository:')))->for('pack_repository'),
|
||||
(new Input('pack_repository'))->class('maximal')->size(65)->maxlength(255)->value($s->pack_repository),
|
||||
(new Input('pack_repository'))->class('maximal')->size(65)->maxlenght(255)->value($s->pack_repository),
|
||||
]),
|
||||
(new Note())->class('form-note')->text(
|
||||
sprintf(
|
||||
@ -131,13 +132,13 @@ class Config extends Process
|
||||
// pack_filename
|
||||
(new Para())->items([
|
||||
(new Label($check_first . __('Name of exported package:')))->for('pack_filename'),
|
||||
(new Input('pack_filename'))->class('maximal')->size(65)->maxlength(255)->value($s->pack_filename),
|
||||
(new Input('pack_filename'))->class('maximal')->size(65)->maxlenght(255)->value($s->pack_filename),
|
||||
]),
|
||||
(new Note())->text(sprintf(__('Preconization: %s'), '%type%-%id%'))->class('form-note'),
|
||||
// secondpack_filename
|
||||
(new Para())->items([
|
||||
(new Label($check_second . __('Name of second exported package:')))->for('secondpack_filename'),
|
||||
(new Input('secondpack_filename'))->class('maximal')->size(65)->maxlength(255)->value($s->secondpack_filename),
|
||||
(new Input('secondpack_filename'))->class('maximal')->size(65)->maxlenght(255)->value($s->secondpack_filename),
|
||||
]),
|
||||
(new Note())->text(sprintf(__('Preconization: %s'), '%type%-%id%-%version%'))->class('form-note'),
|
||||
// pack_overwrite
|
||||
@ -150,7 +151,7 @@ class Config extends Process
|
||||
// pack_excludefiles
|
||||
(new Para())->items([
|
||||
(new Label(__('Extra files to exclude from package:')))->for('pack_excludefiles'),
|
||||
(new Input('pack_excludefiles'))->class('maximal')->size(65)->maxlength(255)->value($s->pack_excludefiles),
|
||||
(new Input('pack_excludefiles'))->class('maximal')->size(65)->maxlenght(255)->value($s->pack_excludefiles),
|
||||
]),
|
||||
(new Note())->text(sprintf(__('Preconization: %s'), '*.zip,*.tar,*.tar.gz'))->class('form-note'),
|
||||
// pack_nocomment
|
||||
|
@ -16,6 +16,7 @@ use Exception;
|
||||
* @ingroup pacKman
|
||||
*
|
||||
* @author Jean-Christian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Core
|
||||
|
@ -13,6 +13,7 @@ use Exception;
|
||||
* @ingroup pacKman
|
||||
*
|
||||
* @author Jean-Christian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Install extends Process
|
||||
|
@ -23,6 +23,7 @@ use Exception;
|
||||
* @ingroup pacKman
|
||||
*
|
||||
* @author Jean-Christian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Manage extends Process
|
||||
|
@ -12,6 +12,7 @@ use Dotclear\Module\MyPlugin;
|
||||
* @ingroup pacKman
|
||||
*
|
||||
* @author Jean-Christian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class My extends MyPlugin
|
||||
@ -36,10 +37,7 @@ class My extends MyPlugin
|
||||
|
||||
public static function checkCustomContext(int $context): ?bool
|
||||
{
|
||||
return match ($context) {
|
||||
// Limit to super admin
|
||||
self::MODULE => App::auth()->isSuperAdmin(),
|
||||
default => null,
|
||||
};
|
||||
// Only backend and super admin
|
||||
return $context === self::INSTALL ? null : App::task()->checkContext('BACKEND') && App::auth()->isSuperAdmin();
|
||||
}
|
||||
}
|
||||
|
@ -9,71 +9,36 @@ namespace Dotclear\Plugin\pacKman;
|
||||
* @ingroup pacKman
|
||||
*
|
||||
* @author Jean-Christian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Settings
|
||||
{
|
||||
/**
|
||||
* Remove comments from files.
|
||||
*
|
||||
* @var bool $pack_nocomment
|
||||
*/
|
||||
// Remove comments from files
|
||||
public readonly bool $pack_nocomment;
|
||||
|
||||
/**
|
||||
* Remove comments from files.
|
||||
*
|
||||
* @var bool $pack_fixnewline
|
||||
*/
|
||||
// Remove comments from files
|
||||
public readonly bool $pack_fixnewline;
|
||||
|
||||
/**
|
||||
* Overwrite existing package.
|
||||
*
|
||||
* @var bool $pack_overwrite
|
||||
*/
|
||||
// Overwrite existing package
|
||||
public readonly bool $pack_overwrite;
|
||||
|
||||
/**
|
||||
* Name of package.
|
||||
*
|
||||
* @var string $pack_filename
|
||||
*/
|
||||
// Name of package
|
||||
public readonly string $pack_filename;
|
||||
|
||||
/**
|
||||
* Name of second package.
|
||||
*
|
||||
* @var string $secondpack_filename
|
||||
*/
|
||||
// Name of second package
|
||||
public readonly string $secondpack_filename;
|
||||
|
||||
/**
|
||||
* Path to package repository.
|
||||
*
|
||||
* @var string $pack_repository
|
||||
*/
|
||||
// Path to package repository
|
||||
public readonly string $pack_repository;
|
||||
|
||||
/**
|
||||
* Seperate themes and plugins repository.
|
||||
*
|
||||
* @var bool $pack_typedrepo
|
||||
*/
|
||||
// Seperate themes and plugins repository
|
||||
public readonly bool $pack_typedrepo;
|
||||
|
||||
/**
|
||||
* Extra files to exclude from package.
|
||||
*
|
||||
* @var string $pack_excludefiles
|
||||
*/
|
||||
// Extra files to exclude from package
|
||||
public readonly string $pack_excludefiles;
|
||||
|
||||
/**
|
||||
* Hide distributed modules from lists.
|
||||
*
|
||||
* @var bool $hide_distrib
|
||||
*/
|
||||
// Hide distributed modules from lists
|
||||
public readonly bool $hide_distrib;
|
||||
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@ use Dotclear\Plugin\Uninstaller\Uninstaller;
|
||||
* @ingroup pacKman
|
||||
*
|
||||
* @author Jean-Christian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Uninstall extends Process
|
||||
|
@ -29,6 +29,7 @@ use Exception;
|
||||
* @ingroup pacKman
|
||||
*
|
||||
* @author Jean-Christian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Utils
|
||||
@ -98,7 +99,7 @@ class Utils
|
||||
/**
|
||||
* Get modules list form.
|
||||
*
|
||||
* @param array<int|string, mixed> $modules The modules
|
||||
* @param array<int,ModuleDefine> $modules The modules
|
||||
* @param string $type The modules type
|
||||
* @param string $title The list title
|
||||
*
|
||||
@ -116,9 +117,6 @@ class Utils
|
||||
$tbody = [];
|
||||
self::sort($modules);
|
||||
foreach ($modules as $module) {
|
||||
if (!is_a($module, ModuleDefine::class)) {
|
||||
continue;
|
||||
}
|
||||
$tbody[] = (new Para(null, 'tr'))
|
||||
->class('line')
|
||||
->items([
|
||||
|
@ -12,6 +12,7 @@ namespace Dotclear\Plugin\pacKman;
|
||||
* to tweak writeFile method.
|
||||
*
|
||||
* @author Jean-Christian Denis
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Zip extends \Dotclear\Helper\File\Zip\Zip
|
||||
|
Loading…
Reference in New Issue
Block a user