Skip to content

Commit

Permalink
Version 2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Gvx- committed Nov 14, 2022
1 parent 73e67bf commit 7738001
Show file tree
Hide file tree
Showing 81 changed files with 5,049 additions and 1,039 deletions.
82 changes: 42 additions & 40 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
Changelog
=========

Version 2.2.0 (2020-04-xx)
--------------------------

* Correctifs divers
* Mise a niveau dcPluginHelper 216
* Version mini dc 2.16

Version 2.1.2 (2020-04-07)
--------------------------

* Correctif insertion cote public
* Correctif sauvegarde settings

Version 2.1.1 (2020-04-04)
--------------------------

* Correctif algorithme de cryptage

Version 2.1.0 (2020-03-30)
--------------------------

* Suppression de la dépendance a jQuery
* Passage a la version 5.52.0 de CodeMirror
* Changement de système de cryptage compatible PHP 7.2
* Mise a jour support
* Correction procédure désinstallation
* Corrections divers

Version 2.0.1 (2016-03-05)
--------------------------

* Correctif insertion cote public

Version 2.0.0 (2015-10-16)
--------------------------

* Première release publique
Changelog
=========

Version 2.3.0 (2022-11-14)
--------------------------

* Mise a niveau dcPluginHelper pour dc 2.24
* Version mini dc 2.24
* Ajout d'un depot alternatif
* Passage a la version 5.65.9 de CodeMirror
* Correctifs divers

Version 2.1.2 (2020-04-07)
--------------------------

* Correctif insertion cote public
* Correctif sauvegarde settings

Version 2.1.1 (2020-04-04)
--------------------------

* Correctif algorithme de cryptage

Version 2.1.0 (2020-03-30)
--------------------------

* Suppression de la dépendance a jQuery
* Passage a la version 5.52.0 de CodeMirror
* Changement de système de cryptage compatible PHP 7.2
* Mise a jour support
* Correction procédure désinstallation
* Corrections divers

Version 2.0.1 (2016-03-05)
--------------------------

* Correctif insertion cote public

Version 2.0.0 (2015-10-16)
--------------------------

* Première release publique
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ L'éditeur de code utilise la coloration syntaxique de [CodeMirror](https://code

## Pré-requis ##

* Dotclear 2.8 ou plus
* Dotclear 2.24 ou plus

## Utilisation ##

Expand Down
8 changes: 5 additions & 3 deletions dcScript/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
Changelog
=========

Version 2.2.0 (2020-05-xx)
Version 2.3.0 (2022-11-14)
--------------------------

* Mise a niveau dcPluginHelper pour dc 2.24
* Version mini dc 2.24
* Ajout d'un depot alternatif
* Passage a la version 5.65.9 de CodeMirror
* Correctifs divers
* Mise a niveau dcPluginHelper 216
* Version mini dc 2.16

Version 2.1.2 (2020-04-07)
--------------------------
Expand Down
4 changes: 2 additions & 2 deletions dcScript/_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* @package Dotclear\plungin\dcScript
*
* @author Gvx <[email protected]>
* @copyright © 2014-2020 Gvx
* @copyright © 2014-2022 Gvx
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

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

$core->dcScript->_admin();
dcCore::app()->dcScript->_admin();
4 changes: 2 additions & 2 deletions dcScript/_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* @package Dotclear\plungin\dcScript
*
* @author Gvx <[email protected]>
* @copyright © 2014-2020 Gvx
* @copyright © 2014-2022 Gvx
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

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

$core->dcScript->_config();
dcCore::app()->dcScript->_config();
16 changes: 11 additions & 5 deletions dcScript/_define.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package Dotclear\plungin\dcScript
*
* @author Gvx <[email protected]>
* @copyright © 2014-2020 Gvx
* @copyright © 2014-2022 Gvx
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

