From 82308cce06ff492a6b13d060703fa1dbf36017db Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Wed, 11 Jan 2023 21:05:12 +0100 Subject: [PATCH] update to dotclear 2.24 (thx @gibus) --- _define.php | 25 +++++++++++++++++-------- _prepend.php | 8 ++------ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/_define.php b/_define.php index b08c0ed..91db829 100644 --- a/_define.php +++ b/_define.php @@ -13,12 +13,21 @@ if (!defined('DC_RC_PATH')) { return; } - + $this->registerModule( - /* Name */ 'Clean URLs', - /* Description */ 'Removes diacritics and punctuation from URLs', - /* Author */ 'Pierre Rudloff', - /* Version */ '0.1.1', - /* Permissions */ 'usage,contentadmin' -); -?> + 'Clean URLs', + 'Removes diacritics and punctuation from URLs', + 'Pierre Rudloff and contributors', + '1.1.1', + [ + 'requires' => [['core', '2.24']], + 'permissions' => dcCore::app()->auth->makePermissions([ + dcAuth::PERMISSION_USAGE, + dcAuth::PERMISSION_CONTENT_ADMIN, + ]), + 'type' => 'plugin', + 'support' => 'https://github.com/JcDenis/' . basename(__DIR__), + 'details' => 'https://github.com/JcDenis/' . basename(__DIR__), + 'repository' => 'https://raw.githubusercontent.com/JcDenis/' . basename(__DIR__) . '/master/dcstore.xml', + ] +); \ No newline at end of file diff --git a/_prepend.php b/_prepend.php index 1047d80..e08de6a 100644 --- a/_prepend.php +++ b/_prepend.php @@ -14,10 +14,6 @@ if (!defined('DC_RC_PATH')) { return; } -global $__autoload; -$__autoload['CleanURLs'] = dirname(__FILE__).'/CleanURLs.php'; +Clearbricks::lib()->autoload(['CleanURLs' => __DIR__ . '/CleanURLs.php']); -$core->addBehavior('coreBeforePostCreate', array('CleanURLs', 'clean')); - - -?> +dcCore::app()->addBehavior('coreBeforePostCreate', ['CleanURLs', 'clean']);