This commit is contained in:
Jean-Christian Denis 2025-01-11 09:18:17 +01:00
parent bbd2dc67a9
commit 96ca889265
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -50,7 +50,7 @@ class Prepend extends Process
// tweak frontend // tweak frontend
if ($status) { if ($status) {
App::behavior()->addBehaviors([ App::behavior()->addBehaviors([
'coreBlogBeforeGetPostsAddingParameters' => self::getPosts(...), 'coreBlogBeforeGetPostsAddingParameters' => self::coreBlogBeforeGetPostsAddingParameters(...),
]); ]);
} }
@ -60,10 +60,10 @@ class Prepend extends Process
/** /**
* @param array<string, mixed>|ArrayObject<string, mixed> $params Parameters * @param array<string, mixed>|ArrayObject<string, mixed> $params Parameters
*/ */
public static function getPosts(ArrayObject $params, string|null $arg = null): void public static function coreBlogBeforeGetPostsAddingParameters(ArrayObject $params, string|null $arg = null): void
{ {
if (App::task()->checkContext('FRONTEND') && App::auth()->check(My::PERMISSION_SUBSCRIBER, App::blog()->id()) === true) { if (App::task()->checkContext('FRONTEND') && App::auth()->check(My::PERMISSION_SUBSCRIBER, App::blog()->id()) === true) {
if (!isset($params['psot_status'])) { if (!isset($params['post_status'])) {
$params['post_status'] = []; $params['post_status'] = [];
} }
if (!is_array($params['post_status'])) { if (!is_array($params['post_status'])) {