'autoup' => 1);
static public $boxpattern;
static public $withtabs = true;
+ static public $baseurl = null;
static public $mimeparts = array();
### Spool ###
static public $msgshow_externalimages = false;
static public $msgshow_hasextimages = false;
static public $msgshow_withthread = true;
+ static public $msgshow_javascript = true;
+
+ static public $msgshow_pgpcheck = true;
+ static public $msgshow_pgppath = 'gpg';
+ static public $msgshow_pgpoptions = '';
/** 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;
*/
protected function loadParams()
{
+ foreach ($this->params as &$value) {
+ if ($value === "") {
+ $value = null;
+ }
+ }
Banana::$group = isset($this->params['group']) ? $this->params['group'] : null;
Banana::$artid = isset($this->params['artid']) ? $this->params['artid'] : null;
Banana::$first = isset($this->params['first']) ? $this->params['first'] : null;
}
if (!is_null($artid)) {
$old =& $this->loadMessage($group, $artid);
- $hdr_values['References'] = $old->getHeaderValue('references') . $old->getHeaderValue('message-id');
+ $hdr_values['References'] = $old->getHeaderValue('references') . ' ' . $old->getHeaderValue('message-id');
}
$msg = null;
if (isset($_POST['body']) && !is_utf8($_POST['body'])) {
}
if (empty($hdr_values['Subject'])) {
Banana::$page->trig(_b_('Le message doit avoir un sujet'));
- } elseif (Banana::$msgedit_canattach && isset($_FILES['attachment'])) {
- $uploaded = $_FILES['attachment'];
+ } elseif (Banana::$msgedit_canattach && isset($_FILES['attachment']) && $_FILES['attachment']['name']) {
+ $uploaded =& $_FILES['attachment'];
if (!is_uploaded_file($uploaded['tmp_name'])) {
Banana::$page->trig(_b_('Une erreur est survenue lors du téléchargement du fichier'));
} else {
$this->loadSpool($group);
$newid = Banana::$spool->updateUnread(Banana::$profile['lastnews']);
Banana::$page->redirect(array('group' => $group, 'artid' => $newid ? $newid : $artid));
- }
- Banana::$page->trig(_b_('Une erreur est survenue lors de l\'envoi du message :') . '<br />'
+ } else {
+ Banana::$page->trig(_b_('Une erreur est survenue lors de l\'envoi du message :') . '<br />'
. Banana::$protocole->lastError());
+ }
}
} else {
if (!is_null($artid)) {