Compare commits
No commits in common. "master" and "v2.5" have entirely different histories.
|
@ -1,11 +1,3 @@
|
||||||
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
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# README
|
# README
|
||||||
|
|
||||||
[![Release](https://img.shields.io/badge/release-2.5.1-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/arlequin/releases)
|
[![Release](https://img.shields.io/badge/release-2.5-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/arlequin/releases)
|
||||||
![Date](https://img.shields.io/badge/date-2023.11.04-c44d58.svg)]
|
![Date](https://img.shields.io/badge/date-2023.10.15-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)
|
||||||
|
|
|
@ -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.1',
|
'2.5',
|
||||||
[
|
[
|
||||||
'requires' => [['core', '2.28']],
|
'requires' => [['core', '2.28']],
|
||||||
'permissions' => 'My',
|
'permissions' => 'My',
|
||||||
|
|
|
@ -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.1</version>
|
<version>2.5</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.1/plugin-arlequin.zip</file>
|
<file>https://git.dotclear.watch/JcDenis/arlequin/releases/download/v2.5/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>
|
||||||
|
|
|
@ -43,7 +43,7 @@ class Backend extends Process
|
||||||
]),
|
]),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
'initWidgets' => Widgets::initWidgets(...),
|
# 'initWidgets' => Widgets::initWidgets(...),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -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::cache()->addTime((int) $_COOKIE[self::COOKIE_UPDDT_PREFIX . self::cookieSuffix()]);
|
App::frontend()->cache()->addTime((int) $_COOKIE[self::COOKIE_UPDDT_PREFIX . self::cookieSuffix()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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)->maxlength(200)->value(Html::escapeHTML($model['e_html'])),
|
(new Input('e_html'))->size(50)->maxlenght(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)->maxlength(200)->value(Html::escapeHTML($model['a_html'])),
|
(new Input('a_html'))->size(50)->maxlenght(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)->maxlength(200)->value(Html::escapeHTML($s->get('exclude'))),
|
(new Input('exclude'))->size(50)->maxlenght(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'),
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -20,8 +20,7 @@ class My extends MyPlugin
|
||||||
public static function checkCustomContext(int $context): ?bool
|
public static function checkCustomContext(int $context): ?bool
|
||||||
{
|
{
|
||||||
return match ($context) {
|
return match ($context) {
|
||||||
// Add content admin to backend
|
self::BACKEND, self::MANAGE, self::MENU => App::task()->checkContext('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()),
|
||||||
|
|
Loading…
Reference in New Issue