Compare commits
1 Commits
v2023.10.1
...
master
Author | SHA1 | Date |
---|---|---|
Jean-Christian Paul Denis | 15d8761bed |
|
@ -1,3 +1,9 @@
|
||||||
|
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.11-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/dcLatestVersions/releases)
|
[![Release](https://img.shields.io/badge/release-2023.10.15-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/dcLatestVersions/releases)
|
||||||
![Date](https://img.shields.io/badge/date-2023.10.11-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/dcLatestVersions)
|
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/dcLatestVersions)
|
||||||
[![License](https://img.shields.io/github/license/JcDenis/dcLatestVersions)](https://git.dotclear.watch/JcDenis/dcLatestVersions/blob/master/LICENSE)
|
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/dcLatestVersions/src/branch/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.11',
|
'2023.10.15',
|
||||||
[
|
[
|
||||||
'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.11</version>
|
<version>2023.10.15</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.11/plugin-dcLatestVersions.zip</file>
|
<file>https://git.dotclear.watch/JcDenis/dcLatestVersions/releases/download/v2023.10.15/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>
|
||||||
|
|
|
@ -16,8 +16,8 @@ use Dotclear\Helper\Html\Form\{
|
||||||
use Dotclear\Helper\Html\Html;
|
use Dotclear\Helper\Html\Html;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief dcLatestVersions backend class.
|
* @brief dcLatestVersions backend class.
|
||||||
* @ingroup dcLatestVersions
|
* @ingroup dcLatestVersions
|
||||||
*
|
*
|
||||||
* @author Jean-Christian Denis
|
* @author Jean-Christian Denis
|
||||||
* @copyright Jean-Christian Denis
|
* @copyright Jean-Christian Denis
|
||||||
|
@ -37,13 +37,11 @@ class Backend extends Process
|
||||||
}
|
}
|
||||||
|
|
||||||
App::behavior()->addBehaviors([
|
App::behavior()->addBehaviors([
|
||||||
'initWidgets' => [Widgets::class, 'initWidgets'],
|
'initWidgets' => Widgets::initWidgets(...),
|
||||||
'adminDashboardItemsV2' => function (ArrayObject $__dashboard_items): void {
|
'adminDashboardItemsV2' => function (ArrayObject $__dashboard_items): void {
|
||||||
if (!App::blog()->isDefined()) {
|
if (!App::blog()->isDefined()
|
||||||
return;
|
|| !My::prefs()->get('dashboard_items')
|
||||||
}
|
) {
|
||||||
|
|
||||||
if (!My::prefs()->get('dashboard_items')) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ use Dotclear\App;
|
||||||
use Dotclear\Core\Process;
|
use Dotclear\Core\Process;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief dcLatestVersions frontend class.
|
* @brief dcLatestVersions frontend class.
|
||||||
* @ingroup dcLatestVersions
|
* @ingroup dcLatestVersions
|
||||||
*
|
*
|
||||||
* @author Jean-Christian Denis
|
* @author Jean-Christian Denis
|
||||||
* @copyright Jean-Christian Denis
|
* @copyright Jean-Christian Denis
|
||||||
|
@ -28,9 +28,7 @@ class Frontend extends Process
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
App::behavior()->addBehaviors([
|
App::behavior()->addBehavior('initWidgets', Widgets::initWidgets(...));
|
||||||
'initWidgets' => [Widgets::class, 'initWidgets'],
|
|
||||||
]);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@ namespace Dotclear\Plugin\dcLatestVersions;
|
||||||
use Dotclear\Core\Process;
|
use Dotclear\Core\Process;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief dcLatestVersions installation class.
|
* @brief dcLatestVersions installation class.
|
||||||
* @ingroup dcLatestVersions
|
* @ingroup dcLatestVersions
|
||||||
*
|
*
|
||||||
* @author Jean-Christian Denis
|
* @author Jean-Christian Denis
|
||||||
* @copyright Jean-Christian Denis
|
* @copyright Jean-Christian Denis
|
||||||
|
|
|
@ -7,8 +7,8 @@ namespace Dotclear\Plugin\dcLatestVersions;
|
||||||
use Dotclear\Module\MyPlugin;
|
use Dotclear\Module\MyPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief dcLatestVersions My helper.
|
* @brief dcLatestVersions My helper.
|
||||||
* @ingroup dcLatestVersions
|
* @ingroup dcLatestVersions
|
||||||
*
|
*
|
||||||
* @author Jean-Christian Denis
|
* @author Jean-Christian Denis
|
||||||
* @copyright Jean-Christian Denis
|
* @copyright Jean-Christian Denis
|
||||||
|
|
|
@ -8,8 +8,8 @@ use Dotclear\Core\Process;
|
||||||
use Dotclear\Plugin\Uninstaller\Uninstaller;
|
use Dotclear\Plugin\Uninstaller\Uninstaller;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief dcLatestVersions uninstall class.
|
* @brief dcLatestVersions uninstall class.
|
||||||
* @ingroup dcLatestVersions
|
* @ingroup dcLatestVersions
|
||||||
*
|
*
|
||||||
* @author Jean-Christian Denis
|
* @author Jean-Christian Denis
|
||||||
* @copyright Jean-Christian Denis
|
* @copyright Jean-Christian Denis
|
||||||
|
|
|
@ -11,8 +11,8 @@ use Dotclear\Plugin\widgets\WidgetsStack;
|
||||||
use Dotclear\Plugin\widgets\WidgetsElement;
|
use Dotclear\Plugin\widgets\WidgetsElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief dcLatestVersions widgets class.
|
* @brief dcLatestVersions widgets class.
|
||||||
* @ingroup dcLatestVersions
|
* @ingroup dcLatestVersions
|
||||||
*
|
*
|
||||||
* @author Jean-Christian Denis
|
* @author Jean-Christian Denis
|
||||||
* @copyright Jean-Christian Denis
|
* @copyright Jean-Christian Denis
|
||||||
|
@ -26,7 +26,7 @@ class Widgets
|
||||||
->create(
|
->create(
|
||||||
My::id() . 'widget',
|
My::id() . 'widget',
|
||||||
My::name(),
|
My::name(),
|
||||||
[self::class, 'parseWidget'],
|
self::parseWidget(...),
|
||||||
null,
|
null,
|
||||||
__('Show the latest available versions of Dotclear')
|
__('Show the latest available versions of Dotclear')
|
||||||
)
|
)
|
||||||
|
@ -47,12 +47,11 @@ class Widgets
|
||||||
|
|
||||||
public static function parseWidget(WidgetsElement $w): string
|
public static function parseWidget(WidgetsElement $w): string
|
||||||
{
|
{
|
||||||
if ($w->__get('offline') || !$w->checkHomeOnly(App::url()->type) || $w->__get('text') == '') {
|
if ($w->__get('offline')
|
||||||
return '';
|
|| !$w->checkHomeOnly(App::url()->type)
|
||||||
}
|
|| $w->__get('text') == ''
|
||||||
|
|| !App::blog()->isDefined()
|
||||||
// nullsafe PHP < 8.0
|
) {
|
||||||
if (!App::blog()->isDefined()) {
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue