Compare commits

..

4 Commits

Author SHA1 Message Date
Jean-Christian Paul Denis a513a39717
release 1.2.3 2023-11-04 19:02:46 +01:00
Jean-Christian Paul Denis c534147fd1
use tpl appendPath 2023-11-04 19:02:17 +01:00
Jean-Christian Paul Denis acb524a48d
fix perms 2023-11-04 18:58:41 +01:00
Jean-Christian Paul Denis db564e6d21
fix typo 2023-11-04 18:58:21 +01:00
7 changed files with 18 additions and 11 deletions

View File

@ -1,3 +1,10 @@
noodles 1.2.3 - 2023.11.04
===========================================================
* Require Dotclear 2.28
* Require PHP 8.1
* Upgrade to last minute change to Dotclear 2.28
* Fix typo
noodles 1.2.2 - 2023.10.19
===========================================================
* Require Dotclear 2.28

View File

@ -1,7 +1,7 @@
# README
[![Release](https://img.shields.io/badge/release-1.2.2-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/noodles/releases)
![Date](https://img.shields.io/badge/date-2023.10.19-c44d58.svg)
[![Release](https://img.shields.io/badge/release-1.2.3-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/noodles/releases)
![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)
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/noodles)
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/noodles/src/branch/master/LICENSE)
@ -32,6 +32,7 @@ go to ''configure plugin'', fill in form.
* [Packages & details](https://git.dotclear.watch/JcDenis/noodles/releases) (or on [Dotaddict](https://plugins.dotaddict.org/dc2/details/noodles))
* [Sources & contributions](https://git.dotclear.watch/JcDenis/noodles) (or on [GitHub](https://github.com/JcDenis/noodles))
* [Issues & security](https://git.dotclear.watch/JcDenis/noodles/issues) (or on [GitHub](https://github.com/JcDenis/noodles/issues))
* [Discuss & help](https://forum.dotclear.org/viewtopic.php?id=39993)
## CONTRIBUTORS

View File

@ -17,7 +17,7 @@ $this->registerModule(
'Noodles',
'Add users gravatars everywhere',
'Jean-Christian Denis and contributors',
'1.2.2',
'1.2.3',
[
'requires' => [['core', '2.28']],
'permissions' => 'My',

View File

@ -2,10 +2,10 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="noodles">
<name>Noodles</name>
<version>1.2.2</version>
<version>1.2.3</version>
<author>Jean-Christian Denis and contributors</author>
<desc>Add users gravatars everywhere</desc>
<file>https://git.dotclear.watch/JcDenis/noodles/releases/download/v1.2.2/plugin-noodles.zip</file>
<file>https://git.dotclear.watch/JcDenis/noodles/releases/download/v1.2.3/plugin-noodles.zip</file>
<da:dcmin>2.28</da:dcmin>
<da:details>https://git.dotclear.watch/JcDenis/noodles/src/branch/master/README.md</da:details>
<da:support>https://git.dotclear.watch/JcDenis/noodles/issues</da:support>

View File

@ -33,7 +33,7 @@ class Frontend extends Process
return false;
}
App::frontend()->template()->setPath(App::frontend()->template()->getPath(), My::path() . '/default-templates');
App::frontend()->template()->appendPath(My::path() . '/default-templates');
foreach ($targets->dump() as $target) {
if ($target->active() && $target->hasPhpCallback()) {

View File

@ -179,9 +179,9 @@ class Manage extends Process
'<img alt="nok" src="images/check-off.png" />'
) . '</td>
<td><img alt="ok" src="images/check-on.png" /></td>
<td>' . (new Input(['noodle[' . $target->id . '][target]']))->size(20)->maxlenght(255)->value($target->target())->render() . '</td>
<td>' . (new Input(['noodle[' . $target->id . '][target]']))->size(20)->maxlength(255)->value($target->target())->render() . '</td>
<td>' . (new Select(['noodle[' . $target->id . '][place]']))->items(Combo::place())->default($target->place())->render() . '</td>
<td>' . (new Input(['noodle[' . $target->id . '][css]']))->size(20)->maxlenght(255)->value($target->css())->render() . '</td>
<td>' . (new Input(['noodle[' . $target->id . '][css]']))->size(20)->maxlength(255)->value($target->css())->render() . '</td>
<td> .noodles-' . $target->id . '{}</td>
</tr>';
}

View File

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