release 2023.10.11

main v2023.10.11
Jean-Christian Paul Denis 2023-10-10 23:37:45 +02:00
parent c5ce39d983
commit bee9b19cfc
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
11 changed files with 119 additions and 91 deletions

View File

@ -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

View File

@ -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

View File

@ -1,31 +1,32 @@
<?php
/**
* @brief myUrlHandlers, a plugin for Dotclear 2
* @file
* @brief The plugin myUrlHandlers definition
* @ingroup myUrlHandlers
*
* @package Dotclear
* @subpackage Plugin
* @defgroup myUrlHandlers Plugin myUrlHandlers.
*
* @author Alex Pirine and contributors
* Change Dotclear URL handlers.
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
* @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
*/
use Dotclear\App;
declare(strict_types=1);
$this->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',
]
);

View File

@ -2,11 +2,11 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="myUrlHandlers">
<name>URL handlers</name>
<version>2023.08.13</version>
<version>2023.10.11</version>
<author>Alex Pirine and contributors</author>
<desc>Change Dotclear URL handlers</desc>
<file>https://github.com/JcDenis/myUrlHandlers/releases/download/v2023.08.13/plugin-myUrlHandlers.zip</file>
<da:dcmin>2.27</da:dcmin>
<file>https://git.dotclear.watch/JcDenis/myUrlHandlers/releases/download/v2023.10.11/plugin-myUrlHandlers.zip</file>
<da:dcmin>2.28</da:dcmin>
<da:details>https://git.dotclear.watch/JcDenis/myUrlHandlers/src/branch/master/README.md</da:details>
<da:support>https://git.dotclear.watch/JcDenis/myUrlHandlers/issues</da:support>
</module>

View File

@ -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

View File

@ -1,15 +1,5 @@
<?php
/**
* @brief myUrlHandlers, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Alex Pirine and contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
declare(strict_types=1);
namespace Dotclear\Plugin\myUrlHandlers;
@ -17,6 +7,15 @@ namespace Dotclear\Plugin\myUrlHandlers;
use Dotclear\App;
use Dotclear\Core\Process;
/**
* @brief myUrlHandlers installation 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 Install extends Process
{
public static function init(): bool

View File

@ -1,15 +1,5 @@
<?php
/**
* @brief myUrlHandlers, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Alex Pirine and contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
declare(strict_types=1);
namespace Dotclear\Plugin\myUrlHandlers;
@ -26,7 +16,13 @@ use Dotclear\Helper\Text;
use Exception;
/**
* Manage contributions list
* @brief myUrlHandlers manage 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 Manage extends Process
{

View File

@ -1,23 +1,43 @@
<?php
/**
* @brief myUrlHandlers, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Alex Pirine and contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
declare(strict_types=1);
namespace Dotclear\Plugin\myUrlHandlers;
use Dotclear\App;
use Dotclear\Module\MyPlugin;
/**
* @brief myUrlHandlers My helper.
* @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 My extends MyPlugin
{
/** @var string This module settings ID */
/**
* This module settings ID.
*
* @var string NS_SETTING_ID
*/
public const NS_SETTING_ID = 'handlers';
public static function checkCustomContext(int $context): ?bool
{
return match ($context) {
// Whole module: Limit backend to registered user and pages user
self::MODULE => !App::task()->checkContext('BACKEND')
|| (
App::blog()->isDefined()
&& App::auth()->check(App::auth()->makePermissions([
App::auth()::PERMISSION_CONTENT_ADMIN,
]), App::blog()->id())
),
default => null,
};
}
}

View File

@ -1,15 +1,5 @@
<?php
/**
* @brief myUrlHandlers, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Alex Pirine and contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
declare(strict_types=1);
namespace Dotclear\Plugin\myUrlHandlers;
@ -17,6 +7,15 @@ namespace Dotclear\Plugin\myUrlHandlers;
use Dotclear\App;
use Dotclear\Core\PostType;
/**
* @brief myUrlHandlers main 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 MyUrlHandlers
{
/**

View File

@ -1,21 +1,20 @@
<?php
/**
* @brief myUrlHandlers, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Alex Pirine and contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
declare(strict_types=1);
namespace Dotclear\Plugin\myUrlHandlers;
use Dotclear\Core\Process;
/**
* @brief myUrlHandlers prepend 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 Prepend extends Process
{
public static function init(): bool

View File

@ -1,15 +1,5 @@
<?php
/**
* @brief myUrlHandlers, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Alex Pirine and contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
declare(strict_types=1);
namespace Dotclear\Plugin\myUrlHandlers;
@ -17,6 +7,15 @@ namespace Dotclear\Plugin\myUrlHandlers;
use Dotclear\Core\Process;
use Dotclear\Plugin\Uninstaller\Uninstaller;
/**
* @brief myUrlHandlers uninstall 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 Uninstall extends Process
{
public static function init(): bool