'subscribe' => array(),
'autoup' => 1);
static public $boxpattern;
+ static public $withtabs = true;
### Spool ###
static public $spool_max = 3000;
static public $spool_tbefore = 5;
static public $spool_tafter = 5;
static public $spool_tmax = 50;
+ static public $spool_boxlist = true;
### Message processing ###
static public $msgparse_headers = array('content-disposition', 'content-transfer-encoding',
static public $msgshow_mimeparts = array('multipart/report', 'multipart/mixed', 'text/html', 'text/plain', 'text/enriched', 'text', 'message');
static public $msgshow_xface = true;
static public $msgshow_wrap = 78;
+ static public $msgshow_externalimages = false;
+ static public $msgshow_withthread = true;
/** Match an url
* Should be included in a regexp delimited using /, !, , or @ (eg: "/$url_regexp/ui")
* $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;
if (!$this->loadSpool($group)) {
return _b_('Impossible charger la liste des messages de ') . $group;
}
- $groups = Banana::$protocole->getBoxList(Banana::BOXES_SUB, Banana::$profile['lastnews'], true);
+ if (Banana::$spool_boxlist) {
+ $groups = Banana::$protocole->getBoxList(Banana::BOXES_SUB, Banana::$profile['lastnews'], true);
+ Banana::$page->assign('groups', $groups);
+ }
Banana::$page->assign('msgbypage', Banana::$spool_tmax);
- Banana::$page->assign('groups', $groups);
return true;
}
if (Banana::$profile['autoup']) {
Banana::$spool->markAsRead($artid);
}
- $groups = Banana::$protocole->getBoxList(Banana::BOXES_SUB, Banana::$profile['lastnews'], true);
- Banana::$page->assign('groups', $groups);
+ if (Banana::$spool_boxlist) {
+ $groups = Banana::$protocole->getBoxList(Banana::BOXES_SUB, Banana::$profile['lastnews'], true);
+ Banana::$page->assign('groups', $groups);
+ }
Banana::$page->assign_by_ref('message', $msg);
Banana::$page->assign('headers', Banana::$msgshow_headers);
return true;
$this->removeMessage($group, $artid);
Banana::$page->redirect(Array('group' => $group, 'first' => $ndx));
}
+
Banana::$page->assign_by_ref('message', $msg);
+ Banana::$page->assign('body', $msg->getFormattedBody());
+ Banana::$page->assign('headers', Banana::$msgshow_headers);
+ return true;
+ }
+
+ /**************************************************************************/
+ /* Spoolgen functions */
+ /**************************************************************************/
+
+ private function checkErrors()
+ {
+ if (Banana::$protocole->lastErrno()) {
+ echo "\nL'erreur suivante s'est produite : "
+ . Banana::$protocole->lastErrno() . " "
+ . Banana::$protocole->lastError() . "\n";
+ return false;
+ }
return true;
+ }
+
+ static public function createAllSpool(array $protos)
+ {
+ foreach ($protos as $proto) {
+ $banana = new Banana(array(), $proto);
+
+ if (!$banana->checkErrors()) {
+ continue;
+ }
+ $groups = Banana::$protocole->getBoxList();
+ if (!$banana->checkErrors()) {
+ continue;
+ }
+
+ print "** $proto **\n";
+ foreach (array_keys($groups) as $g) {
+ print "Generating spool for $g : ";
+ Banana::$group = $g;
+ $spool = $banana->loadSpool($g);
+ if (!$banana->checkErrors()) {
+ break;
+ }
+ print "done.\n";
+ unset($spool);
+ }
+ print "\n";
+ }
}
/**************************************************************************/
{
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 {
+ 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;