Skip to content

Commit

Permalink
release 4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Gvx committed Nov 5, 2023
1 parent cfcd45b commit b415cdf
Show file tree
Hide file tree
Showing 23 changed files with 628 additions and 611 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
=========

Version 4.2.0 (2023-11-05)
--------------------------

* Mise a niveau pour dc 2.28
* Ajout d'une procédure de désinstallation
* Passage a la version 5.65.15 de CodeMirror
* Correctif regression de l’accès a l'aide
* Correctifs divers

Version 4.1.0 (2023-08-23)
--------------------------

Expand Down
9 changes: 9 additions & 0 deletions dcScript/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
=========

Version 4.2.0 (2023-11-05)
--------------------------

* Mise a niveau pour dc 2.28
* Ajout d'une procédure de désinstallation
* Passage a la version 5.65.15 de CodeMirror
* Correctif regression de l’accès a l'aide
* Correctifs divers

Version 4.1.0 (2023-08-23)
--------------------------

Expand Down
44 changes: 21 additions & 23 deletions dcScript/_define.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,30 @@
* @copyright © 2014-2023 Gvx
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

$this->registerModule(
/* Name */ 'dcScript',
/* Description*/ 'Add public script for DC',
/* Author */ 'Gvx',
/* Version */ '4.1.0',
[
/* standard plugin options dotclear */
'permissions' => dcCore::app()->auth->makePermissions([initDcScript::EDIT]),
'type' => 'plugin',
'Priority' => 1010,
'support' /* url */ => 'http://forum.dotclear.org/viewtopic.php?pid=335785#p335785',
'details' /* url */ => 'https://github.com/Gvx-/dcScript',
'requires' /* id(s) */ => [
['core', '2.27']
],
'settings' => [
//'self' => '', // Optional: '#tab' (or false since 2.17)
//'blog' => '#params.id', // Optional: '#params.id'
//'pref' => '#user-options.id', // Optional: '#user-options.id'
],
'repository' => 'https://raw.githubusercontent.com/Gvx-/dcScript/master/dcstore.xml' // Optional: URL
]
'dcScript', // Name
'Add public script for DC', // Description
'Gvx', // Author
'4.2.0', // Version
[
'permissions' => 'My',
'type' => 'plugin',
'Priority' => 1010,
'support' /* url */ => 'http://forum.dotclear.org/viewtopic.php?pid=335785#p335785',
'details' /* url */ => 'https://github.com/Gvx-/dcScript',
'requires' /* id(s) */ => [
['core', '2.28'],
],
'settings' => [
//'self' => '', // Optional: '#tab' (or false since 2.17)
//'blog' => '#params.id', // Optional: '#params.id'
//'pref' => '#user-options.id', // Optional: '#user-options.id'
],
'repository' => 'https://raw.githubusercontent.com/Gvx-/dcScript/master/dcstore.xml', // Optional: URL
]
);

# ---------------------------------------------------------
# use codemirror version 5.65.14
# use codemirror version 5.65.15
# see: http://codemirror.net/
# ---------------------------------------------------------
4 changes: 2 additions & 2 deletions dcScript/bin/release.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Release plugin dotclear
:: Author : Gilles Grandveaux
:: Copyright: (c)2020 Gilles Grandveaux
:: Copyright: (c)2020-2023 Gilles Grandveaux
:: License : http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Changelog
::
:: * 15/08/2023 V0.1.4.5
:: Suppression de la copie du fchiers README
:: Suppression de la copie du fichiers README
:: * 13/08/2023 V0.1.3.4
:: Changement de repertoire de destination
:: Ajout la copie des fichiers README, CHANGELOG, LICENCE, dcstore
Expand Down
2 changes: 1 addition & 1 deletion dcScript/codemirror/lib/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -9867,7 +9867,7 @@

addLegacyProps(CodeMirror);

CodeMirror.version = "5.65.14";
CodeMirror.version = "5.65.15";

return CodeMirror;

