cosmetic
parent
1083ad2633
commit
6e934a4ac1
|
@ -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());
|
||||
|
|
|
@ -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 : [];
|
||||
}
|
||||
|
|
|
@ -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'],
|
||||
|
@ -120,7 +120,7 @@ class dcdeprecated extends action
|
|||
}
|
||||
foreach (self::$deprecated[$this->path_extension] as $d) {
|
||||
if (preg_match('/' . $d[0] . '/i', $content)) {
|
||||
$this->setWarning(sprintf(__('Possible use of deprecated "%s", you should use "%s" instead since Dotclear %s.'), $d[1], __($d[2]), $d[3]) . (empty($d[4]) ? '' : ' <a href="'. $d['4'] . '">' . __('Help') . '</a> '));
|
||||
$this->setWarning(sprintf(__('Possible use of deprecated "%s", you should use "%s" instead since Dotclear %s.'), $d[1], __($d[2]), $d[3]) . (empty($d[4]) ? '' : ' <a href="' . $d['4'] . '">' . __('Help') . '</a> '));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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', '');
|
||||
|
|
Loading…
Reference in New Issue