First pass to clean up code

master
Jean-Christian Paul Denis 2021-09-03 00:18:08 +02:00
parent d843671ddb
commit 55136bb6d7
16 changed files with 1794 additions and 1782 deletions

View File

@ -1,14 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_ADMIN')){return;} if (!defined('DC_CONTEXT_ADMIN')){return;}
@ -90,4 +91,3 @@ class activityReportAdmin
} }
} }
} }
?>

View File

@ -1,24 +1,32 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')){return;} if (!defined('DC_RC_PATH')) {
return null;
}
$this->registerModule( $this->registerModule(
/* Name */ "Activity report", 'Activity report',
/* Description*/ "Receive your blog activity by email, feed, or on dashboard", 'Receive your blog activity by email, feed, or on dashboard',
/* Author */ "JC Denis", 'Jean-Christian Denis and contributors',
/* Version */ '1.0.1', '1.0.1',
/* Permissions */ 'admin', [
/* Priority */ -1000000 'requires' => [['core', '2.19']],
'permissions' => 'admin',
'priority' => -1000000,
'type' => 'plugin',
'support' => 'https://github.com/JcDenis/activityReport',
'details' => 'http://plugins.dotaddict.org/dc2/details/activityReport',
'repository' => 'https://raw.githubusercontent.com/JcDenis/activityReport/master/dcstore.xml'
]
); );
/* date */ #20100608
?>

View File

@ -1,14 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_ADMIN')){return;} if (!defined('DC_CONTEXT_ADMIN')){return;}
@ -68,4 +69,3 @@ catch (Exception $e)
$core->error->add($e->getMessage()); $core->error->add($e->getMessage());
} }
return false; return false;
?>

View File

@ -1,14 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')){return;} if (!defined('DC_RC_PATH')){return;}
@ -35,4 +36,3 @@ try
catch (Exception $e) { catch (Exception $e) {
//throw new Exception('Failed to launch activityReport'); //throw new Exception('Failed to launch activityReport');
} }
?>

View File

@ -1,14 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')){return;} if (!defined('DC_RC_PATH')){return;}
@ -171,4 +172,3 @@ class activityReportContext
return ''; return '';
} }
} }
?>

View File

@ -1,14 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_ADMIN')){return;} if (!defined('DC_CONTEXT_ADMIN')){return;}
@ -53,4 +54,3 @@ $this->addDirectAction(
/* ns */ 'activityReport', /* ns */ 'activityReport',
/* description */ sprintf(__('delete %s plugin files'),'activityReport') /* description */ sprintf(__('delete %s plugin files'),'activityReport')
); );
?>

11
dcstore.xml 100644
View File

@ -0,0 +1,11 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="activityReport">
<name>Rapport d'activité</name>
<version>1.0.1</version>
<author>Jean-Christian Denis and contributors</author>
<desc>Receive your blog activity by email, feed, or on dashboard</desc>
<file>https://github.com/JcDenis/activityReport/releases/download/v1.0.1/plugin-activityReport.zip</file>
<da:details>http://plugins.dotaddict.org/dc2/details/activityReport</da:details>
<da:support>https://github.com/JcDenis/activityReport</da:support>
</module>
</modules>

View File

@ -1,14 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')){return;} if (!defined('DC_RC_PATH')){return;}
@ -53,7 +54,6 @@ $core->activityReport->addAction(
array('activityReportBehaviors','blogP404') array('activityReportBehaviors','blogP404')
); );
/* Post /* Post
-------------------------*/ -------------------------*/
$core->activityReport->addGroup('post',__('Actions on posts')); $core->activityReport->addGroup('post',__('Actions on posts'));
@ -114,8 +114,6 @@ $core->activityReport->addAction(
array('activityReportBehaviors','postPasswordAttempt') array('activityReportBehaviors','postPasswordAttempt')
); );
/* Comment /* Comment
-------------------------*/ -------------------------*/
$core->activityReport->addGroup('comment',__('Actions on comments')); $core->activityReport->addGroup('comment',__('Actions on comments'));
@ -157,7 +155,6 @@ $core->activityReport->addAction(
array('activityReportBehaviors','trackbackCreate') array('activityReportBehaviors','trackbackCreate')
); );
/* Category /* Category
-------------------------*/ -------------------------*/
$core->activityReport->addGroup('category',__('Actions on categories')); $core->activityReport->addGroup('category',__('Actions on categories'));
@ -184,7 +181,6 @@ $core->activityReport->addAction(
# Missing adminBeforeCategoryDelete in admin/category.php # Missing adminBeforeCategoryDelete in admin/category.php
/* User /* User
-------------------------*/ -------------------------*/
$core->activityReport->addGroup('user',__('Actions on users')); $core->activityReport->addGroup('user',__('Actions on users'));
@ -219,7 +215,6 @@ $core->activityReport->addAction(
array('activityReportBehaviors','userDelete') array('activityReportBehaviors','userDelete')
); );
class activityReportBehaviors class activityReportBehaviors
{ {
public static function messageActivityReport($message) public static function messageActivityReport($message)
@ -432,4 +427,3 @@ class activityReportBehaviors
$core->activityReport->addLog('user','delete',$logs); $core->activityReport->addLog('user','delete',$logs);
} }
} }
?>

View File

@ -1,14 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')){return;} if (!defined('DC_RC_PATH')){return;}
@ -821,4 +822,3 @@ class activityReport
return @unserialize(@base64_decode($a)); return @unserialize(@base64_decode($a));
} }
} }
?>

View File

@ -1,14 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_ADMIN')){return;} if (!defined('DC_CONTEXT_ADMIN')){return;}
@ -371,4 +372,3 @@ class activityReportLib
$O->unsetGlobal(); $O->unsetGlobal();
} }
} }
?>

View File

@ -1,14 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
$format = array( $format = array(
@ -67,4 +68,3 @@ $format = array(
"%PERIOD%\n-----------------------------------------------------------\n%TEXT%" "%PERIOD%\n-----------------------------------------------------------\n%TEXT%"
)); ));
?>

View File

@ -1,14 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# This file is part of activityReport, a plugin for Dotclear 2. * @brief activityReport, a plugin for Dotclear 2
# *
# Copyright (c) 2009-2010 JC Denis and contributors * @package Dotclear
# jcdenis@gdwd.com * @subpackage Plugin
# *
# Licensed under the GPL version 2.0 license. * @author Jean-Christian Denis and contributors
# A copy of this license is available in LICENSE file or at *
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright Jean-Christian Denis
# -- END LICENSE BLOCK ------------------------------------ * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_ADMIN')){return;} if (!defined('DC_CONTEXT_ADMIN')){return;}

View File

@ -260,5 +260,3 @@ $GLOBALS['__l10n']['Super settings'] = 'Super paramètres';
#index.php:58 #index.php:58
$GLOBALS['__l10n']['Super logs'] = 'Super enregistrements'; $GLOBALS['__l10n']['Super logs'] = 'Super enregistrements';
?>