Expand Down
6 changes: 3 additions & 3 deletions dcScript/dcstore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="dcScript">
<name>dcScript</name>
<version>4.1.0</version>
<version>4.2.0</version>
<author>Gvx</author>
<desc>Add public script for DC</desc>
<file>https://github.com/Gvx-/dcScript/releases/download/v4.1.0/plugin-dcScript.zip</file>
<da:dcmin>2.27</da:dcmin>
<file>https://github.com/Gvx-/dcScript/releases/download/v4.2.0/plugin-dcScript.zip</file>
<da:dcmin>2.28</da:dcmin>
<da:details>https://github.com/Gvx-/dcScript</da:details>
<da:support>http://forum.dotclear.org/viewtopic.php?pid=335785#p335785</da:support>
</module>
Expand Down
44 changes: 0 additions & 44 deletions dcScript/locales/en/help/warning.html

This file was deleted.

14 changes: 3 additions & 11 deletions dcScript/locales/en/resources.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
* @copyright © 2014-2023 Gvx
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

if(!defined('DC_CONTEXT_ADMIN')) { return; }

(function(string $pluginId): void {
# TODO:

if(!isset(dcCore::app()->resources['help']['dcScript-config'])) { dcCore::app()->resources['help']['dcScript-config'] = __DIR__.'/help/config.html'; }
if(!isset(dcCore::app()->resources['help']['dcScript-edit'])) { dcCore::app()->resources['help']['dcScript-edit'] = __DIR__.'/help/edit.html'; }
if(!isset(dcCore::app()->resources['help']['dcScript-warning'])) { dcCore::app()->resources['help']['dcScript-warning'] = __DIR__.'/help/warning.html'; }

})(basename(__DIR__));
\Dotclear\App::backend()->resources()
->set('help', 'dcScript-config', __DIR__ . '/help/config.html')
->set('help', 'dcScript-edit', __DIR__ . '/help/edit.html');
44 changes: 0 additions & 44 deletions dcScript/locales/fr/help/warning.html

This file was deleted.

60 changes: 30 additions & 30 deletions dcScript/locales/fr/main.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@

use Dotclear\Helper\L10n;

L10n::$locales['Add public script for DC'] = 'Ajout de script public pour Dotclear';
L10n::$locales['Edit public scripts'] = 'Editer les scripts public';
L10n::$locales['Add public script for DC'] = 'Ajout de script public pour Dotclear';
L10n::$locales['Edit public scripts'] = 'Editer les scripts public';
L10n::$locales['Unable to save the configuration'] = 'Impossible de sauver la configuration';
L10n::$locales['Enable %s on this blog'] = 'Activer %s pour ce blog';
L10n::$locales['Enable the plugin on this blog.'] = 'Activer le plugin pour ce blog';
L10n::$locales['Active codes'] = 'Codes actifs';
L10n::$locales['Enable header code'] = 'Activer le code du header';
L10n::$locales['Enable public header code.'] = 'Activer le code du header public';
L10n::$locales['Enable footer code'] = 'Activer le code du footer';
L10n::$locales['Enable public footer code.'] = 'Activer le code du footer public';
L10n::$locales['Extension Backup Files'] = 'Extension des fichiers de sauvegardes';
L10n::$locales['Default extension backup files.'] = 'Extension par defaut des fichiers de sauvegardes';
L10n::$locales['Enable plugin'] = 'Activer le plugin';
L10n::$locales['Header code'] = 'Code du header';
L10n::$locales['Footer code'] = 'Code du footer';
L10n::$locales['Encryption library'] = 'Bibliothèque de chiffrement';
L10n::$locales['Default settings update.'] = 'les paramètres par défaut ont été mis a jour';
L10n::$locales['Code successfully updated.'] = 'Mise à jour du code avec succès';
L10n::$locales['Unable to save the code'] = 'Impossible de sauver le code';
L10n::$locales['Unable to save the file'] = 'Impossible de sauver le fichier';
L10n::$locales['Plugin'] = 'Plugin';
L10n::$locales['Enabled'] = 'Activé';
L10n::$locales['Disabled'] = 'Désactivé';
L10n::$locales['Save header script'] = 'Enregistrer le script d\'entete';
L10n::$locales['Undo header changes'] = 'Annuler les modifications de l\'entete';
L10n::$locales['Export header script'] = 'Exporter le script d\'entete';
L10n::$locales['Save footer script'] = 'Enregistrer le script du pied de page';
L10n::$locales['Undo footer changes'] = 'Annuler les modifications du pied de page';
L10n::$locales['Export footer script'] = 'Exporter le script du pied de page';
L10n::$locales['Save the configuration'] = 'Sauver la configuration';
L10n::$locales['Undo changes'] = 'Annuler les changements';
L10n::$locales['Enable %s on this blog'] = 'Activer %s pour ce blog';
L10n::$locales['Enable the plugin on this blog.'] = 'Activer le plugin pour ce blog';
L10n::$locales['Active codes'] = 'Codes actifs';
L10n::$locales['Enable header code'] = 'Activer le code du header';
L10n::$locales['Enable public header code.'] = 'Activer le code du header public';
L10n::$locales['Enable footer code'] = 'Activer le code du footer';
L10n::$locales['Enable public footer code.'] = 'Activer le code du footer public';
L10n::$locales['Extension Backup Files'] = 'Extension des fichiers de sauvegardes';
L10n::$locales['Default extension backup files.'] = 'Extension par defaut des fichiers de sauvegardes';
L10n::$locales['Enable plugin'] = 'Activer le plugin';
L10n::$locales['Header code'] = 'Code du header';
L10n::$locales['Footer code'] = 'Code du footer';
L10n::$locales['Encryption library'] = 'Bibliothèque de chiffrement';
L10n::$locales['Default settings update.'] = 'les paramètres par défaut ont été mis a jour';
L10n::$locales['Code successfully updated.'] = 'Mise à jour du code avec succès';
L10n::$locales['Unable to save the code'] = 'Impossible de sauver le code';
L10n::$locales['Unable to save the file'] = 'Impossible de sauver le fichier';
L10n::$locales['Plugin'] = 'Plugin';
L10n::$locales['Enabled'] = 'Activé';
L10n::$locales['Disabled'] = 'Désactivé';
L10n::$locales['Save header script'] = 'Enregistrer le script d\'entete';
L10n::$locales['Undo header changes'] = 'Annuler les modifications de l\'entete';
L10n::$locales['Export header script'] = 'Exporter le script d\'entete';
L10n::$locales['Save footer script'] = 'Enregistrer le script du pied de page';
L10n::$locales['Undo footer changes'] = 'Annuler les modifications du pied de page';
L10n::$locales['Export footer script'] = 'Exporter le script du pied de page';
L10n::$locales['Save the configuration'] = 'Sauver la configuration';
L10n::$locales['Undo changes'] = 'Annuler les changements';
14 changes: 3 additions & 11 deletions dcScript/locales/fr/resources.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
* @copyright © 2014-2023 Gvx
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

