From 665a784880dc0020a594bcd91569dca25277cdc8 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Sun, 16 Jul 2006 15:46:36 +0000 Subject: [PATCH] Show server error message if posting failed... Very useful to know what to change git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@117 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- banana/banana.inc.php.in | 8 ++++++-- css/style.css | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/banana/banana.inc.php.in b/banana/banana.inc.php.in index 362dbc4..5836172 100644 --- a/banana/banana.inc.php.in +++ b/banana/banana.inc.php.in @@ -352,6 +352,9 @@ class Banana $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'] : ''; } $this->nntp->quit(); @@ -373,7 +376,7 @@ class Banana . '' . $this->profile['org'] . '' . '' . _b_('Corps') . '' . ''; + . $body . ''; if ($this->can_attach) { $html .= '' . _b_('Pièce jointe') . '' . '' @@ -475,7 +478,8 @@ class Banana } redirectInBanana($dir); } else { - return '

' . _b_('Impossible de poster le message') . '

' + return '

' . _b_('Impossible de poster le message. Le serveur a retourné l\'erreur :') . '

' + . '
' . utf8_encode($this->nntp->lasterrortext) .'
' . $this->action_newFup($group, $artid); } } diff --git a/css/style.css b/css/style.css index 9b48a5c..4afdc31 100644 --- a/css/style.css +++ b/css/style.css @@ -78,4 +78,9 @@ table.banana_msg blockquote blockquote blockquote { div.center { text-align: center; padding: 1em; } p.error { color: red; background: inherit; } +pre.error { + color: red; + margin-left: 2em; + font-size: 90%; +} -- 2.1.4