Compare commits
No commits in common. "master" and "v2023.10.11" have entirely different histories.
master
...
v2023.10.1
|
@ -1,9 +1,3 @@
|
||||||
dcLatestVersions 2023.10.15
|
|
||||||
===========================================================
|
|
||||||
* Require Dotclear 2.28
|
|
||||||
* Require PHP 8.1
|
|
||||||
* Cosmetic clean
|
|
||||||
|
|
||||||
dcLatestVersions 2023.10.11
|
dcLatestVersions 2023.10.11
|
||||||
===========================================================
|
===========================================================
|
||||||
* Require Dotclear 2.28
|
* Require Dotclear 2.28
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# README
|
# README
|
||||||
|
|
||||||
[![Release](https://img.shields.io/badge/release-2023.10.15-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/dcLatestVersions/releases)
|
[![Release](https://img.shields.io/badge/release-2023.10.11-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/dcLatestVersions/releases)
|
||||||
![Date](https://img.shields.io/badge/date-2023.10.15-c44d58.svg)
|
![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)
|
[![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/dcLatestVersions)
|
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/dcLatestVersions)
|
||||||
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/dcLatestVersions/src/branch/master/LICENSE)
|
[![License](https://img.shields.io/github/license/JcDenis/dcLatestVersions)](https://git.dotclear.watch/JcDenis/dcLatestVersions/blob/master/LICENSE)
|
||||||
|
|
||||||
## ABOUT
|
## ABOUT
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@ _dcLatestVersions_ is a plugin for the open-source web publishing software calle
|
||||||
|
|
||||||
## REQUIREMENTS
|
## REQUIREMENTS
|
||||||
|
|
||||||
|
* permissions to manage widgets
|
||||||
* Dotclear 2.28
|
* Dotclear 2.28
|
||||||
* PHP 8.1
|
* PHP 8.1
|
||||||
* Dotclear permissions to manage widgets
|
|
||||||
|
|
||||||
## USAGE
|
## USAGE
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ $this->registerModule(
|
||||||
"Dotclear's latest versions",
|
"Dotclear's latest versions",
|
||||||
'Show the latest available versions of Dotclear',
|
'Show the latest available versions of Dotclear',
|
||||||
'Jean-Christian Denis, Pierre Van Glabeke',
|
'Jean-Christian Denis, Pierre Van Glabeke',
|
||||||
'2023.10.15',
|
'2023.10.11',
|
||||||
[
|
[
|
||||||
'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="dcLatestVersions">
|
<module id="dcLatestVersions">
|
||||||
<name>Dotclear's latest versions</name>
|
<name>Dotclear's latest versions</name>
|
||||||
<version>2023.10.15</version>
|
<version>2023.10.11</version>
|
||||||
<author>Jean-Christian Denis, Pierre Van Glabeke</author>
|
<author>Jean-Christian Denis, Pierre Van Glabeke</author>
|
||||||
<desc>Show the latest available versions of Dotclear</desc>
|
<desc>Show the latest available versions of Dotclear</desc>
|
||||||
<file>https://git.dotclear.watch/JcDenis/dcLatestVersions/releases/download/v2023.10.15/plugin-dcLatestVersions.zip</file>
|
<file>https://git.dotclear.watch/JcDenis/dcLatestVersions/releases/download/v2023.10.11/plugin-dcLatestVersions.zip</file>
|
||||||
<da:dcmin>2.28</da:dcmin>
|
<da:dcmin>2.28</da:dcmin>
|
||||||
<da:details>https://git.dotclear.watch/JcDenis/dcLatestVersions/src/branch/master/README.md</da:details>
|
<da:details>https://git.dotclear.watch/JcDenis/dcLatestVersions/src/branch/master/README.md</da:details>
|
||||||
<da:support>https://git.dotclear.watch/JcDenis/dcLatestVersions/issues</da:support>
|
<da:support>https://git.dotclear.watch/JcDenis/dcLatestVersions/issues</da:support>
|
||||||
|
|
|
@ -37,11 +37,13 @@ class Backend extends Process
|
||||||
}
|
}
|
||||||
|
|
||||||
App::behavior()->addBehaviors([
|
App::behavior()->addBehaviors([
|
||||||
'initWidgets' => Widgets::initWidgets(...),
|
'initWidgets' => [Widgets::class, 'initWidgets'],
|
||||||
'adminDashboardItemsV2' => function (ArrayObject $__dashboard_items): void {
|
'adminDashboardItemsV2' => function (ArrayObject $__dashboard_items): void {
|
||||||
if (!App::blog()->isDefined()
|
if (!App::blog()->isDefined()) {
|
||||||
|| !My::prefs()->get('dashboard_items')
|
return;
|
||||||
) {
|
}
|
||||||
|
|
||||||
|
if (!My::prefs()->get('dashboard_items')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,9 @@ class Frontend extends Process
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
App::behavior()->addBehavior('initWidgets', Widgets::initWidgets(...));
|
App::behavior()->addBehaviors([
|
||||||
|
'initWidgets' => [Widgets::class, 'initWidgets'],
|
||||||
|
]);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ class Widgets
|
||||||
->create(
|
->create(
|
||||||
My::id() . 'widget',
|
My::id() . 'widget',
|
||||||
My::name(),
|
My::name(),
|
||||||
self::parseWidget(...),
|
[self::class, 'parseWidget'],
|
||||||
null,
|
null,
|
||||||
__('Show the latest available versions of Dotclear')
|
__('Show the latest available versions of Dotclear')
|
||||||
)
|
)
|
||||||
|
@ -47,11 +47,12 @@ class Widgets
|
||||||
|
|
||||||
public static function parseWidget(WidgetsElement $w): string
|
public static function parseWidget(WidgetsElement $w): string
|
||||||
{
|
{
|
||||||
if ($w->__get('offline')
|
if ($w->__get('offline') || !$w->checkHomeOnly(App::url()->type) || $w->__get('text') == '') {
|
||||||
|| !$w->checkHomeOnly(App::url()->type)
|
return '';
|
||||||
|| $w->__get('text') == ''
|
}
|
||||||
|| !App::blog()->isDefined()
|
|
||||||
) {
|
// nullsafe PHP < 8.0
|
||||||
|
if (!App::blog()->isDefined()) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue