Minor fixes
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Fri, 9 Feb 2007 23:04:06 +0000 (23:04 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:35:27 +0000 (00:35 +0100)
git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@198 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/banana.inc.php.in
banana/message.inc.php
banana/spool.inc.php

index dc29078..06972b2 100644 (file)
@@ -21,7 +21,7 @@ class Banana
                                     'headers' => array('From' => 'Anonymous <anonymouse@example.com>'),
                                     'display' => 0,
                                     'lastnews' => 0,
-                                    'locale'  => 'fr_FR',
+                                    'locale'  => 'fr_FR.UTF-8',
                                     'subscribe' => array(),
                                     'autoup' => 1);
     static public $boxpattern;
@@ -304,9 +304,11 @@ class Banana
     {
         Banana::$page->setPage('forums');
         $groups    = Banana::$protocole->getBoxList(Banana::BOXES_SUB, Banana::$profile['lastnews'], true);
-        $newgroups = Banana::$protocole->getBoxList(Banana::BOXES_NEW, Banana::$profile['lastnews'], true);
         Banana::$page->assign('groups', $groups);
-        Banana::$page->assign('newgroups', $newgroups);
+        if (empty(Banana::$profile['subscribe']) || Banana::$profile['lastnews']) {
+            $newgroups = Banana::$protocole->getBoxList(Banana::BOXES_NEW, Banana::$profile['lastnews'], true);
+            Banana::$page->assign('newgroups', $newgroups);
+        }
         return true;
     }
 
index 0855eba..935e8c3 100644 (file)
@@ -174,7 +174,7 @@ final class BananaMessage extends BananaMimePart
 
     static public function formatDate($text)
     {
-        return utf8_encode(strftime("%A %d %B %Y, %H:%M (fuseau serveur)", strtotime($text)));
+        return strftime("%A %d %B %Y, %H:%M (fuseau serveur)", strtotime($text));
     }
 
     public function translateHeaders()
index 8f8da45..07b2098 100644 (file)
@@ -392,7 +392,7 @@ class BananaSpool
         } else {
             $format = '%a %e %b';
         }
-        return utf8_encode(strftime($format, $stamp));
+        return strftime($format, $stamp);
     }
 
     /** displays children tree of a post