release 2023.10.13

This commit is contained in:
Jean-Christian Paul Denis 2023-10-13 20:43:55 +02:00
parent 4ec3ac9610
commit b1f644a8f3
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
7 changed files with 21 additions and 15 deletions

View File

@ -1,3 +1,9 @@
enhancePostContent 2023.10.13
===========================================================
* Require Dotclear 2.28
* Require PHP 8.1
* Upgrade to last minute change to Dotclear 2.28
enhancePostContent 2023.10.11
===========================================================
* Require Dotclear 2.28

View File

@ -1,7 +1,7 @@
# README
[![Release](https://img.shields.io/badge/release-2023.10.08-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/enhancePostContent/releases)
![Date](https://img.shields.io/badge/date-2023.10.08-c44d58.svg)
[![Release](https://img.shields.io/badge/release-2023.10.13-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/enhancePostContent/releases)
![Date](https://img.shields.io/badge/date-2023.10.13-c44d58.svg)
[![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/enhancePostContent)
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/enhancePostContent/src/branch/master/LICENSE)

View File

@ -16,7 +16,7 @@ $this->registerModule(
'Enhance post content',
'Add features to words in post content',
'Jean-Christian Denis and Contributors',
'2023.10.11',
'2023.10.13',
[
'type' => 'plugin',
'requires' => [['core', '2.28']],

View File

@ -2,10 +2,10 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="enhancePostContent">
<name>Enhance post content</name>
<version>2023.10.11</version>
<version>2023.10.13</version>
<author>Jean-Christian Denis and Contributors</author>
<desc>Add features to words in post content</desc>
<file>https://git.dotclear.watch/JcDenis/enhancePostContent/releases/download/v2023.10.11/plugin-enhancePostContent.zip</file>
<file>https://git.dotclear.watch/JcDenis/enhancePostContent/releases/download/v2023.10.13/plugin-enhancePostContent.zip</file>
<da:dcmin>2.28</da:dcmin>
<da:details>https://git.dotclear.watch/JcDenis/enhancePostContent/src/branch/master/README.md</da:details>
<da:support>https://git.dotclear.watch/JcDenis/enhancePostContent/issues</da:support>

View File

@ -420,12 +420,12 @@ class Epc
*/
public static function widgetContentEntryExcerpt(?WidgetsElement $widget = null): string
{
if (!App::frontend()->ctx->exists('posts')) {
if (!App::frontend()->context()->exists('posts')) {
return '';
}
$content = '';
while (App::frontend()->ctx->__get('posts')?->fetch()) {
while (App::frontend()->context()->__get('posts')?->fetch()) {
$content .= App::frontend()->__get('posts')->f('post_excerpt');
}
@ -441,13 +441,13 @@ class Epc
*/
public static function widgetContentEntryContent(?WidgetsElement $widget = null): string
{
if (!App::frontend()->ctx->exists('posts')) {
if (!App::frontend()->context()->exists('posts')) {
return '';
}
$content = '';
while (App::frontend()->ctx->__get('posts')?->fetch()) {
$content .= App::frontend()->ctx->__get('posts')->f('post_content');
while (App::frontend()->context()->__get('posts')?->fetch()) {
$content .= App::frontend()->context()->__get('posts')->f('post_content');
}
return $content;
@ -462,13 +462,13 @@ class Epc
*/
public static function widgetContentCommentContent(?WidgetsElement $widget = null): string
{
if (!App::frontend()->ctx->exists('posts')) {
if (!App::frontend()->context()->exists('posts')) {
return '';
}
$content = '';
while (App::frontend()->ctx->__get('posts')->fetch()) {
$comments = App::blog()->getComments(['post_id' => App::frontend()->ctx->__get('posts')->f('post_id')]);
while (App::frontend()->context()->__get('posts')->fetch()) {
$comments = App::blog()->getComments(['post_id' => App::frontend()->context()->__get('posts')->f('post_id')]);
while ($comments->fetch()) {
$content .= $comments->__call('getContent', []);
}

View File

@ -37,7 +37,7 @@ class Frontend extends Process
'publicBeforeContentFilterV2' => function (string $tag, array $args): void {
foreach (Epc::getFilters()->dump() as $filter) {
// test context
if (in_array((string) App::frontend()->ctx->__get('current_tpl'), $filter->page)
if (in_array((string) App::frontend()->context()->__get('current_tpl'), $filter->page)
&& in_array($tag, $filter->template)
&& $args[0] != '' //content
&& empty($args['encode_xml'])

View File

@ -87,7 +87,7 @@ class Widgets
# Page
if (!My::settings()->get('active')
|| !in_array(App::frontend()->ctx->__get('current_tpl'), ['post.html', 'page.html'])
|| !in_array(App::frontend()->context()->__get('current_tpl'), ['post.html', 'page.html'])
) {
return '';
}