upgrade to Dotclear 2.28
This commit is contained in:
parent
1e9182d3fd
commit
48400b5b82
@ -1,3 +1,9 @@
|
||||
comListe 0.9 - 2023.10.15
|
||||
===========================================================
|
||||
* Require dotclear 2.28
|
||||
* Require PHP 8.1
|
||||
* Upgrade to Dotclear 2.28
|
||||
|
||||
comListe 0.8 - 2023.08.06
|
||||
===========================================================
|
||||
* Require dotclear 2.27
|
||||
|
38
README.md
38
README.md
@ -1,24 +1,22 @@
|
||||
# README
|
||||
|
||||
[![Release](https://img.shields.io/badge/release-0.8-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/comListe/releases)
|
||||
[![Date](https://img.shields.io/badge/date-2023.08.06-c44d58.svg)](https://git.dotclear.watch/JcDenis/comListe/releases)
|
||||
[![Dotclear](https://img.shields.io/badge/dotclear-v2.26-137bbb.svg)](https://fr.dotclear.org/download)
|
||||
[![Release](https://img.shields.io/badge/release-0.9-a2cbe9.svg)](https://git.dotclear.watch/JcDenis/comListe/releases)
|
||||
![Date](https://img.shields.io/badge/date-2023.10.15-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/comListe)
|
||||
[![License](https://img.shields.io/github/license/JcDenis/comListe)](https://git.dotclear.watch/JcDenis/comListe/blob/master/LICENSE)
|
||||
[![License](https://img.shields.io/badge/license-GPL--2.0-ececec.svg)](https://git.dotclear.watch/JcDenis/comListe/src/branch/master/LICENSE)
|
||||
|
||||
## WHAT IS COMLISTE ?
|
||||
## ABOUT
|
||||
|
||||
_comListe_ is a plugin for the open-source
|
||||
web publishing software called Dotclear.
|
||||
_comListe_ is a plugin for the open-source web publishing software called [Dotclear](https://www.dotclear.org).
|
||||
|
||||
It adds public page of all comments and trackbacks.
|
||||
> Add public page of all comments and trackbacks.
|
||||
|
||||
## REQUIREMENTS
|
||||
|
||||
_comListe_ requires:
|
||||
|
||||
* admin perms for configuration
|
||||
* Dotclear 2.27
|
||||
* Dotclear 2.28
|
||||
* PHP 8.1
|
||||
* Dotclear admin permissons for configuration
|
||||
|
||||
## USAGE
|
||||
|
||||
@ -35,15 +33,15 @@ to your theme tpl path and adapt them.
|
||||
|
||||
## LINKS
|
||||
|
||||
* License : [GNU GPL v2](https://www.gnu.org/licenses/old-licenses/lgpl-2.0.html)
|
||||
* Source & contribution : [Gitea Page](https://git.dotclear.watch/JcDenis/comListe) or [GitHub Page](https://github.com/JcDenis/comListe)
|
||||
* Packages & details: [Gitea Page](https://git.dotclear.watch/JcDenis/comListe/releases) or [Dotaddict Page](https://plugins.dotaddict.org/dc2/details/comListe)
|
||||
* Discuss and help : [Dotclear Forum](https://forum.dotclear.org/viewtopic.php?id=333985)
|
||||
* [Packages & details](https://git.dotclear.watch/JcDenis/comListe/releases) (or on [Dotaddict](https://plugins.dotaddict.org/dc2/details/comListe))
|
||||
* [Sources & contributions](https://git.dotclear.watch/JcDenis/comListe) (or on [GitHub](https://github.com/JcDenis/comListe))
|
||||
* [Issues & security](https://git.dotclear.watch/JcDenis/comListe/issues) (or on [GitHub](https://github.com/JcDenis/comListe/issues))
|
||||
* [Discuss & help](https://forum.dotclear.org/viewtopic.php?id=333985)
|
||||
|
||||
## CONTRIBUTORS
|
||||
|
||||
* Benoit de Marne (author)
|
||||
* Pierre Van Glabeke
|
||||
* Jean-Christian Denis
|
||||
* Benoit de Marne (author)
|
||||
* Pierre Van Glabeke
|
||||
* Jean-Christian Denis (latest)
|
||||
|
||||
You are welcome to contribute to this code.
|
||||
You are welcome to contribute to this code.
|
||||
|
38
_define.php
38
_define.php
@ -1,35 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
* @file
|
||||
* @brief The plugin comListe definition
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
* @defgroup comListe Plugin comListe.
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
* Display a list of all comments and trackbacks of a blog in a public page.
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
if (!defined('DC_RC_PATH')) {
|
||||
return null;
|
||||
}
|
||||
declare(strict_types=1);
|
||||
|
||||
$this->registerModule(
|
||||
'Comments list',
|
||||
'Display a list of all comments and trackbacks of a blog in a public page',
|
||||
'Benoit de Marne, Pierre Van Glabeke and contributors',
|
||||
'0.8',
|
||||
'0.9',
|
||||
[
|
||||
'requires' => [['core', '2.26']],
|
||||
'permissions' => dcCore::app()->auth->makePermissions([
|
||||
dcCore::app()->auth::PERMISSION_ADMIN,
|
||||
]),
|
||||
'type' => 'plugin',
|
||||
'settings' => [
|
||||
'self' => '',
|
||||
],
|
||||
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
|
||||
'details' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/src/branch/master/README.md',
|
||||
'repository' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/raw/branch/master/dcstore.xml',
|
||||
'requires' => [['core', '2.28']],
|
||||
'permissions' => 'My',
|
||||
'type' => 'plugin',
|
||||
'settings' => ['self' => ''],
|
||||
'support' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/issues',
|
||||
'details' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/src/branch/master/README.md',
|
||||
'repository' => 'https://git.dotclear.watch/JcDenis/' . basename(__DIR__) . '/raw/branch/master/dcstore.xml',
|
||||
]
|
||||
);
|
||||
|
@ -2,11 +2,11 @@
|
||||
<modules xmlns:da="http://dotaddict.org/da/">
|
||||
<module id="comListe">
|
||||
<name>Comments list</name>
|
||||
<version>0.8</version>
|
||||
<version>0.9</version>
|
||||
<author>Benoit de Marne, Pierre Van Glabeke and contributors</author>
|
||||
<desc>Display a list of all comments and trackbacks of a blog in a public page</desc>
|
||||
<file>https://git.dotclear.watch/JcDenis/comListe/releases/download/v0.8/plugin-comListe.zip</file>
|
||||
<da:dcmin>2.26</da:dcmin>
|
||||
<file>https://git.dotclear.watch/JcDenis/comListe/releases/download/v0.9/plugin-comListe.zip</file>
|
||||
<da:dcmin>2.28</da:dcmin>
|
||||
<da:details>https://git.dotclear.watch/JcDenis/comListe/src/branch/master/README.md</da:details>
|
||||
<da:support>https://git.dotclear.watch/JcDenis/comListe/issues</da:support>
|
||||
</module>
|
||||
|
@ -1,13 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
* @file
|
||||
* @brief The plugin locales resources
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
* @author Tomtom (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
dcCore::app()->resources['help']['comListe'] = __DIR__ . '/help/comListe.html';
|
||||
|
@ -1,13 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
* @file
|
||||
* @brief The plugin locales resources
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
* @author Tomtom (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
dcCore::app()->resources['help']['comListe'] = __DIR__ . '/help/comListe.html';
|
||||
|
@ -1,24 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\comListe;
|
||||
|
||||
use ArrayObject;
|
||||
use dcCore;
|
||||
use Dotclear\App;
|
||||
use Dotclear\Core\Backend\Favorites;
|
||||
use Dotclear\Core\Process;
|
||||
|
||||
/**
|
||||
* @brief comListe backend class.
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Backend extends Process
|
||||
{
|
||||
public static function init(): bool
|
||||
@ -35,7 +33,7 @@ class Backend extends Process
|
||||
// Admin menu
|
||||
My::addBackendMenuItem();
|
||||
|
||||
dcCore::app()->addBehaviors([
|
||||
App::behavior()->addBehaviors([
|
||||
// Dashboard favorites
|
||||
'adminDashboardFavoritesV2' => function (Favorites $favs): void {
|
||||
$favs->register(My::id(), [
|
||||
@ -43,7 +41,7 @@ class Backend extends Process
|
||||
'url' => My::manageUrl(),
|
||||
'small-icon' => My::icons(),
|
||||
'large-icon' => My::icons(),
|
||||
'permissions' => dcCore::app()->auth->makePermissions([dcCore::app()->auth::PERMISSION_ADMIN]),
|
||||
'permissions' => App::auth()->makePermissions([App::auth()::PERMISSION_ADMIN]),
|
||||
]);
|
||||
},
|
||||
'adminSimpleMenuAddType' => function (ArrayObject $items): void {
|
||||
@ -53,7 +51,7 @@ class Backend extends Process
|
||||
if (My::id() == $type) {
|
||||
$item[0] = My::name();
|
||||
$item[1] = My::settings()->get('page_title') ?? My::name();
|
||||
$item[2] = dcCore::app()->admin->__get('blog_url') . dcCore::app()->url->getURLFor(My::id());
|
||||
$item[2] = App::backend()->__get('blog_url') . App::url()->getURLFor(My::id());
|
||||
}
|
||||
},
|
||||
]);
|
||||
|
@ -1,22 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\comListe;
|
||||
|
||||
use dcCore;
|
||||
use Dotclear\App;
|
||||
use Dotclear\Core\Process;
|
||||
|
||||
/**
|
||||
* @brief comListe frontend class.
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Frontend extends Process
|
||||
{
|
||||
public static function init(): bool
|
||||
@ -34,22 +32,22 @@ class Frontend extends Process
|
||||
return false;
|
||||
}
|
||||
|
||||
dcCore::app()->tpl->addValue('ComListeURL', [Template::class,'comListeURL']);
|
||||
dcCore::app()->tpl->addValue('ComListePageTitle', [Template::class,'comListePageTitle']);
|
||||
dcCore::app()->tpl->addValue('ComListeNbComments', [Template::class,'comListeNbComments']);
|
||||
dcCore::app()->tpl->addValue('ComListeNbCommentsPerPage', [Template::class,'comListeNbCommentsPerPage']);
|
||||
dcCore::app()->tpl->addBlock('ComListeCommentsEntries', [Template::class,'comListeCommentsEntries']);
|
||||
dcCore::app()->tpl->addValue('ComListePaginationLinks', [Template::class,'comListePaginationLinks']);
|
||||
dcCore::app()->tpl->addValue('ComListeOpenPostTitle', [Template::class,'comListeOpenPostTitle']);
|
||||
dcCore::app()->tpl->addValue('ComListeCommentOrderNumber', [Template::class,'comListeCommentOrderNumber']);
|
||||
App::frontend()->template()->addValue('ComListeURL', Template::comListeURL(...));
|
||||
App::frontend()->template()->addValue('ComListePageTitle', Template::comListePageTitle(...));
|
||||
App::frontend()->template()->addValue('ComListeNbComments', Template::comListeNbComments(...));
|
||||
App::frontend()->template()->addValue('ComListeNbCommentsPerPage', Template::comListeNbCommentsPerPage(...));
|
||||
App::frontend()->template()->addBlock('ComListeCommentsEntries', Template::comListeCommentsEntries(...));
|
||||
App::frontend()->template()->addValue('ComListePaginationLinks', Template::comListePaginationLinks(...));
|
||||
App::frontend()->template()->addValue('ComListeOpenPostTitle', Template::comListeOpenPostTitle(...));
|
||||
App::frontend()->template()->addValue('ComListeCommentOrderNumber', Template::comListeCommentOrderNumber(...));
|
||||
|
||||
dcCore::app()->tpl->addBlock('ComListePagination', [Template::class,'comListePagination']);
|
||||
dcCore::app()->tpl->addValue('ComListePaginationCounter', [Template::class,'comListePaginationCounter']);
|
||||
dcCore::app()->tpl->addValue('ComListePaginationCurrent', [Template::class,'comListePaginationCurrent']);
|
||||
dcCore::app()->tpl->addBlock('ComListePaginationIf', [Template::class,'comListePaginationIf']);
|
||||
dcCore::app()->tpl->addValue('ComListePaginationURL', [Template::class,'comListePaginationURL']);
|
||||
App::frontend()->template()->addBlock('ComListePagination', Template::comListePagination(...));
|
||||
App::frontend()->template()->addValue('ComListePaginationCounter', Template::comListePaginationCounter(...));
|
||||
App::frontend()->template()->addValue('ComListePaginationCurrent', Template::comListePaginationCurrent(...));
|
||||
App::frontend()->template()->addBlock('ComListePaginationIf', Template::comListePaginationIf(...));
|
||||
App::frontend()->template()->addValue('ComListePaginationURL', Template::comListePaginationURL(...));
|
||||
|
||||
dcCore::app()->addBehavior(
|
||||
App::behavior()->addBehavior(
|
||||
'publicBreadcrumb',
|
||||
function (string $context, string $separator): ?string {
|
||||
if ($context == 'comListe') {
|
||||
|
@ -1,23 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\comListe;
|
||||
|
||||
use dcCore;
|
||||
use Dotclear\App;
|
||||
use Dotclear\Core\Process;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* @brief comListe install class.
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Install extends Process
|
||||
{
|
||||
public static function init(): bool
|
||||
@ -31,10 +29,6 @@ class Install extends Process
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_null(dcCore::app()->blog)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
$s = My::settings();
|
||||
$s->put('enable', false, 'boolean', 'Enable comListe', false, true);
|
||||
@ -44,7 +38,7 @@ class Install extends Process
|
||||
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
dcCore::app()->error->add($e->getMessage());
|
||||
App::error()->add($e->getMessage());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1,20 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\comListe;
|
||||
|
||||
use dcCore;
|
||||
use Dotclear\App;
|
||||
use Dotclear\Core\Backend\{
|
||||
Notices,
|
||||
Page
|
||||
@ -36,6 +26,14 @@ use Dotclear\Helper\Html\Form\{
|
||||
use Dotclear\Helper\Html\Html;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* @brief comListe manage class.
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Manage extends Process
|
||||
{
|
||||
public static function init(): bool
|
||||
@ -49,7 +47,7 @@ class Manage extends Process
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_null(dcCore::app()->blog)) {
|
||||
if (!App::blog()->isDefined()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -67,11 +65,11 @@ class Manage extends Process
|
||||
$s->put('nb_comments_per_page', $_POST['comliste_nb_comments_per_page'] ?? 10);
|
||||
$s->put('comments_order', $_POST['comliste_comments_order'] == 'asc' ? 'asc' : 'desc');
|
||||
|
||||
dcCore::app()->blog->triggerBlog();
|
||||
App::blog()->triggerBlog();
|
||||
Notices::addSuccessNotice(__('Configuration successfully updated.'));
|
||||
My::redirect();
|
||||
} catch (Exception $e) {
|
||||
dcCore::app()->error->add($e->getMessage());
|
||||
App::error()->add($e->getMessage());
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -83,7 +81,7 @@ class Manage extends Process
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_null(dcCore::app()->blog)) {
|
||||
if (!App::blog()->isDefined()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -92,8 +90,8 @@ class Manage extends Process
|
||||
Page::openModule(My::name());
|
||||
|
||||
echo Page::breadcrumb([
|
||||
Html::escapeHTML(dcCore::app()->blog->name) => '',
|
||||
My::name() => '',
|
||||
Html::escapeHTML(App::blog()->name()) => '',
|
||||
My::name() => '',
|
||||
]) .
|
||||
Notices::getNotices() .
|
||||
|
||||
|
20
src/My.php
20
src/My.php
@ -1,15 +1,5 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\comListe;
|
||||
@ -17,8 +7,14 @@ namespace Dotclear\Plugin\comListe;
|
||||
use Dotclear\Module\MyPlugin;
|
||||
|
||||
/**
|
||||
* This module definitions.
|
||||
* @brief comListe My helper.
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class My extends MyPlugin
|
||||
{
|
||||
// Use default permissions
|
||||
}
|
||||
|
@ -1,22 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\comListe;
|
||||
|
||||
use dcCore;
|
||||
use Dotclear\App;
|
||||
use Dotclear\Core\Process;
|
||||
|
||||
/**
|
||||
* @brief comListe prepend class.
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Prepend extends Process
|
||||
{
|
||||
public static function init(): bool
|
||||
@ -30,11 +28,11 @@ class Prepend extends Process
|
||||
return false;
|
||||
}
|
||||
|
||||
dcCore::app()->url->register(
|
||||
App::url()->register(
|
||||
'comListe',
|
||||
'comListe',
|
||||
'^comListe(?:/(.+))?$',
|
||||
[UrlHandler::class, 'comListe']
|
||||
UrlHandler::comListe(...)
|
||||
);
|
||||
|
||||
return true;
|
||||
|
116
src/Template.php
116
src/Template.php
@ -1,23 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\comListe;
|
||||
|
||||
use ArrayObject;
|
||||
use dcCore;
|
||||
use Dotclear\App;
|
||||
use Dotclear\Helper\Html\Html;
|
||||
|
||||
/**
|
||||
* @brief comListe frontend template class.
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Template
|
||||
{
|
||||
public string $html_prev = '«prev.';
|
||||
@ -26,36 +24,36 @@ class Template
|
||||
/* ComListeURL --------------------------------------- */
|
||||
public static function comListeURL(ArrayObject $attr): string
|
||||
{
|
||||
return '<?php echo ' . sprintf(dcCore::app()->tpl->getFilters($attr), 'dcCore::app()->blog->url.dcCore::app()->url->getBase("comListe")') . '; ?>';
|
||||
return '<?php echo ' . sprintf(App::frontend()->template()->getFilters($attr), 'App::blog()->url.App::url()->getBase("comListe")') . '; ?>';
|
||||
}
|
||||
|
||||
/* ComListePageTitle --------------------------------------- */
|
||||
public static function comListePageTitle(ArrayObject $attr): string
|
||||
{
|
||||
return '<?php echo ' . sprintf(dcCore::app()->tpl->getFilters($attr), 'dcCore::app()->blog->settings->get("' . My::id() . '")->get("page_title")') . '; ?>';
|
||||
return '<?php echo ' . sprintf(App::frontend()->template()->getFilters($attr), 'App::blog()->settings()->get("' . My::id() . '")->get("page_title")') . '; ?>';
|
||||
}
|
||||
|
||||
/* ComListeNbCommentsPerPage --------------------------------------- */
|
||||
public static function comListeNbCommentsPerPage(ArrayObject $attr): string
|
||||
{
|
||||
if (is_null(dcCore::app()->blog) || is_null(dcCore::app()->ctx)) {
|
||||
if (!App::blog()->isDefined()) {
|
||||
return '10';
|
||||
}
|
||||
dcCore::app()->ctx->__set('nb_comment_per_page', (int) My::settings()->get('nb_comments_per_page'));
|
||||
App::frontend()->context()->__set('nb_comment_per_page', (int) My::settings()->get('nb_comments_per_page'));
|
||||
|
||||
return Html::escapeHTML((string) dcCore::app()->ctx->__get('nb_comment_per_page'));
|
||||
return Html::escapeHTML((string) App::frontend()->context()->__get('nb_comment_per_page'));
|
||||
}
|
||||
|
||||
/* comListeNbComments --------------------------------------- */
|
||||
public static function comListeNbComments(ArrayObject$attr): string
|
||||
{
|
||||
if (is_null(dcCore::app()->blog) || is_null(dcCore::app()->ctx)) {
|
||||
if (!App::blog()->isDefined()) {
|
||||
return '0';
|
||||
}
|
||||
if (!dcCore::app()->ctx->exists('pagination')) {
|
||||
dcCore::app()->ctx->__set('pagination', dcCore::app()->blog->getComments([], true));
|
||||
if (!App::frontend()->context()->exists('pagination')) {
|
||||
App::frontend()->context()->__set('pagination', App::blog()->getComments([], true));
|
||||
}
|
||||
$nb_comments = dcCore::app()->ctx->__get('pagination')->f(0);
|
||||
$nb_comments = App::frontend()->context()->__get('pagination')->f(0);
|
||||
|
||||
return Html::escapeHTML((string) $nb_comments);
|
||||
}
|
||||
@ -63,9 +61,9 @@ class Template
|
||||
/* ComListeCommentsEntries --------------------------------------- */
|
||||
public static function comListeCommentsEntries(ArrayObject $attr, string $content): string
|
||||
{
|
||||
$p = 'if (dcCore::app()->ctx->posts !== null) { ' .
|
||||
"\$params['post_id'] = dcCore::app()->ctx->posts->post_id; " .
|
||||
"dcCore::app()->blog->withoutPassword(false);\n" .
|
||||
$p = 'if (App::frontend()->context()->posts !== null) { ' .
|
||||
"\$params['post_id'] = App::frontend()->context()->posts->post_id; " .
|
||||
"App::blog()->withoutPassword(false);\n" .
|
||||
"}\n";
|
||||
|
||||
if (empty($attr['with_pings'])) {
|
||||
@ -80,23 +78,23 @@ class Template
|
||||
if ($lastn > 0) {
|
||||
$p .= "\$params['limit'] = " . $lastn . ";\n";
|
||||
} else {
|
||||
$p .= "if (dcCore::app()->ctx->nb_comment_per_page !== null) { \$params['limit'] = dcCore::app()->ctx->nb_comment_per_page; }\n";
|
||||
$p .= "if (App::frontend()->context()->nb_comment_per_page !== null) { \$params['limit'] = App::frontend()->context()->nb_comment_per_page; }\n";
|
||||
}
|
||||
|
||||
$p .= "\$params['limit'] = array(((dcCore::app()->public->getPageNumber()-1)*\$params['limit']),\$params['limit']);\n";
|
||||
$p .= "\$params['limit'] = array(((App::frontend()->getPageNumber()-1)*\$params['limit']),\$params['limit']);\n";
|
||||
|
||||
if (empty($attr['no_context'])) {
|
||||
$p .= 'if (dcCore::app()->ctx->exists("categories")) { ' .
|
||||
"\$params['cat_id'] = dcCore::app()->ctx->categories->cat_id; " .
|
||||
$p .= 'if (App::frontend()->context()->exists("categories")) { ' .
|
||||
"\$params['cat_id'] = App::frontend()->context()->categories->cat_id; " .
|
||||
"}\n";
|
||||
|
||||
$p .= 'if (dcCore::app()->ctx->exists("langs")) { ' .
|
||||
"\$params['sql'] = \"AND P.post_lang = '\".dcCore::app()->blog->con->escapeStr((string) dcCore::app()->langs->post_lang).\"' \"; " .
|
||||
$p .= 'if (App::frontend()->context()->exists("langs")) { ' .
|
||||
"\$params['sql'] = \"AND P.post_lang = '\".App::con()->escapeStr((string) App::frontend()->context()->langs->post_lang).\"' \"; " .
|
||||
"}\n";
|
||||
}
|
||||
|
||||
// Sens de tri issu des paramètres du plugin
|
||||
$order = is_null(dcCore::app()->blog) ? 'desc' : My::settings()->get('comments_order');
|
||||
$order = !App::blog()->isDefined() ? 'desc' : My::settings()->get('comments_order');
|
||||
if (isset($attr['order']) && preg_match('/^(desc|asc)$/i', $attr['order'])) {
|
||||
$order = $attr['order'];
|
||||
}
|
||||
@ -109,17 +107,17 @@ class Template
|
||||
|
||||
$res = "<?php\n";
|
||||
$res .= $p;
|
||||
$res .= 'dcCore::app()->ctx->comments_params = $params; ';
|
||||
$res .= 'dcCore::app()->ctx->comments = dcCore::app()->blog->getComments($params); unset($params);' . "\n";
|
||||
$res .= "if (dcCore::app()->ctx->posts !== null) { dcCore::app()->blog->withoutPassword(true);}\n";
|
||||
$res .= 'App::frontend()->context()->comments_params = $params; ';
|
||||
$res .= 'App::frontend()->context()->comments = App::blog()->getComments($params); unset($params);' . "\n";
|
||||
$res .= "if (App::frontend()->context()->posts !== null) { App::blog()->withoutPassword(true);}\n";
|
||||
|
||||
if (!empty($attr['with_pings'])) {
|
||||
$res .= 'dcCore::app()->ctx->pings = dcCore::app()->ctx->comments;' . "\n";
|
||||
$res .= 'App::frontend()->context()->pings = App::frontend()->context()->comments;' . "\n";
|
||||
}
|
||||
|
||||
$res .= "?>\n";
|
||||
|
||||
$res .= '<?php while (dcCore::app()->ctx->comments->fetch()) : ?>' . $content . '<?php endwhile; dcCore::app()->ctx->pop("comments"); ?>';
|
||||
$res .= '<?php while (App::frontend()->context()->comments->fetch()) : ?>' . $content . '<?php endwhile; App::frontend()->context()->pop("comments"); ?>';
|
||||
|
||||
return $res;
|
||||
}
|
||||
@ -131,10 +129,10 @@ class Template
|
||||
$p = '<?php
|
||||
|
||||
function comListeMakePageLink($pageNumber, $linkText) {
|
||||
if ($pageNumber != dcCore::app()->public->getPageNumber()) {
|
||||
if ($pageNumber != App::frontend()->getPageNumber()) {
|
||||
$args = $_SERVER["URL_REQUEST_PART"];
|
||||
$args = preg_replace("#(^|/)page/([0-9]+)$#","",$args);
|
||||
$url = dcCore::app()->blog->url.$args;
|
||||
$url = App::blog()->url().$args;
|
||||
|
||||
if ($pageNumber > 1) {
|
||||
$url = preg_replace("#/$#","",$url);
|
||||
@ -152,20 +150,20 @@ class Template
|
||||
}
|
||||
}
|
||||
|
||||
$current = dcCore::app()->public->getPageNumber();
|
||||
$current = App::frontend()->getPageNumber();
|
||||
|
||||
if(empty($params)) {
|
||||
dcCore::app()->ctx->pagination = dcCore::app()->blog->getComments(null,true);
|
||||
App::frontend()->context()->pagination = App::blog()->getComments(null,true);
|
||||
} else {
|
||||
dcCore::app()->ctx->pagination = dcCore::app()->blog->getComments($params,true);
|
||||
App::frontend()->context()->pagination = App::blog()->getComments($params,true);
|
||||
unset($params);
|
||||
}
|
||||
|
||||
if (dcCore::app()->ctx->exists("pagination")) {
|
||||
$nb_comments = dcCore::app()->ctx->pagination->f(0);
|
||||
if (App::frontend()->context()->exists("pagination")) {
|
||||
$nb_comments = App::frontend()->context()->pagination->f(0);
|
||||
}
|
||||
|
||||
$nb_per_page = abs((integer) dcCore::app()->blog->settings->get("' . My::id() . '")->get("nb_comments_per_page"));
|
||||
$nb_per_page = abs((integer) App::blog()->settings->get("' . My::id() . '")->get("nb_comments_per_page"));
|
||||
$nb_pages = ceil($nb_comments/$nb_per_page);
|
||||
$nb_max_pages = 10;
|
||||
$nb_sequence = 2*3+1;
|
||||
@ -222,17 +220,17 @@ class Template
|
||||
{
|
||||
return
|
||||
'<?php echo ' .
|
||||
'dcCore::app()->ctx->comments->index() + 1 +' .
|
||||
'(dcCore::app()->public->getPageNumber() - 1) * ' .
|
||||
'abs((integer) dcCore::app()->blog->settings->get("' . My::id() . '")->get("nb_comments_per_page"));' .
|
||||
'App::frontend()->context()->comments->index() + 1 +' .
|
||||
'(App::frontend()->getPageNumber() - 1) * ' .
|
||||
'abs((integer) App::blog()->settings()->get("' . My::id() . '")->get("nb_comments_per_page"));' .
|
||||
'?>';
|
||||
}
|
||||
|
||||
public static function comListePagination(ArrayObject $attr, string $content): string
|
||||
{
|
||||
$params = "<?php\n" .
|
||||
'$params = dcCore::app()->ctx->comments_params;' . "\n" .
|
||||
dcCore::app()->callBehavior(
|
||||
'$params = App::frontend()->context()->comments_params;' . "\n" .
|
||||
App::behavior()->callBehavior(
|
||||
'templatePrepareParams',
|
||||
[
|
||||
'tag' => 'Pagination',
|
||||
@ -241,7 +239,7 @@ class Template
|
||||
$attr,
|
||||
$content
|
||||
) .
|
||||
'dcCore::app()->ctx->pagination = dcCore::app()->blog->getComments($params,true); unset($params);' . "\n" .
|
||||
'App::frontend()->context()->pagination = App::blog()->getComments($params,true); unset($params);' . "\n" .
|
||||
"?>\n";
|
||||
|
||||
if (isset($attr['no_context']) && $attr['no_context']) {
|
||||
@ -250,27 +248,27 @@ class Template
|
||||
|
||||
return
|
||||
"<?php\n" .
|
||||
'$bakcup_old_nbpp = dcCore::app()->ctx->nb_entry_per_page; ' . "\n" .
|
||||
'dcCore::app()->ctx->nb_entry_per_page = abs((integer) dcCore::app()->blog->settings->get("' . My::id() . '")->get("nb_comments_per_page"));' . "\n" .
|
||||
'$bakcup_old_nbpp = App::frontend()->context()->nb_entry_per_page; ' . "\n" .
|
||||
'App::frontend()->context()->nb_entry_per_page = abs((integer) App::blog()->settings()->get("' . My::id() . '")->get("nb_comments_per_page"));' . "\n" .
|
||||
"?>\n" .
|
||||
$params .
|
||||
'<?php if (dcCore::app()->ctx->pagination->f(0) > dcCore::app()->ctx->comments->count()) : ?>' .
|
||||
'<?php if (App::frontend()->context()->pagination->f(0) > App::frontend()->context()->comments->count()) : ?>' .
|
||||
$content .
|
||||
"<?php endif;\n" .
|
||||
'dcCore::app()->ctx->nb_entry_per_page = $bakcup_old_nbpp; ' . "\n" .
|
||||
'App::frontend()->context()->nb_entry_per_page = $bakcup_old_nbpp; ' . "\n" .
|
||||
'?>';
|
||||
}
|
||||
|
||||
public static function comListePaginationCounter(ArrayObject $attr): string
|
||||
{
|
||||
return '<?php echo ' . sprintf(dcCore::app()->tpl->getFilters($attr), 'dcCore::app()->ctx::PaginationNbPages()') . '; ?>';
|
||||
return '<?php echo ' . sprintf(App::frontend()->template()->getFilters($attr), 'App::frontend()->context()::PaginationNbPages()') . '; ?>';
|
||||
}
|
||||
|
||||
public static function comListePaginationCurrent(ArrayObject $attr): string
|
||||
{
|
||||
$offset = isset($attr['offset']) ? (int) $attr['offset'] : 0;
|
||||
|
||||
return '<?php echo ' . sprintf(dcCore::app()->tpl->getFilters($attr), 'dcCore::app()->ctx::PaginationPosition(' . $offset . ')') . '; ?>';
|
||||
return '<?php echo ' . sprintf(App::frontend()->template()->getFilters($attr), 'App::frontend()->context()::PaginationPosition(' . $offset . ')') . '; ?>';
|
||||
}
|
||||
|
||||
public static function comListePaginationIf(ArrayObject $attr, string $content): string
|
||||
@ -279,12 +277,12 @@ class Template
|
||||
|
||||
if (isset($attr['start'])) {
|
||||
$sign = (bool) $attr['start'] ? '' : '!';
|
||||
$if[] = $sign . 'dcCore::app()->ctx::PaginationStart()';
|
||||
$if[] = $sign . 'App::frontend()->context()::PaginationStart()';
|
||||
}
|
||||
|
||||
if (isset($attr['end'])) {
|
||||
$sign = (bool) $attr['end'] ? '' : '!';
|
||||
$if[] = $sign . 'dcCore::app()->ctx::PaginationEnd()';
|
||||
$if[] = $sign . 'App::frontend()->context()::PaginationEnd()';
|
||||
}
|
||||
|
||||
if (count($if)) {
|
||||
@ -301,6 +299,6 @@ class Template
|
||||
$offset = (int) $attr['offset'];
|
||||
}
|
||||
|
||||
return '<?php echo ' . sprintf(dcCore::app()->tpl->getFilters($attr), 'dcCore::app()->ctx::PaginationURL(' . $offset . ')') . '; ?>';
|
||||
return '<?php echo ' . sprintf(App::frontend()->template()->getFilters($attr), 'App::frontend()->context()::PaginationURL(' . $offset . ')') . '; ?>';
|
||||
}
|
||||
}
|
||||
|
@ -1,23 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\comListe;
|
||||
|
||||
use dcCore;
|
||||
use Dotclear\Core\Process;
|
||||
use Dotclear\Plugin\Uninstaller\Uninstaller;
|
||||
|
||||
/**
|
||||
* @brief comListe uninstall class.
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Uninstall extends Process
|
||||
{
|
||||
public static function init(): bool
|
||||
@ -27,7 +24,7 @@ class Uninstall extends Process
|
||||
|
||||
public static function process(): bool
|
||||
{
|
||||
if (!self::status() || !dcCore::app()->plugins->moduleExists('Uninstaller')) {
|
||||
if (!self::status()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,43 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\comListe;
|
||||
|
||||
use dcCore;
|
||||
use dcUrlHandlers;
|
||||
use Dotclear\App;
|
||||
use Dotclear\Core\Frontend\Url;
|
||||
|
||||
class UrlHandler extends dcUrlHandlers
|
||||
/**
|
||||
* @brief comListe frontend URL class.
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class UrlHandler extends Url
|
||||
{
|
||||
public static function comListe(?string $args): void
|
||||
{
|
||||
$args = (string) $args;
|
||||
|
||||
if (is_null(dcCore::app()->blog)
|
||||
|| is_null(dcCore::app()->ctx)
|
||||
if (!App::blog()->isDefined()
|
||||
|| !My::settings()->get('enable')
|
||||
) {
|
||||
self::p404();
|
||||
}
|
||||
|
||||
dcCore::app()->public->setPageNumber(self::getPageNumber($args) ?: 1);
|
||||
dcCore::app()->ctx->__set('nb_comment_per_page', (int) My::settings()->get('nb_comments_per_page'));
|
||||
App::frontend()->setPageNumber(self::getPageNumber($args) ?: 1);
|
||||
App::frontend()->context()->__set('nb_comment_per_page', (int) My::settings()->get('nb_comments_per_page'));
|
||||
|
||||
$tplset = dcCore::app()->themes->moduleInfo(dcCore::app()->blog->settings->get('system')->get('theme'), 'tplset');
|
||||
$tplset = App::themes()->moduleInfo(App::blog()->settings()->get('system')->get('theme'), 'tplset');
|
||||
if (!empty($tplset) && is_dir(implode(DIRECTORY_SEPARATOR, [My::path(), 'default-templates', $tplset]))) {
|
||||
dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), implode(DIRECTORY_SEPARATOR, [My::path(), 'default-templates', $tplset]));
|
||||
App::frontend()->template()->setPath(App::frontend()->template()->getPath(), implode(DIRECTORY_SEPARATOR, [My::path(), 'default-templates', $tplset]));
|
||||
} else {
|
||||
dcCore::app()->tpl->setPath(dcCore::app()->tpl->getPath(), implode(DIRECTORY_SEPARATOR, [My::path(), 'default-templates', DC_DEFAULT_TPLSET]));
|
||||
App::frontend()->template()->setPath(App::frontend()->template()->getPath(), implode(DIRECTORY_SEPARATOR, [My::path(), 'default-templates', App::config()->defaultTplset()]));
|
||||
}
|
||||
|
||||
self::serveDocument('comListe.html');
|
||||
|
@ -1,24 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief comListe, a plugin for Dotclear 2
|
||||
*
|
||||
* @package Dotclear
|
||||
* @subpackage Plugin
|
||||
*
|
||||
* @author Benoit de Marne, Pierre Van Glabeke and contributors
|
||||
*
|
||||
* @copyright Jean-Christian Denis
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Dotclear\Plugin\comListe;
|
||||
|
||||
use dcCore;
|
||||
use Dotclear\App;
|
||||
use Dotclear\Helper\Html\Html;
|
||||
use Dotclear\Plugin\widgets\WidgetsStack;
|
||||
use Dotclear\Plugin\widgets\WidgetsElement;
|
||||
|
||||
/**
|
||||
* @brief comListe widgets class.
|
||||
* @ingroup comListe
|
||||
*
|
||||
* @author Benoit de Marne (author)
|
||||
* @author Jean-Christian Denis (latest)
|
||||
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
||||
*/
|
||||
class Widgets
|
||||
{
|
||||
public static function initWidgets(WidgetsStack $w): void
|
||||
@ -26,7 +24,7 @@ class Widgets
|
||||
$w->create(
|
||||
My::id(),
|
||||
My::name(),
|
||||
[self::class, 'parseWidget'],
|
||||
self::parseWidget(...),
|
||||
null,
|
||||
__('Link to comments list public page')
|
||||
)
|
||||
@ -44,9 +42,9 @@ class Widgets
|
||||
|
||||
public static function parseWidget(WidgetsElement $w): string
|
||||
{
|
||||
if (is_null(dcCore::app()->blog)
|
||||
if (!App::blog()->isDefined()
|
||||
|| $w->__get('offline')
|
||||
|| !$w->checkHomeOnly(dcCore::app()->url->type)
|
||||
|| !$w->checkHomeOnly(App::url()->type)
|
||||
|| !My::settings()->get('enable')
|
||||
) {
|
||||
return '';
|
||||
@ -59,7 +57,7 @@ class Widgets
|
||||
($w->__get('title') ? $w->renderTitle(Html::escapeHTML($w->__get('title'))) : '') .
|
||||
sprintf(
|
||||
'<p><a href="%s">%s</a></p>',
|
||||
dcCore::app()->blog->url . dcCore::app()->url->getBase('comListe'),
|
||||
App::blog()->url() . App::url()->getBase('comListe'),
|
||||
$w->__get('link_title') ? Html::escapeHTML($w->__get('link_title')) : (My::settings()->get('page_title') ?? My::name())
|
||||
)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user