This commit is contained in:
Jean-Christian Paul Denis 2022-12-20 20:55:48 +01:00
parent c70f72d76e
commit 5345511194
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
4 changed files with 6 additions and 7 deletions

View File

@ -31,14 +31,14 @@ dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
); );
if (dcCore::app()->activityReport->getSetting('active')) { if (dcCore::app()->activityReport->getSetting('active')) {
dcCore::app()->addBehavior('adminDashboardContentsV2', ['activityReportAdmin', 'adminDashboardContents']); dcCore::app()->addBehavior('adminDashboardContentsV2', ['activityReportAdmin', 'adminDashboardContentsV2']);
dcCore::app()->addBehavior('adminDashboardOptionsFormV2', ['activityReportAdmin', 'adminDashboardOptionsForm']); dcCore::app()->addBehavior('adminDashboardOptionsFormV2', ['activityReportAdmin', 'adminDashboardOptionsFormV2']);
dcCore::app()->addBehavior('adminAfterDashboardOptionsUpdate', ['activityReportAdmin', 'adminAfterDashboardOptionsUpdate']); dcCore::app()->addBehavior('adminAfterDashboardOptionsUpdate', ['activityReportAdmin', 'adminAfterDashboardOptionsUpdate']);
} }
class activityReportAdmin class activityReportAdmin
{ {
public static function adminDashboardContents($items) public static function adminDashboardContentsV2($items)
{ {
dcCore::app()->auth->user_prefs->addWorkspace(basename(__DIR__)); dcCore::app()->auth->user_prefs->addWorkspace(basename(__DIR__));
$limit = abs((int) dcCore::app()->auth->user_prefs->__get(basename(__DIR__))->dashboard_item); $limit = abs((int) dcCore::app()->auth->user_prefs->__get(basename(__DIR__))->dashboard_item);
@ -95,7 +95,7 @@ class activityReportAdmin
]); ]);
} }
public static function adminDashboardOptionsForm() public static function adminDashboardOptionsFormV2()
{ {
dcCore::app()->auth->user_prefs->addWorkspace(basename(__DIR__)); dcCore::app()->auth->user_prefs->addWorkspace(basename(__DIR__));

View File

@ -15,7 +15,7 @@ if (!defined('DC_CONTEXT_ADMIN')) {
} }
if (!dcCore::app()->newVersion( if (!dcCore::app()->newVersion(
basename(__DIR__), basename(__DIR__),
dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version') dcCore::app()->plugins->moduleInfo(basename(__DIR__), 'version')
)) { )) {
return null; return null;

View File

@ -96,7 +96,6 @@ class activityReportBehaviors
['activityReportBehaviors', 'postUpdate'] ['activityReportBehaviors', 'postUpdate']
); );
// from BEHAVIOR adminBeforePostDelete in admin/posts_actions.php
// from BEHAVIOR adminBeforePostDelete in admin/post.php // from BEHAVIOR adminBeforePostDelete in admin/post.php
dcCore::app()->activityReport->addAction( dcCore::app()->activityReport->addAction(
'post', 'post',

View File

@ -11,7 +11,7 @@
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/ */
$format = [ $format = [
'html' => [ 'html' => [
'blog_title' => '<h2><a href="%URL%">%TEXT%</a></h2>', 'blog_title' => '<h2><a href="%URL%">%TEXT%</a></h2>',
'blog_open' => '', 'blog_open' => '',
'blog_close' => '', 'blog_close' => '',