From: x2003bruneau Date: Fri, 2 Nov 2007 20:31:33 +0000 (+0000) Subject: Show the post subject in the 'message'-tab X-Git-Tag: 1.8~8 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=69f4f159be61a868e6dda95deb2e58a93e94d546;hp=bd05fff5dff3344bcb59c1dad166c072d249cb2e;p=banana.git Show the post subject in the 'message'-tab Signed-off-by: Florent Bruneau git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@303 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- diff --git a/banana/page.inc.php b/banana/page.inc.php index 2d8abf6..40fd970 100644 --- a/banana/page.inc.php +++ b/banana/page.inc.php @@ -112,7 +112,17 @@ class BananaPage extends Smarty if (!is_null(Banana::$group)) { $this->registerPage('thread', Banana::$group, null); if (!is_null(Banana::$artid)) { - $this->registerPage('message', _b_('Message'), null); + if (Banana::$spool) { + $subject = Banana::$spool->overview[Banana::$artid]->subject; + } else if (Banana::$message) { + $subject = Banana::$message->getHeaderValue('subject'); + } else { + $subject = _b_('Message'); + } + if (strlen($subject) > 30) { + $subject = substr($subject, 0, 30) . '…'; + } + $this->registerPage('message', $subject, null); if ($this->page == 'cancel') { $this->registerPage('cancel', _b_('Annulation'), null); } elseif ($this->page == 'new') {