release 1.6
This commit is contained in:
parent
7f7af28bde
commit
5d5ccaf9b0
6 changed files with 36 additions and 31 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
cleanURLs 1.6 - 2023.10.07
|
||||||
|
===========================================================
|
||||||
|
* Require Dotclear 2.28
|
||||||
|
* Require PHP 8.1+
|
||||||
|
* Upgrade to Dotclear 2.28
|
||||||
|
|
||||||
cleanURLs 1.5 - 2023.08.06
|
cleanURLs 1.5 - 2023.08.06
|
||||||
===========================================================
|
===========================================================
|
||||||
* Require Dotclear 2.27
|
* Require Dotclear 2.27
|
||||||
|
|
33
README.md
33
README.md
|
@ -1,23 +1,20 @@
|
||||||
# README
|
# README
|
||||||
|
|
||||||
[![Release](https://img.shields.io/badge/release-1.5-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/cleanURLs/releases)
|
[![Release](https://img.shields.io/badge/release-1.6-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/cleanURLs/releases)
|
||||||
[![Date](https://img.shields.io/badge/date-2023.08.06-c44d58.svg)](https://git.dotclear.watch/JcDenis/cleanURLs/releases)
|
![Date](https://img.shields.io/badge/date-2023.10.07-c44d58.svg)
|
||||||
[![Dotclear](https://img.shields.io/badge/dotclear-v2.27-137bbb.svg)](https://fr.dotclear.org/download)
|
[![Dotclear](https://img.shields.io/badge/dotclear-v2.28-137bbb.svg)](https://fr.dotclear.org/download)
|
||||||
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/cleanURLs)
|
[![Dotaddict](https://img.shields.io/badge/dotaddict-official-9ac123.svg)](https://plugins.dotaddict.org/dc2/details/cleanURLs)
|
||||||
[![License](https://img.shields.io/github/license/JcDenis/cleanURLs)](https://git.dotclear.watch/JcDenis/cleanURLs/blob/master/LICENSE)
|
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/cleanURLs/src/branch/master/LICENSE)
|
||||||
|
|
||||||
## WHAT IS ENHANCEPOSTCONTENT ?
|
## ABOUT
|
||||||
|
|
||||||
"Clean URLs" is a plugin for the open-source
|
_cleanUrls_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
|
||||||
web publishing software called Dotclear.
|
|
||||||
|
|
||||||
It removes diacritics and punctuation from URLs...
|
> It removes diacritics and punctuation from URLs...
|
||||||
|
|
||||||
## REQUIREMENTS
|
## REQUIREMENTS
|
||||||
|
|
||||||
_cleanURLs_ requires:
|
* Dotclear 2.28
|
||||||
|
|
||||||
* Dotclear 2.27
|
|
||||||
|
|
||||||
## USAGE
|
## USAGE
|
||||||
|
|
||||||
|
@ -28,14 +25,14 @@ Then when a post is created, it's URL is cleaned automagically.
|
||||||
|
|
||||||
## LINKS
|
## LINKS
|
||||||
|
|
||||||
* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html)
|
* [License](https://git.dotclear.watch/JcDenis/cleanURLs/src/branch/master/LICENSE)
|
||||||
* Source & contribution : [Gitea Page](https://git.dotclear.watch/JcDenis/cleanURLs) or [GitHub Page](https://github.com/JcDenis/cleanURLs)
|
* [Packages & details](https://git.dotclear.watch/JcDenis/cleanURLs/releases) (or on [Dotaddict](https://plugins.dotaddict.org/dc2/details/cleanURLs))
|
||||||
* Packages & details: [Gitea Page](https://git.dotclear.watch/JcDenis/cleanURLs/releases) or [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/cleanURLs)
|
* [Sources & contributions](https://git.dotclear.watch/JcDenis/cleanURLs) (or on [GitHub](https://github.com/JcDenis/cleanURLs))
|
||||||
* Discuss and help : [Dotclear Forum](http://forum.dotclear.org/viewtopic.php?id=40876)
|
* [Issues & security](https://git.dotclear.watch/JcDenis/cleanURLs/issues) (or on [GitHub](https://github.com/JcDenis/cleanURLs/issues))
|
||||||
|
|
||||||
## CONTRIBUTORS
|
## CONTRIBUTORS
|
||||||
|
|
||||||
* Pierre Rudloff (author)
|
* Pierre Rudloff (author)
|
||||||
* Jean-Christian Denis
|
* Jean-Christian Denis
|
||||||
|
|
||||||
You are welcome to contribute to this code.
|
You are welcome to contribute to this code.
|
||||||
|
|
12
_define.php
12
_define.php
|
@ -14,16 +14,18 @@ if (!defined('DC_RC_PATH')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use Dotclear\App;
|
||||||
|
|
||||||
$this->registerModule(
|
$this->registerModule(
|
||||||
'Clean URLs',
|
'Clean URLs',
|
||||||
'Removes diacritics and punctuation from URLs',
|
'Removes diacritics and punctuation from URLs',
|
||||||
'Pierre Rudloff and contributors',
|
'Pierre Rudloff and contributors',
|
||||||
'1.5',
|
'1.6',
|
||||||
[
|
[
|
||||||
'requires' => [['core', '2.27']],
|
'requires' => [['core', '2.28']],
|
||||||
'permissions' => dcCore::app()->auth->makePermissions([
|
'permissions' => App::auth()->makePermissions([
|
||||||
dcCore::app()->auth::PERMISSION_USAGE,
|
App::auth()::PERMISSION_USAGE,
|
||||||
dcCore::app()->auth::PERMISSION_CONTENT_ADMIN,
|
App::auth()::PERMISSION_CONTENT_ADMIN,
|
||||||
]),
|
]),
|
||||||
'type' => 'plugin',
|
'type' => 'plugin',
|
||||||
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
|
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
<modules xmlns:da="http://dotaddict.org/da/">
|
<modules xmlns:da="http://dotaddict.org/da/">
|
||||||
<module id="cleanURLs">
|
<module id="cleanURLs">
|
||||||
<name>Clean URLs</name>
|
<name>Clean URLs</name>
|
||||||
<version>1.5</version>
|
<version>1.6</version>
|
||||||
<author>Pierre Rudloff and contributors</author>
|
<author>Pierre Rudloff and contributors</author>
|
||||||
<desc>Removes diacritics and punctuation from URLs</desc>
|
<desc>Removes diacritics and punctuation from URLs</desc>
|
||||||
<file>https://git.dotclear.watch/JcDenis/cleanURLs/releases/download/v1.5/plugin-cleanURLs.zip</file>
|
<file>https://git.dotclear.watch/JcDenis/cleanURLs/releases/download/v1.6/plugin-cleanURLs.zip</file>
|
||||||
<da:dcmin>2.27</da:dcmin>
|
<da:dcmin>2.28</da:dcmin>
|
||||||
<da:details>https://git.dotclear.watch/JcDenis/cleanURLs/src/branch/master/README.md</da:details>
|
<da:details>https://git.dotclear.watch/JcDenis/cleanURLs/src/branch/master/README.md</da:details>
|
||||||
<da:support>https://git.dotclear.watch/JcDenis/cleanURLs/issues</da:support>
|
<da:support>https://git.dotclear.watch/JcDenis/cleanURLs/issues</da:support>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Dotclear\Plugin\cleanURLs;
|
namespace Dotclear\Plugin\cleanURLs;
|
||||||
|
|
||||||
use dcBlog;
|
use Dotclear\Core\Blog;
|
||||||
use Dotclear\Database\Cursor;
|
use Dotclear\Database\Cursor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -269,10 +269,10 @@ class CleanURLs
|
||||||
/**
|
/**
|
||||||
* Clean post URLs from diacritics and punctuation.
|
* Clean post URLs from diacritics and punctuation.
|
||||||
*
|
*
|
||||||
* @param dcBlog $blog The blog instance
|
* @param Blog $blog The blog instance
|
||||||
* @param Cursor $cur The post Cursor
|
* @param Cursor $cur The post Cursor
|
||||||
* */
|
* */
|
||||||
public static function cleanPost(dcBlog $blog, Cursor $cur): void
|
public static function cleanPost(Blog $blog, Cursor $cur): void
|
||||||
{
|
{
|
||||||
$cur->setField('post_url', self::cleanStr($cur->getField('post_url')));
|
$cur->setField('post_url', self::cleanStr($cur->getField('post_url')));
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Dotclear\Plugin\cleanURLs;
|
namespace Dotclear\Plugin\cleanURLs;
|
||||||
|
|
||||||
use dcCore;
|
use Dotclear\App;
|
||||||
use Dotclear\Core\Process;
|
use Dotclear\Core\Process;
|
||||||
|
|
||||||
class Prepend extends Process
|
class Prepend extends Process
|
||||||
|
@ -30,7 +30,7 @@ class Prepend extends Process
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
dcCore::app()->addBehavior('coreBeforePostCreate', [CleanURLs::class, 'cleanPost']);
|
App::behavior()->addBehavior('coreBeforePostCreate', CleanURLs::cleanPost(...));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue