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( dcCore::app()->adminurl->redirect(
'admin.plugins', '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) { } catch (Exception $e) {
dcCore::app()->error->add($e->getMessage()); dcCore::app()->error->add($e->getMessage());

View File

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

View File

@ -22,7 +22,7 @@ use plugins\improve\action;
*/ */
class dcdeprecated extends 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 = [ private static $deprecated = [
'php' => [ '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'], ['(\$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 <?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 */ /** @phpstan-ignore-next-line */
$finder = PhpCsFixer\Finder::create() $finder = PhpCsFixer\Finder::create()
->exclude('node_modules') ->exclude('node_modules')

View File

@ -1,5 +1,15 @@
<?php <?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 // Mock some global constants
define('DC_ADMIN_SSL', true); define('DC_ADMIN_SSL', true);
define('DC_ADMIN_URL', ''); define('DC_ADMIN_URL', '');