'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;
* $matches[2] = "http://www.polytechnique.org"
* $matches[3] = "]"
*/
- static public $msgshow_url = '(["\[])?((?:[a-z]+:\/\/|www\.)(?:[\.\,\;\!\:]*[a-z\@0-9~%$£µ&i#\-+=_\/\?]+)+)(["\]])?';
+ static public $msgshow_url = '(["\[])?((?:[a-z]+:\/\/|www\.)(?:[\.\,\;\!\:]*[a-z\@0-9~%$&i#\-+=_\/\?]+)+)(["\]])?';
### Message edition ###
static public $msgedit_canattach = true;
{
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;
}
Banana::load('spool');
if (!Banana::$spool || Banana::$spool->group != $group) {
$clean = false;
- if ($group == @$_SESSION['banana_group'] && isset($_SESSION['banana_spool'])) {
- Banana::$spool = unserialize($_SESSION['banana_spool']);
- $clean = @(Banana::$profile['lastnews'] != $_SESSION['banana_lastnews']);
- } else {
+ if ($group != @$_SESSION['banana_group']) {
unset($_SESSION['banana_message']);
unset($_SESSION['banana_artid']);
unset($_SESSION['banana_showhdr']);
}
BananaSpool::getSpool($group, Banana::$profile['lastnews'], Banana::$profile['autoup'] || $clean);
$_SESSION['banana_group'] = $group;
- if (!Banana::$profile['display']) {
- $_SESSION['banana_spool'] = serialize(Banana::$spool);
- $_SESSION['banana_lastnews'] = Banana::$profile['lastnews'];
- }
Banana::$spool->setMode(Banana::$profile['display'] ? Banana::SPOOL_UNREAD : Banana::SPOOL_ALL);
}
return true;
protected function removeMessage($group, $artid)
{
Banana::$spool->delId($artid);
- if ($group == $_SESSION['banana_group']) {
- if (!Banana::$profile['display']) {
- $_SESSION['banana_spool'] = serialize(Banana::$spool);
- }
- if ($artid == $_SESSION['banana_artid']) {
- unset($_SESSION['banana_message']);
- unset($_SESSION['banana_showhdr']);
- unset($_SESSION['banana_artid']);
- }
+ if ($group == $_SESSION['banana_group'] && $artid == $_SESSION['banana_artid']) {
+ unset($_SESSION['banana_message']);
+ unset($_SESSION['banana_showhdr']);
+ unset($_SESSION['banana_artid']);
}
return true;
}