Browse Source

signature dans le module news

10501
fredtempez 2 months ago
parent
commit
6e3647909b
  1. 3
      module/news/news.php
  2. 6
      module/news/view/index/index.php

3
module/news/news.php

@ -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([

6
module/news/view/index/index.php

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

Loading…
Cancel
Save