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 licenseBootstrap 2021.08.17
* Move to Franck style * Move to Franck style

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief licenseBootstrap, a plugin for Dotclear 2
# This file is part of licenseBootstrap, 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
# 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 licenseBootstrap, a plugin for Dotclear 2
# This file is part of licenseBootstrap, 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
# 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_MODULE')) { if (!defined('DC_CONTEXT_MODULE')) {
return null; return null;

View File

@ -1,30 +1,31 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief licenseBootstrap, a plugin for Dotclear 2
# This file is part of licenseBootstrap, 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
# 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;
} }
$this->registerModule( $this->registerModule(
'License bootstrap', // Name 'License bootstrap',
'Add license to your plugins and themes', // Description 'Add license to your plugins and themes',
'Jean-Christian Denis', // Author 'Jean-Christian Denis',
'2021.08.17.1', // Version '2021.08.17.1',
[ [
'requires' => [['core', '2.19']],
'permissions' => null, 'permissions' => null,
'type' => 'plugin', 'type' => 'plugin',
'dc_min' => '2.19',
'support' => 'https://github.com/JcDenis/licenseBootstrap', '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 <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief licenseBootstrap, a plugin for Dotclear 2
# This file is part of licenseBootstrap, 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
# 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 licenseBootstrap, a plugin for Dotclear 2
# This file is part of licenseBootstrap, 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
# 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 licenseBootstrap, a plugin for Dotclear 2
# This file is part of licenseBootstrap, 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
# 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;

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 <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief licenseBootstrap, a plugin for Dotclear 2
# This file is part of licenseBootstrap, 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
# 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;
@ -98,7 +98,7 @@ class licenseBootstrap
{ {
return in_array($name, self::getLicenses()) ? $name : 'gpl2'; return in_array($name, self::getLicenses()) ? $name : 'gpl2';
} }
/** /**
* Get license header. * Get license header.
* *
@ -350,9 +350,9 @@ class licenseBootstrap
if (!$dir) { if (!$dir) {
$dir = $path; $dir = $path;
} }
$files = files::scandir($path); $files = files::scandir($path);
foreach($files AS $file) { foreach($files AS $file) {
if (substr($file, 0, 1) == '.') { if (substr($file, 0, 1) == '.') {
continue; continue;
@ -376,7 +376,7 @@ class licenseBootstrap
{ {
return base64_encode(serialize($a)); return base64_encode(serialize($a));
} }
public static function decode($a) public static function decode($a)
{ {
return unserialize(base64_decode($a)); return unserialize(base64_decode($a));

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief licenseBootstrap, a plugin for Dotclear 2
# This file is part of licenseBootstrap, 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
# 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;
@ -43,7 +43,7 @@ class libLicenseBootstrap
'<th class="nowrap maximal">' . __('Name') . '</th>' . '<th class="nowrap maximal">' . __('Name') . '</th>' .
'<th class="nowrap">' . __('Root') . '</th>' . '<th class="nowrap">' . __('Root') . '</th>' .
'</tr>'; '</tr>';
foreach (self::sort($modules) as $id => $module) { foreach (self::sort($modules) as $id => $module) {
echo echo
'<tr class="line">' . '<tr class="line">' .

View File

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

View File

@ -1,15 +1,15 @@
<?php <?php
# -- BEGIN LICENSE BLOCK ---------------------------------- /**
# * @brief licenseBootstrap, a plugin for Dotclear 2
# This file is part of licenseBootstrap, 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
# 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

@ -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'; $GLOBALS['__l10n']['License successfully added.'] = 'Licence ajouter avec succès';
#index.php:119 #index.php:119
$GLOBALS['__l10n']['Configuration'] = 'Configuration'; $GLOBALS['__l10n']['Configuration'] = 'Configuration';
?>

View File

@ -13,9 +13,9 @@
if (!defined('DC_RC_PATH')) { if (!defined('DC_RC_PATH')) {
return null; return null;
} }
if (!empty($_REQUEST['module']) && $_REQUEST['module'] == 'licenseBootstrap') { 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';
} }