clean up code

This commit is contained in:
Jean-Christian 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
* update license
* update php code to PSR-2 style and short array
* move settings to blog pref
xxxx.xx.xx
- [x] update php headers to phpdoc style
periodical 2013.11.11
* Switch to Dotclear 2.6
2021.08.23
- update license
- update php code to PSR-2 style and short array
- move settings to blog pref
periodical 2013.06.30
* Small fix and typo
2013.11.11
- Switch to Dotclear 2.6
periodical 0.5 - 2011-01-30
* Fixed install on nightly buid
* 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
2013.06.30
- Small fix and typo
periodical 0.4 - 2010-09-09
* Removed old Twitter functions
* Added StatusNet small functions (Identica)
* Required plugin Tac for Twitter ability
0.5 - 2011-01-30
- Fixed install on nightly buid
- 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.3.1 - 2010-06-25
* Fixed postgreSQL compatibility
* Fixed php 5.3 compatibility on post action combo
* Fixed admin crash on non DC 2.2
* Fixed users rights
0.4 - 2010-09-09
- Removed old Twitter functions
- Added StatusNet small functions (Identica)
- Required plugin Tac for Twitter ability
periodical 0.3 - 2010-06-08
* Switched to DC 2.2
* Fixed simultaneous updates (uses flock)
* Added twitter option when posts are published
0.3.1 - 2010-06-25
- Fixed postgreSQL compatibility
- Fixed php 5.3 compatibility on post action combo
- Fixed admin crash on non DC 2.2
- Fixed users rights
periodical 0.2 - 2010-04-11
* Fixed some bugs
* Added DC 2.2 compatibility (new setting)
* closes #415
0.3 - 2010-06-08
- Switched to DC 2.2
- Fixed simultaneous updates (uses flock)
- Added twitter option when posts are published
periodical 0.1 - 2010-04-05
* First lab release
0.2 - 2010-04-11
- 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
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of periodical, a plugin for Dotclear 2.
#
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
#
# 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 ------------------------------------
/**
* @brief periodical, 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
*/
if (!defined('DC_CONTEXT_ADMIN')) {
return null;

View file

@ -1,15 +1,15 @@
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of periodical, a plugin for Dotclear 2.
#
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
#
# 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 ------------------------------------
/**
* @brief periodical, 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
*/
if (!defined('DC_RC_PATH')) {
return null;
@ -21,10 +21,11 @@ $this->registerModule(
'Jean-Christian Denis and contributors',
'2021.08.23',
[
'requires' => [['core', '2.19']],
'permissions' => 'usage,contentadmin',
'type' => 'plugin',
'dc_min' => '2.19',
'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
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of periodical, a plugin for Dotclear 2.
#
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
#
# 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 ------------------------------------
/**
* @brief periodical, 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
*/
if (!defined('DC_CONTEXT_ADMIN')) {
return null;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,15 +1,15 @@
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of periodical, a plugin for Dotclear 2.
#
# Copyright (c) 2009-2021 Jean-Christian Denis and contributors
#
# 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 ------------------------------------
/**
* @brief periodical, 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
*/
if (!defined('DC_CONTEXT_ADMIN')) {
return null;
@ -25,7 +25,6 @@ $per = new periodical($core);
$action = isset($_POST['action']) ? $_POST['action'] : '';
$part = isset($_REQUEST['part']) && $_REQUEST['part'] == 'period' ? 'period' : 'periods';
############################################################
#
# 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']['Published periodically entries'] = 'Publier périodiquement des billets';