Browse Source

unreadEventsForFolder est géré en tant que nombre entier

Simounet 5 years ago
parent
commit
f1b3fb22ec
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Event.class.php
  2. 1 1
      index.php

+ 1 - 1
Event.class.php

@@ -53,7 +53,7 @@ class Event extends MysqlEntity{
         $events = array();
         $results = $this->customQuery('SELECT COUNT(`'.MYSQL_PREFIX.$this->TABLE_NAME.'`.`id`),`'.MYSQL_PREFIX.'feed`.`folder` FROM `'.MYSQL_PREFIX.$this->TABLE_NAME.'` INNER JOIN `'.MYSQL_PREFIX.'feed` ON (`'.MYSQL_PREFIX.'event`.`feed` = `'.MYSQL_PREFIX.'feed`.`id`) WHERE `'.MYSQL_PREFIX.$this->TABLE_NAME.'`.`unread`=1 GROUP BY `'.MYSQL_PREFIX.'feed`.`folder`');
         while($item = $results->fetch_array()){
-            $events[$item[1]] = $item[0];
+            $events[$item[1]] = intval($item[0]);
         }
 
         return $events;

+ 1 - 1
index.php

@@ -62,7 +62,7 @@ $target .= '`'.MYSQL_PREFIX.'event`.`id`';
 $tpl->assign('target',$target);
 $tpl->assign('feeds','');
 $tpl->assign('order','');
-$tpl->assign('unreadEventsForFolder','');
+$tpl->assign('unreadEventsForFolder',0);
 $pagesArray = array();
 
 switch($action){