clean up again...

This commit is contained in:
Jean-Christian Paul Denis 2021-09-02 21:43:35 +02:00
parent 6f4114cb74
commit 6bb51db969
14 changed files with 129 additions and 117 deletions

View File

@ -1,3 +1,6 @@
2021.08.17.1
- clean up again...
licenseBootstrap 2021.08.17
* Move to Franck style

View File

@ -1,15 +1,15 @@
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of licenseBootstrap, 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 licenseBootstrap, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis
*
* @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 licenseBootstrap, 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 licenseBootstrap, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_MODULE')) {
return null;

View File

@ -1,30 +1,31 @@
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of licenseBootstrap, 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 licenseBootstrap, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')) {
return null;
}
$this->registerModule(
'License bootstrap', // Name
'Add license to your plugins and themes', // Description
'Jean-Christian Denis', // Author
'2021.08.17.1', // Version
'License bootstrap',
'Add license to your plugins and themes',
'Jean-Christian Denis',
'2021.08.17.1',
[
'requires' => [['core', '2.19']],
'permissions' => null,
'type' => 'plugin',
'dc_min' => '2.19',
'support' => 'https://github.com/JcDenis/licenseBootstrap',
'details' => 'https://plugins.dotaddict.org/dc2/details/licenseBootstrap'
'details' => 'https://plugins.dotaddict.org/dc2/details/licenseBootstrap',
'repository' => 'https://raw.githubusercontent.com/JcDenis/licenseBootstrap/master/dcstore.xml'
]
);

View File

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

11
dcstore.xml Normal file
View File

@ -0,0 +1,11 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="licenseBootstrap">
<name>License bootstrap</name>
<version>2021.08.17.1</version>
<author>Jean-Christian Denis</author>
<desc>Add license to your plugins and themes</desc>
<file>https://github.com/JcDenis/licenseBootstrap/releases/download/v2021.08.17.1/plugin-licenseBootstrap.zip</file>
<da:details>https://plugins.dotaddict.org/dc2/details/licenseBootstrap</da:details>
<da:support>https://github.com/JcDenis/licenseBootstrap</da:support>
</module>
</modules>

View File

@ -1,15 +1,15 @@
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of licenseBootstrap, 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 licenseBootstrap, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_ADMIN')) {
return null;
@ -98,7 +98,7 @@ class licenseBootstrap
{
return in_array($name, self::getLicenses()) ? $name : 'gpl2';
}
/**
* Get license header.
*
@ -350,9 +350,9 @@ class licenseBootstrap
if (!$dir) {
$dir = $path;
}
$files = files::scandir($path);
foreach($files AS $file) {
if (substr($file, 0, 1) == '.') {
continue;
@ -376,7 +376,7 @@ class licenseBootstrap
{
return base64_encode(serialize($a));
}
public static function decode($a)
{
return unserialize(base64_decode($a));

View File

@ -1,15 +1,15 @@
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of licenseBootstrap, 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 licenseBootstrap, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_CONTEXT_ADMIN')) {
return null;
@ -43,7 +43,7 @@ class libLicenseBootstrap
'<th class="nowrap maximal">' . __('Name') . '</th>' .
'<th class="nowrap">' . __('Root') . '</th>' .
'</tr>';
foreach (self::sort($modules) as $id => $module) {
echo
'<tr class="line">' .

View File

@ -5,7 +5,6 @@
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

View File

@ -1,15 +1,15 @@
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of licenseBootstrap, 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 licenseBootstrap, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis
*
* @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

@ -45,6 +45,4 @@ $GLOBALS['__l10n']['Add license to selected modules'] = 'Ajouter la licence aux
$GLOBALS['__l10n']['License successfully added.'] = 'Licence ajouter avec succès';
#index.php:119
$GLOBALS['__l10n']['Configuration'] = 'Configuration';
?>
$GLOBALS['__l10n']['Configuration'] = 'Configuration';

View File

@ -13,9 +13,9 @@
if (!defined('DC_RC_PATH')) {
return null;
return null;
}
if (!empty($_REQUEST['module']) && $_REQUEST['module'] == 'licenseBootstrap') {
$__resources['help']['core_plugins_conf'] = dirname(__FILE__).'/help/help.html';
}
$__resources['help']['core_plugins_conf'] = dirname(__FILE__).'/help/help.html';
}