git-archimport-id: opensource@polytechnique.org--2005/banana--mainline--1.0--patch-32
$this->_newSpool($group, $this->profile['display'], $this->profile['lastnews']);
$body = preg_replace("/\n\.[ \t\r]*\n/m", "\n..\n", $_POST['body']);
- $msg = 'From: '.headerEncode($this->profile['name'])."\n"
+ $msg = 'From: '.$this->profile['name']."\n"
. "Newsgroups: ".$_POST['newsgroups']."\n"
. "Subject: ".headerEncode($_POST['subject'], 128)."\n"
. (empty($this->profile['org']) ? '' : "Organization: {$this->profile['org']}\n")
function headerEncode($value, $trim = 0) {
if ($trim) {
- $value = substr($value, $trim) . "[...]";
+ if (strlen($value) > $trim) {
+ $value = substr($value, 0, $trim) . "[...]";
+ }
}
return "=?UTF-8?B?".base64_encode($value)."?=";
}
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-10-19 19:06+0200\n"
+"POT-Creation-Date: 2005-10-19 19:56+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"