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 { class news extends common {
const VERSION = '2.2'; const VERSION = '2.3';
const REALNAME = 'Actualités'; const REALNAME = 'Actualités';
const DELETE = true; const DELETE = true;
const UPDATE = '0.0'; const UPDATE = '0.0';
@ -304,6 +304,7 @@ class news extends common {
// News en fonction de la pagination // News en fonction de la pagination
for($i = $pagination['first']; $i < $pagination['last']; $i++) { 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]] = $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 // Valeurs en sortie
$this->addOutput([ $this->addOutput([

View File

@ -15,10 +15,10 @@
<?php echo mb_detect_encoding(strftime('%d %B %Y', $news['publishedOn']), 'UTF-8', true) <?php echo mb_detect_encoding(strftime('%d %B %Y', $news['publishedOn']), 'UTF-8', true)
? strftime('%d %B %Y', $news['publishedOn']) ? strftime('%d %B %Y', $news['publishedOn'])
: utf8_encode(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 --> <!-- Bloc edition -->
<?php if ( <?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND AND
( // Propriétaire ( // Propriétaire
@ -40,7 +40,7 @@
<div id="rssFeed"> <div id="rssFeed">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?> "> <a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?> ">
<img src='module/news/ressource/feed-icon-16.gif' /> <img src='module/news/ressource/feed-icon-16.gif' />
<?php <?php
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ; echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
?> ?>
</a> </a>