cosmetics

This commit is contained in:
Jean-Christian Denis 2021-10-24 09:33:44 +02:00
parent d2cc881914
commit 48e7041d14
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
2 changed files with 6 additions and 5 deletions

View file

@ -26,7 +26,8 @@ if (version_compare($old_version, $new_version, '>=')) {
try { try {
# Check Dotclear version # Check Dotclear version
if (!method_exists('dcUtils', 'versionsCompare') if (!method_exists('dcUtils', 'versionsCompare')
|| dcUtils::versionsCompare(DC_VERSION, $dc_min, '<', false)) { || dcUtils::versionsCompare(DC_VERSION, $dc_min, '<', false)
) {
throw new Exception(sprintf( throw new Exception(sprintf(
'%s requires Dotclear %s', 'periodical', $dc_min '%s requires Dotclear %s', 'periodical', $dc_min
)); ));

View file

@ -95,10 +95,10 @@ class publicPeriodical
# Get posts to publish related to this period # Get posts to publish related to this period
$posts_params = []; $posts_params = [];
$posts_params['periodical_id'] = $periods->periodical_id; $posts_params['periodical_id'] = $periods->periodical_id;
$posts_params['post_status'] = '-2'; $posts_params['post_status'] = '-2';
$posts_params['order'] = $posts_order; $posts_params['order'] = $posts_order;
$posts_params['limit'] = $limit * $max_nb; $posts_params['limit'] = $limit * $max_nb;
$posts_params['no_content'] = true; $posts_params['no_content'] = true;
$posts = $core->auth->sudo([$per, 'getPosts'], $posts_params); $posts = $core->auth->sudo([$per, 'getPosts'], $posts_params);
if (!$posts->isEmpty()) { if (!$posts->isEmpty()) {