Expand All @@ -15,17 +15,23 @@
/* Name */ 'dcScript',
/* Description*/ 'Add script for DC',
/* Author */ 'Gvx',
/* Version */ '2.2.0-dev-r0015',
/* Version */ '2.3.0',
array(
/* standard plugin options dotclear */
'permissions' => 'dcScript.edit',
'permissions' => dcCore::app()->auth->makePermissions([dcScriptPerms::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) */ => array(
array('core', '2.16')
array('core', '2.24')
),
'settings' => array(
//'self' => '', // Optionnal: '#onglet' (or false since 2.17)
//'blog' => '#params.id', // Optionnal: '#params.id'
//'pref' => '#user-options.id', // Optionnal: '#user-options.id'
),
'repository' => 'https://raw.githubusercontent.com/Gvx-/dcScript/master/dcstore.xml', // Optionnal: URL
/* specific plugin options */
'_class_name' => 'dcScript', // Required: plugin master class name
'_class_path' => '/inc/class.dcScript.php', // Required: plugin master class path (relative)
Expand All @@ -35,6 +41,6 @@
);

# ---------------------------------------------------------
# use codemirror version 5.52.0
# use codemirror version 5.65.9
# see: http://codemirror.net/
# ---------------------------------------------------------
24 changes: 24 additions & 0 deletions dcScript/_init.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* This file is part of dcScript plugin for Dotclear 2.
*
* @package Dotclear\plungin\dcScript
*
* @author Gvx <[email protected]>
* @copyright © 2014-2022 Gvx
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

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


class dcScriptPerms {
// Constants

/**
* dcScript permission
*
* @var string
*/
public const EDIT = 'dcScript.edit';
}
4 changes: 2 additions & 2 deletions dcScript/_install.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* @package Dotclear\plungin\dcScript
*
* @author Gvx <[email protected]>
* @copyright © 2014-2020 Gvx
* @copyright © 2014-2022 Gvx
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

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

return $core->dcScript->_install();
return dcCore::app()->dcScript->_install();
10 changes: 5 additions & 5 deletions dcScript/_prepend.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
* @package Dotclear\plungin\dcScript
*
* @author Gvx <[email protected]>
* @copyright © 2014-2020 Gvx
* @copyright © 2014-2022 Gvx
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

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

# define id and class specific plugin
$pluginId = basename(dirname(__FILE__));
$pluginClassName = $core->plugins->moduleInfo($pluginId, '_class_name');
$pluginId = basename(__DIR__);
$pluginClassName = dcCore::app()->plugins->moduleInfo($pluginId, '_class_name');

# Loadings & initialization
if(!empty($pluginClassName)) {
$__autoload[$pluginClassName] = dirname(__FILE__).$core->plugins->moduleInfo($pluginId, '_class_path');
$core->{$pluginClassName} = new $pluginClassName($core, $pluginId);
Clearbricks::lib()->autoload([$pluginClassName => __DIR__.dcCore::app()->plugins->moduleInfo($pluginId, '_class_path')]);
dcCore::app()->{$pluginClassName} = new $pluginClassName($pluginId);
}
4 changes: 2 additions & 2 deletions dcScript/_public.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
* @package Dotclear\plungin\dcScript
*
* @author Gvx <[email protected]>
* @copyright © 2014-2020 Gvx
* @copyright © 2014-2022 Gvx
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/

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

$core->dcScript->_public();
dcCore::app()->dcScript->_public();
86 changes: 86 additions & 0 deletions dcScript/bin/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Build plugin dotclear
:: Author : Gilles Grandveaux
:: Copyright: (c)2020 Gilles Grandveaux
:: License : http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Changelog
::
:: * 08/11/2022 V0.1.3.0
:: Changement de structure copie d'un dossier
:: * 18/04/2020 V0.1.2.3
:: Correction exit sur message d'erreur et help
:: Correction protection des noms de fichiers
:: * 15/04/2020 V0.1.1.2
:: Correction check paramettres
:: * 15/04/2020 V0.1.0.1
:: version initiale
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off

setlocal enabledelayedexpansion
:: Version script
set VERSION=0.1.2.3

if /I "%~1"=="-h" goto :help
if /I "%~1"=="--help" goto :help
if /I "%~1"=="-v" echo %VERSION% & exit /b
if /I "%~1"=="--version" echo %VERSION% & exit /b
if NOT [%1]==[] goto :help

:: TODO: initialiser <source> et <dest>
::set source=%~dp0..\..\dcHelper\inc\class.dcPluginHelper.php
::set dest=%~dp0..\inc\class.dcPluginHelper.php

set source=%~dp0..\..\dcHelper\inc\_dcPluginHelper\*.*
set dest=%~dp0..\inc\_dcPluginHelper\


call :parsePath f %source% source
call :parsePath f %dest% dest

if not exist %source% call :fileError %source%
::if not exist %dest% call :fileError %dest%

::copy /y "%source%" "%dest%" >NUL
xcopy "%source%" "%dest%" /Q /I /T /E /Y >NUL

endlocal
exit /b

:help
echo --== HELP ==--
echo.
echo Usage: %~n0 [^<-v^>^|^<--version^>^|^<-h^>^|^<--help^>]
echo.
echo ^<-v^>^|^<--version^> : Display version
echo ^<-h^>^|^<--help^> : Display help
echo.
echo --== HELP ==--
pause
exit /b 1

:fileError <pathfilename>
echo --== ERREUR ==--
echo.
echo le fichier "%~1" n'a pas ete trouve.
echo.
echo --== ERREUR ==--
pause
exit 2

:parsePath <part> <pathname> <result>
set %3=%~f2
if /I "%~1"=="d" set %3=%~d2
if /I "%~1"=="p" set %3=%~p2
if /I "%~1"=="n" set %3=%~n2
if /I "%~1"=="x" set %3=%~x2
if /I "%~1"=="f" set %3=%~f2
if /I "%~1"=="s" set %3=%~s2
if /I "%~1"=="a" set %3=%~a2
if /I "%~1"=="t" set %3=%~t2
if /I "%~1"=="z" set %3=%~z2
if /I "%~1"=="dp" set %3=%~dp2
if /I "%~1"=="nx" set %3=%~nx2
if /I "%~1"=="pathSearch" set %3=%~$PATH:2 rem search in PATH
goto:eof
6 changes: 6 additions & 0 deletions dcScript/bin/excludes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
\build-tools\
.git
.vscode
.debug.php
*.bck.zip

20 changes: 20 additions & 0 deletions dcScript/bin/phpStan.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@echo off
set errorCode=0

set project=%~dp0..\phpStan.neon
if not exist %project% goto :error
echo phpStan analyse en cours...
php %userprofile%\vendor\phpstan\phpstan\phpstan analyse -c "%project%"
goto :endBatch

:error
echo.
echo /!\ -- Le fichier %project% n'a pas ete trouve.
echo.
set errorCode=1

:: https://askcodez.com/conditionnel-pause-pas-en-ligne-de-commande.html
:endBatch
echo.%cmdcmdline% | find /I "%~0" >nul
if not errorlevel 1 pause
exit /b %errorCode%
Loading

0 comments on commit 7738001

Please sign in to comment.