signature dans le module news

This commit is contained in:
fredtempez 2021-03-21 14:43:44 +01:00
parent 2c087edd85
commit 6e3647909b
2 changed files with 5 additions and 4 deletions

View File

@ -15,7 +15,7 @@
class news extends common {
const VERSION = '2.2';
const VERSION = '2.3';
const REALNAME = 'Actualités';
const DELETE = true;
const UPDATE = '0.0';
@ -304,6 +304,7 @@ class news extends common {
// News en fonction de la pagination
for($i = $pagination['first']; $i < $pagination['last']; $i++) {
self::$news[$newsIds[$i]] = $this->getData(['module', $this->getUrl(0),'posts', $newsIds[$i]]);
self::$news[$newsIds[$i]]['userId'] = $this->signature($this->getData(['module', $this->getUrl(0), 'posts', $newsIds[$i], 'userId']));
}
// Valeurs en sortie
$this->addOutput([

View File

@ -15,7 +15,7 @@
<?php echo mb_detect_encoding(strftime('%d %B %Y', $news['publishedOn']), 'UTF-8', true)
? strftime('%d %B %Y', $news['publishedOn'])
: utf8_encode(strftime('%d %B %Y', $news['publishedOn'])); ?>
- <?php echo $this->getData(['user', $news['userId'], 'firstname']) . ' ' . $this->getData(['user', $news['userId'], 'lastname']); ?>
- <?php echo $news['userId']; ?>
<!-- Bloc edition -->
<?php if (