clean up code

master
Jean-Christian Paul Denis 2021-09-02 14:56:02 +02:00
parent a2663368ed
commit 517a395d81
15 changed files with 189 additions and 161 deletions

View File

@ -1,42 +1,45 @@
periodical 2021.08.xx xxxx.xx.xx
* update license - [x] update php headers to phpdoc style
* update php code to PSR-2 style and short array
* move settings to blog pref
periodical 2013.11.11 2021.08.23
* Switch to Dotclear 2.6 - update license
- update php code to PSR-2 style and short array
- move settings to blog pref
periodical 2013.06.30 2013.11.11
* Small fix and typo - Switch to Dotclear 2.6
periodical 0.5 - 2011-01-30 2013.06.30
* Fixed install on nightly buid - Small fix and typo
* Fixed call to blog object on prepend
* Removed mesenger fonctions (this is to another plugin to do that)
* Added behavior on post update
* Added periodical to plugin soCialMe
* New year copyright
periodical 0.4 - 2010-09-09 0.5 - 2011-01-30
* Removed old Twitter functions - Fixed install on nightly buid
* Added StatusNet small functions (Identica) - Fixed call to blog object on prepend
* Required plugin Tac for Twitter ability - Removed mesenger fonctions (this is to another plugin to do that)
- Added behavior on post update
- Added periodical to plugin soCialMe
- New year copyright
periodical 0.3.1 - 2010-06-25 0.4 - 2010-09-09
* Fixed postgreSQL compatibility - Removed old Twitter functions
* Fixed php 5.3 compatibility on post action combo - Added StatusNet small functions (Identica)
* Fixed admin crash on non DC 2.2 - Required plugin Tac for Twitter ability
* Fixed users rights
periodical 0.3 - 2010-06-08 0.3.1 - 2010-06-25
* Switched to DC 2.2 - Fixed postgreSQL compatibility
* Fixed simultaneous updates (uses flock) - Fixed php 5.3 compatibility on post action combo
* Added twitter option when posts are published - Fixed admin crash on non DC 2.2
- Fixed users rights
periodical 0.2 - 2010-04-11 0.3 - 2010-06-08
* Fixed some bugs - Switched to DC 2.2
* Added DC 2.2 compatibility (new setting) - Fixed simultaneous updates (uses flock)
* closes #415 - Added twitter option when posts are published
periodical 0.1 - 2010-04-05 0.2 - 2010-04-11
* First lab release - Fixed some bugs
- Added DC 2.2 compatibility (new setting)
- closes #415
0.1 - 2010-04-05
- First lab release

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief periodical, a plugin for Dotclear 2
# This file is part of periodical, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @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
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_CONTEXT_ADMIN')) { if (!defined('DC_CONTEXT_ADMIN')) {
return null; return null;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief periodical, a plugin for Dotclear 2
# This file is part of periodical, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @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
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')) { if (!defined('DC_RC_PATH')) {
return null; return null;
@ -21,10 +21,11 @@ $this->registerModule(
'Jean-Christian Denis and contributors', 'Jean-Christian Denis and contributors',
'2021.08.23', '2021.08.23',
[ [
'requires' => [['core', '2.19']],
'permissions' => 'usage,contentadmin', 'permissions' => 'usage,contentadmin',
'type' => 'plugin', 'type' => 'plugin',
'dc_min' => '2.19',
'support' => 'https://github.com/JcDenis/periodical', 'support' => 'https://github.com/JcDenis/periodical',
'details' => 'https://plugins.dotaddict.org/dc2/details/periodical' 'details' => 'https://plugins.dotaddict.org/dc2/details/periodical',
'repository' => 'https://raw.githubusercontent.com/JcDenis/periodical/master/dcstore.xml'
] ]
); );

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief periodical, a plugin for Dotclear 2
# This file is part of periodical, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @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
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_CONTEXT_ADMIN')) { if (!defined('DC_CONTEXT_ADMIN')) {
return null; return null;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief periodical, a plugin for Dotclear 2
# This file is part of periodical, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @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
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')) { if (!defined('DC_RC_PATH')) {
return null; return null;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief periodical, a plugin for Dotclear 2
# This file is part of periodical, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @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
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')) { if (!defined('DC_RC_PATH')) {
return null; return null;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief periodical, a plugin for Dotclear 2
# This file is part of periodical, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @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
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')){ if (!defined('DC_RC_PATH')){
return; return;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief periodical, a plugin for Dotclear 2
# This file is part of periodical, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @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
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_CONTEXT_ADMIN')) { if (!defined('DC_CONTEXT_ADMIN')) {
return null; return null;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief periodical, a plugin for Dotclear 2
# This file is part of periodical, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @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
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_RC_PATH')){ if (!defined('DC_RC_PATH')){
return; return;

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief periodical, a plugin for Dotclear 2
# This file is part of periodical, a plugin for Dotclear 2. *
# * @package Dotclear
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors * @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
# * @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
# -- END LICENSE BLOCK ------------------------------------ */
if (!defined('DC_CONTEXT_ADMIN')) { if (!defined('DC_CONTEXT_ADMIN')) {
return null; return null;
@ -25,7 +25,6 @@ $per = new periodical($core);
$action = isset($_POST['action']) ? $_POST['action'] : ''; $action = isset($_POST['action']) ? $_POST['action'] : '';
$part = isset($_REQUEST['part']) && $_REQUEST['part'] == 'period' ? 'period' : 'periods'; $part = isset($_REQUEST['part']) && $_REQUEST['part'] == 'period' ? 'period' : 'periods';
############################################################ ############################################################
# #
# One period # One period

View File

@ -1 +1,27 @@
/* -- BEGIN LICENSE BLOCK ---------------------------------- * * This file is part of periodical, a plugin for Dotclear 2. * * Copyright (c) 2009-2013 Jean-Christian Denis and contributors * contact@jcdenis.fr http://jcd.lv * * Licensed under the GPL version 2.0 license. * A copy of this license is available in LICENSE file or at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * -- END LICENSE BLOCK ------------------------------------*/ $(function(){ var periodicalstart=document.getElementById('period_curdt'); if(periodicalstart!=undefined){ var periodicalstart_dtPick=new datePicker(periodicalstart); periodicalstart_dtPick.img_top='1.5em'; periodicalstart_dtPick.draw(); } var periodicalend=document.getElementById('period_enddt'); if(periodicalend!=undefined){ var periodicalend_dtPick=new datePicker(periodicalend); periodicalend_dtPick.img_top='1.5em'; periodicalend_dtPick.draw(); } }); /* -- BEGIN LICENSE BLOCK ----------------------------------
*
* This file is part of periodical, a plugin for Dotclear 2.
*
* Copyright (c) 2009-2013 Jean-Christian Denis and contributors
* contact@jcdenis.fr http://jcd.lv
*
* Licensed under the GPL version 2.0 license.
* A copy of this license is available in LICENSE file or at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
* -- END LICENSE BLOCK ------------------------------------*/
$(function(){
var periodicalstart=document.getElementById('period_curdt');
if(periodicalstart!=undefined){
var periodicalstart_dtPick=new datePicker(periodicalstart);
periodicalstart_dtPick.img_top='1.5em';
periodicalstart_dtPick.draw();
}
var periodicalend=document.getElementById('period_enddt');
if(periodicalend!=undefined){
var periodicalend_dtPick=new datePicker(periodicalend);
periodicalend_dtPick.img_top='1.5em';
periodicalend_dtPick.draw();
}
});

View File

@ -181,4 +181,3 @@ $GLOBALS['__l10n']['Selected periods action:'] = 'Action sur les périodes selec
$GLOBALS['__l10n']['Configuration has been successfully updated.'] = 'La configuration a été mise à jour avec succés.'; $GLOBALS['__l10n']['Configuration has been successfully updated.'] = 'La configuration a été mise à jour avec succés.';
$GLOBALS['__l10n']['Published periodically entries'] = 'Publier périodiquement des billets'; $GLOBALS['__l10n']['Published periodically entries'] = 'Publier périodiquement des billets';