if(!defined('DC_CONTEXT_ADMIN')) { return; }

(function(string $pluginId): void {
# TODO:

if(!isset(dcCore::app()->resources['help']['dcScript-config'])) { dcCore::app()->resources['help']['dcScript-config'] = __DIR__.'/help/config.html'; }
if(!isset(dcCore::app()->resources['help']['dcScript-edit'])) { dcCore::app()->resources['help']['dcScript-edit'] = __DIR__.'/help/edit.html'; }
if(!isset(dcCore::app()->resources['help']['dcScript-warning'])) { dcCore::app()->resources['help']['dcScript-warning'] = __DIR__.'/help/warning.html'; }

})(basename(__DIR__));
\Dotclear\App::backend()->resources()
->set('help', 'dcScript-config', __DIR__ . '/help/config.html')
->set('help', 'dcScript-edit', __DIR__ . '/help/edit.html');
35 changes: 19 additions & 16 deletions dcScript/src/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,31 @@

namespace Dotclear\Plugin\dcScript;

use dcCore;
use Dotclear\App;
use Dotclear\Core\Backend\Menus;
use Dotclear\Core\Process;
use initDcScript;

class Backend extends Process {

public static function init(): bool {
__('Add public script for DC'); // for L10n

class Backend extends Process
{
public static function init(): bool
{
__('Add public script for DC'); // for L10n

return self::status(My::checkContext(My::BACKEND));
}

public static function process(): bool {
if (!self::status()) { return false; }
public static function process(): bool
{
if (!self::status()) {
return false;
}

// Ajout des permissions
App::auth()->setPermissionType(dcScript::EDIT, __('Edit public scripts'));

// Ajout du menu
My::addBackendMenuItem(Menus::MENU_BLOG);

// Ajout des permissions
dcCore::app()->auth->setPermissionType(initDcScript::EDIT, __('Edit public scripts'));

// Ajout du menu
My::addBackendMenuItem(Menus::MENU_BLOG);

return self::status();
}
}
}
Loading

0 comments on commit b415cdf

Please sign in to comment.