(cp 51a413b) fixes #1907 use porg.news.getLatest on piwigo.org

... instead of directly requesting the forum
This commit is contained in:
plegall
2023-04-27 18:04:03 +02:00
parent f498380498
commit e318929d0c
2 changed files with 17 additions and 29 deletions
+2 -6
View File
@@ -195,14 +195,10 @@ SELECT COUNT(*)
if ($conf['show_piwigo_latest_news'])
{
$news = get_piwigo_news(0, 1);
$latest_news = get_piwigo_news();
// echo '<pre>'; print_r($news); echo '</pre>';
if (isset($news['topics']) and isset($news['topics'][0]) and $news['topics'][0]['posted_on'] > time()-60*60*24*30)
if (isset($latest_news['id']) and $latest_news['posted_on'] > time()-60*60*24*180)
{
$latest_news = $news['topics'][0];
$page['messages'][] = sprintf(
'%s <a href="%s" title="%s" target="_blank"><i class="icon-bell"></i> %s</a>',
l10n('Latest Piwigo news'),