X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=banana%2Fbanana.inc.php.in;h=bbec03438a489e89561252bfb4787d056e37eac1;hb=d634c13c4ec3b1761622cf3ad558ffe89ba81a0b;hp=af969b286fbebe8f8a4690f8d08954f2935d43d9;hpb=b03e1ae29d71d1a9583983764c59bf11031f6734;p=banana.git diff --git a/banana/banana.inc.php.in b/banana/banana.inc.php.in index af969b2..bbec034 100644 --- a/banana/banana.inc.php.in +++ b/banana/banana.inc.php.in @@ -316,10 +316,14 @@ class Banana . "\n" . "Message canceled with Banana"; if ($this->nntp->post($msg)) { + $ndx = $this->spool->getndx($artid) - 1; + if ($ndx > 50) { + $ndx = 0; + } $this->spool->delid($id); $this->nntp->quit(); redirectInBanana(Array('group' => $group, - 'first' => $id)); + 'first' => $ndx)); } else { return '

'._b_('Impossible d\'annuler le message').'

'; } @@ -345,16 +349,17 @@ class Banana $this->nntp->group($group); if ($this->_newPost($id)) { $subject = 'Re: ' . preg_replace("/^re\s*:\s*/i", '', $this->post->headers['subject']); - $body = utf8_encode($this->post->name." "._b_("a écrit"))." :\n" + $body = to_entities(utf8_encode($this->post->name." "._b_("a écrit"))." :\n" . wrap($this->post->get_body(), "> ") - . $this->profile['sig'] ? "\n\n-- \n". $this->profile['sig'] : ''; + . ($this->profile['sig'] ? "\n\n-- \n". $this->profile['sig'] : '')); $target = isset($this->post->headers['followup-to']) ? $this->post->headers['followup-to'] : $this->post->headers['newsgroups']; $followup = null; } } else { - $subject = $target = $followup = null; - $body = $this->profile['sig'] ? "\n\n-- \n". $this->profile['sig'] : ''; + $targe = $group; + $subject = $followup = null; + $body = $this->profile['sig'] ? "\n\n-- \n". $this->profile['sig'] : ''; } $this->nntp->quit(); @@ -474,7 +479,10 @@ class Banana if ($this->nntp->post($msg)) { $dir = Array('group' => $group); if ($artid != -1) { - $dir['first'] = $artid; + $ndx = $this->spool->getndx($artid); + if ($ndx > 50) { + $dir['first'] = $ndx; + } } redirectInBanana($dir); } else {