master
Jean-Christian Paul Denis 2022-12-01 11:09:24 +01:00
parent 1083ad2633
commit 6e934a4ac1
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
6 changed files with 34 additions and 13 deletions

View File

@ -77,7 +77,7 @@ class config
dcCore::app()->adminurl->redirect(
'admin.plugins',
['module' => 'improve', 'conf' => 1, 'chk' => 1, 'redir' => dcCore::app()->admin->list->getRedir()]
['module' => 'improve', 'conf' => 1, 'chk' => 1, 'redir' => dcCore::app()->admin->__get('list')->getRedir()]
);
} catch (Exception $e) {
dcCore::app()->error->add($e->getMessage());

View File

@ -16,13 +16,14 @@ namespace plugins\improve;
/* dotclear */
use dcCore;
use dcLog;
/* clearbricks */
use path;
use files;
/* php */
use arrayObject;
use ArrayObject;
use Exception;
/**
@ -53,7 +54,7 @@ class improve
public function __construct()
{
$disabled = explode(';', (string) dcCore::app()->blog->settings->improve->disabled);
$list = new arrayObject();
$list = new ArrayObject();
try {
dcCore::app()->callBehavior('improveAddAction', $list);
@ -102,9 +103,9 @@ class improve
if ($rs->isEmpty()) {
return [];
}
dcCore::app()->log->delLogs($rs->log_id);
dcCore::app()->log->delLogs($rs->__get('log_id'));
$res = unserialize($rs->log_msg);
$res = unserialize($rs->__get('log_msg'));
return is_array($res) ? $res : [];
}

View File

@ -22,7 +22,7 @@ use plugins\improve\action;
*/
class dcdeprecated extends action
{
/** @var array Deprecated functions [filetype [pattern, deprecated, replacement, version]] */
/** @var array Deprecated functions [filetype [pattern, deprecated, replacement, version, help link]] */
private static $deprecated = [
'php' => [
['(\$core|\$GLOBALS\[(\'|")core(\'|")\]|\$this->core)', '$core', 'dcCore::app()', '2.23', 'https://open-time.net/post/2022/10/21/Adapter-son-code-pour-la-224-n-2'],

View File

@ -1,5 +1,15 @@
<?php
/**
* @brief improve, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
/** @phpstan-ignore-next-line */
$finder = PhpCsFixer\Finder::create()
->exclude('node_modules')

View File

@ -1,5 +1,15 @@
<?php
/**
* @brief improve, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
// Mock some global constants
define('DC_ADMIN_SSL', true);
define('DC_ADMIN_URL', '');