release 1.7
This commit is contained in:
parent
1bfd93f791
commit
f96aec632d
@ -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
|
dcLog 1.6 - 2023.08.14
|
||||||
===========================================================
|
===========================================================
|
||||||
* Require Dotclear 2.27
|
* Require Dotclear 2.27
|
||||||
|
26
README.md
26
README.md
@ -1,24 +1,21 @@
|
|||||||
# README
|
# README
|
||||||
|
|
||||||
[![Release](https://img.shields.io/badge/release-1.6-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/dcLog/releases)
|
[![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.08.14-c44d58.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.27-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/dcLog)
|
[![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
|
_dcLog_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
|
||||||
web publishing software called Dotclear.
|
|
||||||
|
|
||||||
Display dotclear's logs.
|
> Display dotclear's logs.
|
||||||
|
|
||||||
## REQUIREMENTS
|
## REQUIREMENTS
|
||||||
|
|
||||||
_dcLog_ requires:
|
|
||||||
|
|
||||||
* PHP 8.1+
|
* PHP 8.1+
|
||||||
* Dotclear 2.27
|
* Dotclear 2.28
|
||||||
* super admin permission
|
* super admin permission
|
||||||
|
|
||||||
## USAGE
|
## USAGE
|
||||||
@ -31,9 +28,10 @@ Once it's done you can manage your logs from menu
|
|||||||
|
|
||||||
## LINKS
|
## LINKS
|
||||||
|
|
||||||
* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html)
|
* [License](https://git.dotclear.watch/JcDenis/dcLog/src/branch/master/LICENSE)
|
||||||
* Source & contribution : [Gitea Page](https://git.dotclear.watch/JcDenis/dcLog) or [GitHub Page](https://github.com/JcDenis/dcLog)
|
* [Packages & details](https://git.dotclear.watch/JcDenis/dcLog/releases) (or on [Dotaddict](https://plugins.dotaddict.org/dc2/details/dcLog))
|
||||||
* Packages & details: [Gitea Page](https://git.dotclear.watch/JcDenis/dcLog/releases) or [Dotaddict Page](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
|
## CONTRIBUTORS
|
||||||
|
|
||||||
|
@ -18,11 +18,11 @@ $this->registerModule(
|
|||||||
"Dotclear's logs",
|
"Dotclear's logs",
|
||||||
'Displays Dotclear logs',
|
'Displays Dotclear logs',
|
||||||
'Tomtom and Contributors',
|
'Tomtom and Contributors',
|
||||||
'1.6',
|
'1.7',
|
||||||
[
|
[
|
||||||
'requires' => [
|
'requires' => [
|
||||||
['php', '8.1'],
|
['php', '8.1'],
|
||||||
['core', '2.27'],
|
['core', '2.28'],
|
||||||
],
|
],
|
||||||
'permissions' => null,
|
'permissions' => null,
|
||||||
'type' => 'plugin',
|
'type' => 'plugin',
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
<modules xmlns:da="http://dotaddict.org/da/">
|
<modules xmlns:da="http://dotaddict.org/da/">
|
||||||
<module id="dcLog">
|
<module id="dcLog">
|
||||||
<name>Dotclear's logs</name>
|
<name>Dotclear's logs</name>
|
||||||
<version>1.6</version>
|
<version>1.7</version>
|
||||||
<author>Tomtom and Contributors</author>
|
<author>Tomtom and Contributors</author>
|
||||||
<desc>Displays Dotclear logs</desc>
|
<desc>Displays Dotclear logs</desc>
|
||||||
<file>https://git.dotclear.watch/JcDenis/dcLog/releases/download/v1.6/plugin-dcLog.zip</file>
|
<file>https://git.dotclear.watch/JcDenis/dcLog/releases/download/v1.7/plugin-dcLog.zip</file>
|
||||||
<da:dcmin>2.27</da:dcmin>
|
<da:dcmin>2.28</da:dcmin>
|
||||||
<da:details>https://git.dotclear.watch/JcDenis/dcLog/src/branch/master/README.md</da:details>
|
<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>
|
<da:support>https://git.dotclear.watch/JcDenis/dcLog/issues</da:support>
|
||||||
</module>
|
</module>
|
||||||
|
@ -15,7 +15,7 @@ declare(strict_types=1);
|
|||||||
namespace Dotclear\Plugin\dcLog;
|
namespace Dotclear\Plugin\dcLog;
|
||||||
|
|
||||||
use ArrayObject;
|
use ArrayObject;
|
||||||
use dcCore;
|
use Dotclear\App;
|
||||||
use Dotclear\Core\Process;
|
use Dotclear\Core\Process;
|
||||||
use Dotclear\Core\Backend\Favorites;
|
use Dotclear\Core\Backend\Favorites;
|
||||||
use Dotclear\Core\Backend\Menus;
|
use Dotclear\Core\Backend\Menus;
|
||||||
@ -35,7 +35,7 @@ class Backend extends Process
|
|||||||
|
|
||||||
My::addBackendMenuItem(Menus::MENU_SYSTEM);
|
My::addBackendMenuItem(Menus::MENU_SYSTEM);
|
||||||
|
|
||||||
dcCore::app()->addBehaviors([
|
App::behavior()->addBehaviors([
|
||||||
// backend user preference for logs list columns
|
// backend user preference for logs list columns
|
||||||
'adminColumnsListsV2' => function (ArrayObject $cols): void {
|
'adminColumnsListsV2' => function (ArrayObject $cols): void {
|
||||||
$cols[My::BACKEND_LIST_ID] = [
|
$cols[My::BACKEND_LIST_ID] = [
|
||||||
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Dotclear\Plugin\dcLog;
|
namespace Dotclear\Plugin\dcLog;
|
||||||
|
|
||||||
use dcCore;
|
use Dotclear\App;
|
||||||
use Dotclear\Core\Process;
|
use Dotclear\Core\Process;
|
||||||
use Dotclear\Core\Backend\{
|
use Dotclear\Core\Backend\{
|
||||||
Notices,
|
Notices,
|
||||||
@ -51,7 +51,11 @@ class Manage extends Process
|
|||||||
// Delete logs
|
// Delete logs
|
||||||
if ($current->selected_logs && !empty($current->entries) || $current->all_logs) {
|
if ($current->selected_logs && !empty($current->entries) || $current->all_logs) {
|
||||||
try {
|
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(
|
Notices::addSuccessNotice(
|
||||||
$current->all_logs ?
|
$current->all_logs ?
|
||||||
__('All logs have been successfully deleted') :
|
__('All logs have been successfully deleted') :
|
||||||
@ -59,7 +63,7 @@ class Manage extends Process
|
|||||||
);
|
);
|
||||||
My::redirect();
|
My::redirect();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
dcCore::app()->error->add($e->getMessage());
|
App::error()->add($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,11 +132,7 @@ class Manage extends Process
|
|||||||
->class('delete')
|
->class('delete')
|
||||||
->value(__('Delete all logs')),
|
->value(__('Delete all logs')),
|
||||||
]),
|
]),
|
||||||
(new Text(
|
... My::hiddenFields($current->filter->values()),
|
||||||
'',
|
|
||||||
dcCore::app()->admin->url->getHiddenFormFields('admin.plugin.' . My::id(), $current->filter->values()) .
|
|
||||||
dcCore::app()->formNonce()
|
|
||||||
)),
|
|
||||||
]),
|
]),
|
||||||
])->render(),
|
])->render(),
|
||||||
$current->filter->show()
|
$current->filter->show()
|
||||||
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Dotclear\Plugin\dcLog;
|
namespace Dotclear\Plugin\dcLog;
|
||||||
|
|
||||||
use dcCore;
|
use Dotclear\App;
|
||||||
use Dotclear\Core\Backend\Filter\{
|
use Dotclear\Core\Backend\Filter\{
|
||||||
Filters,
|
Filters,
|
||||||
FiltersLibrary
|
FiltersLibrary
|
||||||
@ -66,12 +66,12 @@ class ManageVars
|
|||||||
$params = $this->filter->params();
|
$params = $this->filter->params();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->logs = dcCore::app()->log->getLogs($params);
|
$this->logs = App::log()->getLogs($params);
|
||||||
$count = dcCore::app()->log->getLogs($params, true)->f(0);
|
$count = App::log()->getLogs($params, true)->f(0);
|
||||||
$count = is_numeric($count) ? (int) $count : 0;
|
$count = is_numeric($count) ? (int) $count : 0;
|
||||||
$this->list = new BackendList($this->logs, $count);
|
$this->list = new BackendList($this->logs, $count);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
dcCore::app()->error->add($e->getMessage());
|
App::error()->add($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Dotclear\Plugin\dcLog;
|
namespace Dotclear\Plugin\dcLog;
|
||||||
|
|
||||||
use dcCore;
|
use Dotclear\App;
|
||||||
use Dotclear\Module\MyPlugin;
|
use Dotclear\Module\MyPlugin;
|
||||||
|
|
||||||
class My extends MyPlugin
|
class My extends MyPlugin
|
||||||
@ -24,6 +24,6 @@ class My extends MyPlugin
|
|||||||
|
|
||||||
public static function checkCustomContext(int $context): ?bool
|
public static function checkCustomContext(int $context): ?bool
|
||||||
{
|
{
|
||||||
return dcCore::app()->auth->isSuperAdmin();
|
return App::auth()->isSuperAdmin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user