fix replacement limit

This commit is contained in:
Jean-Christian Denis 2021-11-27 18:17:07 +01:00
parent 38c3a26d3d
commit bf88d37dcf
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,7 @@
dev
- [ ] add auto-find post title in content
- [ ] add auto-find categorie
- fix remplacement limit
2021.10.06
- update translations (and remove .lang.php file)

View file

@ -135,7 +135,10 @@ class libEPC
&& is_array($filter->tplValues)
&& in_array($tag, $filter->tplValues)
&& $args[0] != '' //content
&& empty($args[2]) // remove html
&& empty($args['encode_xml'])
&& empty($args['encode_html'])
&& empty($args['remove_html'])
&& empty($args['strip_tags'])
;
}
@ -143,7 +146,7 @@ class libEPC
{
# Limit
if ($filter->limit > 0) {
$limit = in_array($filter->id() . '_' . $p, self::$epcFilterLimit) ? self::$epcFilterLimit[$filter->id() . '_' . $p] : $filter->limit;
$limit = array_key_exists($filter->id() . '_' . $p, self::$epcFilterLimit) ? self::$epcFilterLimit[$filter->id() . '_' . $p] : $filter->limit;
if ($limit < 1) {
return $s;
}