release 2023.07.29

This commit is contained in:
Jean-Christian Denis 2023-07-29 11:04:22 +02:00
parent 578654653a
commit 46b22e1e0c
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
8 changed files with 47 additions and 26 deletions

View file

@ -1,3 +1,8 @@
2023.07.29
- require Dotclear 2.27
- require PHP 7.4+
- update to Dotclear 2.27-dev
2023.04.23 2023.04.23
- require Dotclear 2.26 - require Dotclear 2.26
- use latest dotclear namespace - use latest dotclear namespace

View file

@ -3,7 +3,7 @@
[![Release](https://img.shields.io/github/v/release/JcDenis/simplyFavicon)](https://github.com/JcDenis/simplyFavicon/releases) [![Release](https://img.shields.io/github/v/release/JcDenis/simplyFavicon)](https://github.com/JcDenis/simplyFavicon/releases)
[![Date](https://img.shields.io/github/release-date/JcDenis/simplyFavicon)](https://github.com/JcDenis/simplyFavicon/releases) [![Date](https://img.shields.io/github/release-date/JcDenis/simplyFavicon)](https://github.com/JcDenis/simplyFavicon/releases)
[![Issues](https://img.shields.io/github/issues/JcDenis/simplyFavicon)](https://github.com/JcDenis/simplyFavicon/issues) [![Issues](https://img.shields.io/github/issues/JcDenis/simplyFavicon)](https://github.com/JcDenis/simplyFavicon/issues)
[![Dotclear](https://img.shields.io/badge/dotclear-v2.26-blue.svg)](https://fr.dotclear.org/download) [![Dotclear](https://img.shields.io/badge/dotclear-v2.27-blue.svg)](https://fr.dotclear.org/download)
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-green.svg)](https://plugins.dotaddict.org/dc2/details/simplyFavicon) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-green.svg)](https://plugins.dotaddict.org/dc2/details/simplyFavicon)
[![License](https://img.shields.io/github/license/JcDenis/simplyFavicon)](https://github.com/JcDenis/simplyFavicon/blob/master/LICENSE) [![License](https://img.shields.io/github/license/JcDenis/simplyFavicon)](https://github.com/JcDenis/simplyFavicon/blob/master/LICENSE)
@ -19,7 +19,8 @@ It adds a favicon to your blog.
_simplyFavicon_ requires: _simplyFavicon_ requires:
* Administrator permissions * Administrator permissions
* Dotclear 2.26 * Dotclear 2.27
* PHP 7.4+
* A readable public directory. * A readable public directory.
## USAGE ## USAGE

View file

@ -10,7 +10,7 @@
* @copyright Jean-Christian Denis * @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/ */
if (!defined('DC_RC_PATH') || is_null(dcCore::app()->auth)) { if (!defined('DC_RC_PATH')) {
return; return;
} }
@ -18,9 +18,9 @@ $this->registerModule(
'Simply favicon', 'Simply favicon',
'Multi-agents favicon', 'Multi-agents favicon',
'Jean-Christian Denis', 'Jean-Christian Denis',
'2023.04.23', '2023.07.29',
[ [
'requires' => [['core', '2.26']], 'requires' => [['core', '2.27']],
'permissions' => dcCore::app()->auth->makePermissions([ 'permissions' => dcCore::app()->auth->makePermissions([
dcCore::app()->auth::PERMISSION_ADMIN, dcCore::app()->auth::PERMISSION_ADMIN,
]), ]),

View file

@ -2,11 +2,11 @@
<modules xmlns:da="http://dotaddict.org/da/"> <modules xmlns:da="http://dotaddict.org/da/">
<module id="simplyFavicon"> <module id="simplyFavicon">
<name>Simply favicon</name> <name>Simply favicon</name>
<version>2023.04.23</version> <version>2023.07.29</version>
<author>Jean-Christian Denis</author> <author>Jean-Christian Denis</author>
<desc>Multi-agents favicon</desc> <desc>Multi-agents favicon</desc>
<file>https://github.com/JcDenis/simplyFavicon/releases/download/v2023.04.23/plugin-simplyFavicon.zip</file> <file>https://github.com/JcDenis/simplyFavicon/releases/download/v2023.07.29/plugin-simplyFavicon.zip</file>
<da:dcmin>2.26</da:dcmin> <da:dcmin>2.27</da:dcmin>
<da:details>http://plugins.dotaddict.org/dc2/details/simplyFavicon</da:details> <da:details>http://plugins.dotaddict.org/dc2/details/simplyFavicon</da:details>
<da:support>https://github.com/JcDenis/simplyFavicon</da:support> <da:support>https://github.com/JcDenis/simplyFavicon</da:support>
</module> </module>

View file

@ -15,8 +15,8 @@ declare(strict_types=1);
namespace Dotclear\Plugin\simplyFavicon; namespace Dotclear\Plugin\simplyFavicon;
use dcCore; use dcCore;
use dcNsProcess;
use dcSettings; use dcSettings;
use Dotclear\Core\Process;
use Dotclear\Helper\File\Path; use Dotclear\Helper\File\Path;
use Dotclear\Helper\Html\Form\{ use Dotclear\Helper\Html\Form\{
Checkbox, Checkbox,
@ -26,18 +26,16 @@ use Dotclear\Helper\Html\Form\{
Para Para
}; };
class Backend extends dcNsProcess class Backend extends Process
{ {
public static function init(): bool public static function init(): bool
{ {
static::$init = defined('DC_CONTEXT_ADMIN'); return self::status(My::checkContext(My::BACKEND));
return static::$init;
} }
public static function process(): bool public static function process(): bool
{ {
if (!static::$init) { if (!self::status()) {
return false; return false;
} }

View file

@ -15,21 +15,19 @@ declare(strict_types=1);
namespace Dotclear\Plugin\simplyFavicon; namespace Dotclear\Plugin\simplyFavicon;
use dcCore; use dcCore;
use dcNsProcess; use Dotclear\Core\Process;
use Dotclear\Helper\File\Path; use Dotclear\Helper\File\Path;
class Frontend extends dcNsProcess class Frontend extends Process
{ {
public static function init(): bool public static function init(): bool
{ {
static::$init = defined('DC_RC_PATH'); return self::status(My::checkContext(My::FRONTEND));
return static::$init;
} }
public static function process(): bool public static function process(): bool
{ {
if (!static::$init) { if (!self::status()) {
return false; return false;
} }

21
src/My.php Normal file
View file

@ -0,0 +1,21 @@
<?php
/**
* @brief simplyFavicon, 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);
namespace Dotclear\Plugin\simplyFavicon;
use Dotclear\Module\MyPlugin;
class My extends MyPlugin
{
}

View file

@ -15,20 +15,18 @@ declare(strict_types=1);
namespace Dotclear\Plugin\simplyFavicon; namespace Dotclear\Plugin\simplyFavicon;
use dcCore; use dcCore;
use dcNsProcess; use Dotclear\Core\Process;
class Prepend extends dcNsProcess class Prepend extends Process
{ {
public static function init(): bool public static function init(): bool
{ {
static::$init = true; return self::status(My::checkContext(My::PREPEND));
return static::$init;
} }
public static function process(): bool public static function process(): bool
{ {
if (!static::$init) { if (!self::status()) {
return false; return false;
} }