Compare commits

...

4 Commits
v2.5 ... master

Author SHA1 Message Date
Jean-Christian Paul Denis 88846242a1
release 2.5.1 2023-11-04 10:47:35 +01:00
Jean-Christian Paul Denis 9fb14131a8
review permissions 2023-11-04 10:42:35 +01:00
Jean-Christian Paul Denis af0c73045e
fix typo 2023-11-04 10:34:10 +01:00
Jean-Christian Paul Denis ac4a877b75
use app cache 2023-11-04 10:32:56 +01:00
8 changed files with 21 additions and 12 deletions

View File

@ -1,3 +1,11 @@
arlequin 2.5.1 - 2023.11.04
===========================================================
* Require Dotclear 2.28
* Require PHP 8.1
* Use last minute Dotclear 2.28 changes
* Fix typo
* Fix permissions
arlequin 2.5 - 2023.10.15 arlequin 2.5 - 2023.10.15
=========================================================== ===========================================================
* Require Dotclear 2.28 * Require Dotclear 2.28

View File

@ -1,7 +1,7 @@
# README # README
[![Release](https://img.shields.io/badge/release-2.5-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/arlequin/releases) [![Release](https://img.shields.io/badge/release-2.5.1-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/arlequin/releases)
![Date](https://img.shields.io/badge/date-2023.10.15-c44d58.svg)] ![Date](https://img.shields.io/badge/date-2023.11.04-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/arlequin) [![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/arlequin)
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/arlequin/src/branch/master/LICENSE) [![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/arlequin/src/branch/master/LICENSE)

View File

@ -18,7 +18,7 @@ $this->registerModule(
'Arlequin', 'Arlequin',
'Allows visitors choose a theme', 'Allows visitors choose a theme',
'Oleksandr Syenchuk, Pierre Van Glabeke and contributors', 'Oleksandr Syenchuk, Pierre Van Glabeke and contributors',
'2.5', '2.5.1',
[ [
'requires' => [['core', '2.28']], 'requires' => [['core', '2.28']],
'permissions' => 'My', 'permissions' => 'My',

View File

@ -2,10 +2,10 @@
<modules xmlns:da="http://dotaddict.org/da/"> <modules xmlns:da="http://dotaddict.org/da/">
<module id="arlequin"> <module id="arlequin">
<name>Arlequin</name> <name>Arlequin</name>
<version>2.5</version> <version>2.5.1</version>
<author>Oleksandr Syenchuk, Pierre Van Glabeke and contributors</author> <author>Oleksandr Syenchuk, Pierre Van Glabeke and contributors</author>
<desc>Allows visitors choose a theme</desc> <desc>Allows visitors choose a theme</desc>
<file>https://git.dotclear.watch/JcDenis/arlequin/releases/download/v2.5/plugin-arlequin.zip</file> <file>https://git.dotclear.watch/JcDenis/arlequin/releases/download/v2.5.1/plugin-arlequin.zip</file>
<da:dcmin>2.28</da:dcmin> <da:dcmin>2.28</da:dcmin>
<da:details>https://git.dotclear.watch/JcDenis/arlequin/src/branch/master/README.md</da:details> <da:details>https://git.dotclear.watch/JcDenis/arlequin/src/branch/master/README.md</da:details>
<da:support>https://git.dotclear.watch/JcDenis/arlequin/issues</da:support> <da:support>https://git.dotclear.watch/JcDenis/arlequin/issues</da:support>

View File

@ -43,7 +43,7 @@ class Backend extends Process
]), ]),
]); ]);
}, },
# 'initWidgets' => Widgets::initWidgets(...), 'initWidgets' => Widgets::initWidgets(...),
]); ]);
return true; return true;

View File

@ -61,7 +61,7 @@ class Frontend extends Process
App::behavior()->addBehaviors([ App::behavior()->addBehaviors([
'publicBeforeDocumentV2' => self::adjustCache(...), 'publicBeforeDocumentV2' => self::adjustCache(...),
# 'initWidgets' => Widgets::initWidgets(...), 'initWidgets' => Widgets::initWidgets(...),
]); ]);
return true; return true;
@ -75,7 +75,7 @@ class Frontend extends Process
public static function adjustCache(): void public static function adjustCache(): void
{ {
if (!empty($_COOKIE[self::COOKIE_UPDDT_PREFIX . self::cookieSuffix()])) { if (!empty($_COOKIE[self::COOKIE_UPDDT_PREFIX . self::cookieSuffix()])) {
App::frontend()->cache()->addTime((int) $_COOKIE[self::COOKIE_UPDDT_PREFIX . self::cookieSuffix()]); App::cache()->addTime((int) $_COOKIE[self::COOKIE_UPDDT_PREFIX . self::cookieSuffix()]);
} }
} }

View File

@ -159,17 +159,17 @@ class Manage extends Process
(new Div())->class('two-boxes even')->items([ (new Div())->class('two-boxes even')->items([
(new Para())->items([ (new Para())->items([
(new Label(__('Item HTML code:'), Label::OUTSIDE_LABEL_BEFORE))->for('e_html'), (new Label(__('Item HTML code:'), Label::OUTSIDE_LABEL_BEFORE))->for('e_html'),
(new Input('e_html'))->size(50)->maxlenght(200)->value(Html::escapeHTML($model['e_html'])), (new Input('e_html'))->size(50)->maxlength(200)->value(Html::escapeHTML($model['e_html'])),
]), ]),
(new Para())->items([ (new Para())->items([
(new Label(__('Active item HTML code:'), Label::OUTSIDE_LABEL_BEFORE))->for('a_html'), (new Label(__('Active item HTML code:'), Label::OUTSIDE_LABEL_BEFORE))->for('a_html'),
(new Input('a_html'))->size(50)->maxlenght(200)->value(Html::escapeHTML($model['a_html'])), (new Input('a_html'))->size(50)->maxlength(200)->value(Html::escapeHTML($model['a_html'])),
]), ]),
]), ]),
(new Div())->class('two-boxes odd')->items([ (new Div())->class('two-boxes odd')->items([
(new Para())->items([ (new Para())->items([
(new Label(__('Excluded themes:'), Label::OUTSIDE_LABEL_BEFORE))->for('exclude'), (new Label(__('Excluded themes:'), Label::OUTSIDE_LABEL_BEFORE))->for('exclude'),
(new Input('exclude'))->size(50)->maxlenght(200)->value(Html::escapeHTML($s->get('exclude'))), (new Input('exclude'))->size(50)->maxlength(200)->value(Html::escapeHTML($s->get('exclude'))),
]), ]),
(new Note())->class('form-note')->text('Semicolon separated list of themes IDs (theme folder name). Ex: ductile;berlin'), (new Note())->class('form-note')->text('Semicolon separated list of themes IDs (theme folder name). Ex: ductile;berlin'),
]), ]),

View File

@ -20,7 +20,8 @@ class My extends MyPlugin
public static function checkCustomContext(int $context): ?bool public static function checkCustomContext(int $context): ?bool
{ {
return match ($context) { return match ($context) {
self::BACKEND, self::MANAGE, self::MENU => App::task()->checkContext('BACKEND') // Add content admin to backend
self::MANAGE, self::MENU => App::task()->checkContext('BACKEND')
&& App::auth()->check(App::auth()->makePermissions([ && App::auth()->check(App::auth()->makePermissions([
App::auth()::PERMISSION_CONTENT_ADMIN, App::auth()::PERMISSION_CONTENT_ADMIN,
]), App::blog()->id()), ]), App::blog()->id()),