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']);