release 1.7

This commit is contained in:
Jean-Christian Paul Denis 2023-10-07 22:57:21 +02:00
parent 1bfd93f791
commit f96aec632d
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
8 changed files with 39 additions and 35 deletions

View File

@ -1,3 +1,9 @@
dcLog 1.7 - 2023.10.07
===========================================================
* Require Dotclear 2.28
* Require PHP 8.1
* Upgrade to Dotclear 2.28
dcLog 1.6 - 2023.08.14
===========================================================
* Require Dotclear 2.27

View File

@ -1,24 +1,21 @@
# README
[![Release](https://img.shields.io/badge/release-1.6-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/dcLog/releases)
[![Date](https://img.shields.io/badge/date-2023.08.14-c44d58.svg)](https://git.dotclear.watch/JcDenis/dcLog/releases)
[![Dotclear](https://img.shields.io/badge/dotclear-v2.27-137bbb.svg)](https://fr.dotclear.org/download)
[![Release](https://img.shields.io/badge/release-1.7-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/dcLog/releases)
![Date](https://img.shields.io/badge/date-2023.10.07-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/dcLog)
[![License](https://img.shields.io/github/license/JcDenis/dcLog)](https://git.dotclear.watch/JcDenis/dcLog/blob/master/LICENSE)
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/dcLog/src/branch/master/LICENSE)
## WHAT IS DCLOG ?
## ABOUT
_dcLog_ is a plugin for the open-source
web publishing software called Dotclear.
_dcLog_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
Display dotclear's logs.
> Display dotclear's logs.
## REQUIREMENTS
_dcLog_ requires:
* PHP 8.1+
* Dotclear 2.27
* Dotclear 2.28
* super admin permission
## USAGE
@ -31,9 +28,10 @@ Once it's done you can manage your logs from menu
## LINKS
* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html)
* Source & contribution : [Gitea Page](https://git.dotclear.watch/JcDenis/dcLog) or [GitHub Page](https://github.com/JcDenis/dcLog)
* Packages & details: [Gitea Page](https://git.dotclear.watch/JcDenis/dcLog/releases) or [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/dcLog)
* [License](https://git.dotclear.watch/JcDenis/dcLog/src/branch/master/LICENSE)
* [Packages & details](https://git.dotclear.watch/JcDenis/dcLog/releases) (or on [Dotaddict](https://plugins.dotaddict.org/dc2/details/dcLog))
* [Sources & contributions](https://git.dotclear.watch/JcDenis/dcLog) (or on [GitHub](https://github.com/JcDenis/dcLog))
* [Issues & security](https://git.dotclear.watch/JcDenis/dcLog/issues) (or on [GitHub](https://github.com/JcDenis/dcLog/issues))
## CONTRIBUTORS

View File

@ -18,11 +18,11 @@ $this->registerModule(
"Dotclear's logs",
'Displays Dotclear logs',
'Tomtom and Contributors',
'1.6',
'1.7',
[
'requires' => [
['php', '8.1'],
['core', '2.27'],
['core', '2.28'],
],
'permissions' => null,
'type' => 'plugin',

View File

@ -2,11 +2,11 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="dcLog">
<name>Dotclear's logs</name>
<version>1.6</version>
<version>1.7</version>
<author>Tomtom and Contributors</author>
<desc>Displays Dotclear logs</desc>
<file>https://git.dotclear.watch/JcDenis/dcLog/releases/download/v1.6/plugin-dcLog.zip</file>
<da:dcmin>2.27</da:dcmin>
<file>https://git.dotclear.watch/JcDenis/dcLog/releases/download/v1.7/plugin-dcLog.zip</file>
<da:dcmin>2.28</da:dcmin>
<da:details>https://git.dotclear.watch/JcDenis/dcLog/src/branch/master/README.md</da:details>
<da:support>https://git.dotclear.watch/JcDenis/dcLog/issues</da:support>
</module>

View File

@ -15,7 +15,7 @@ declare(strict_types=1);
namespace Dotclear\Plugin\dcLog;
use ArrayObject;
use dcCore;
use Dotclear\App;
use Dotclear\Core\Process;
use Dotclear\Core\Backend\Favorites;
use Dotclear\Core\Backend\Menus;
@ -35,7 +35,7 @@ class Backend extends Process
My::addBackendMenuItem(Menus::MENU_SYSTEM);
dcCore::app()->addBehaviors([
App::behavior()->addBehaviors([
// backend user preference for logs list columns
'adminColumnsListsV2' => function (ArrayObject $cols): void {
$cols[My::BACKEND_LIST_ID] = [

View File

@ -14,7 +14,7 @@ declare(strict_types=1);
namespace Dotclear\Plugin\dcLog;
use dcCore;
use Dotclear\App;
use Dotclear\Core\Process;
use Dotclear\Core\Backend\{
Notices,
@ -51,7 +51,11 @@ class Manage extends Process
// Delete logs
if ($current->selected_logs && !empty($current->entries) || $current->all_logs) {
try {
dcCore::app()->log->delLogs($current->entries, $current->all_logs);
if ($current->all_logs) {
App::log()->delAllLogs();
} else {
App::log()->delLogs($current->entries);
}
Notices::addSuccessNotice(
$current->all_logs ?
__('All logs have been successfully deleted') :
@ -59,7 +63,7 @@ class Manage extends Process
);
My::redirect();
} catch (Exception $e) {
dcCore::app()->error->add($e->getMessage());
App::error()->add($e->getMessage());
}
}
@ -128,11 +132,7 @@ class Manage extends Process
->class('delete')
->value(__('Delete all logs')),
]),
(new Text(
'',
dcCore::app()->admin->url->getHiddenFormFields('admin.plugin.' . My::id(), $current->filter->values()) .
dcCore::app()->formNonce()
)),
... My::hiddenFields($current->filter->values()),
]),
])->render(),
$current->filter->show()

View File

@ -14,7 +14,7 @@ declare(strict_types=1);
namespace Dotclear\Plugin\dcLog;
use dcCore;
use Dotclear\App;
use Dotclear\Core\Backend\Filter\{
Filters,
FiltersLibrary
@ -66,12 +66,12 @@ class ManageVars
$params = $this->filter->params();
try {
$this->logs = dcCore::app()->log->getLogs($params);
$count = dcCore::app()->log->getLogs($params, true)->f(0);
$this->logs = App::log()->getLogs($params);
$count = App::log()->getLogs($params, true)->f(0);
$count = is_numeric($count) ? (int) $count : 0;
$this->list = new BackendList($this->logs, $count);
} catch (Exception $e) {
dcCore::app()->error->add($e->getMessage());
App::error()->add($e->getMessage());
}
}

View File

@ -14,7 +14,7 @@ declare(strict_types=1);
namespace Dotclear\Plugin\dcLog;
use dcCore;
use Dotclear\App;
use Dotclear\Module\MyPlugin;
class My extends MyPlugin
@ -24,6 +24,6 @@ class My extends MyPlugin
public static function checkCustomContext(int $context): ?bool
{
return dcCore::app()->auth->isSuperAdmin();
return App::auth()->isSuperAdmin();
}
}