cosmetic
parent
1083ad2633
commit
6e934a4ac1
|
@ -54,10 +54,10 @@ class admin
|
||||||
$favs->register(
|
$favs->register(
|
||||||
'improve',
|
'improve',
|
||||||
[
|
[
|
||||||
'title' => __('improve'),
|
'title' => __('improve'),
|
||||||
'url' => dcCore::app()->adminurl->get('admin.plugin.improve'),
|
'url' => dcCore::app()->adminurl->get('admin.plugin.improve'),
|
||||||
'small-icon' => dcPage::getPF('improve/icon.svg'),
|
'small-icon' => dcPage::getPF('improve/icon.svg'),
|
||||||
'large-icon' => dcPage::getPF('improve/icon.svg'),
|
'large-icon' => dcPage::getPF('improve/icon.svg'),
|
||||||
//'permissions' => null,
|
//'permissions' => null,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
|
@ -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());
|
||||||
|
|
|
@ -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 : [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -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'],
|
||||||
|
@ -120,7 +120,7 @@ class dcdeprecated extends action
|
||||||
}
|
}
|
||||||
foreach (self::$deprecated[$this->path_extension] as $d) {
|
foreach (self::$deprecated[$this->path_extension] as $d) {
|
||||||
if (preg_match('/' . $d[0] . '/i', $content)) {
|
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
|
<?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')
|
||||||
|
|
|
@ -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', '');
|
||||||
|
|
Loading…
Reference in New Issue