From: Stéphane Jacob Date: Wed, 27 Oct 2010 12:38:21 +0000 (+0200) Subject: Fixes NL article insertion. X-Git-Tag: xorg/1.0.2~180 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=e387b26ad878179a081ece065f4c7f99f40c33e2;p=platal.git Fixes NL article insertion. Signed-off-by: Stéphane Jacob --- diff --git a/include/newsletter.inc.php b/include/newsletter.inc.php index d15d64e..86ce712 100644 --- a/include/newsletter.inc.php +++ b/include/newsletter.inc.php @@ -92,6 +92,7 @@ class NewsLetter extends MassMailer public function saveArticle(&$a) { + $a->_cid = ($a->_cid == 0) ? null : $a->_cid; if ($a->_aid >= 0) { XDB::execute('REPLACE INTO newsletter_art (id, aid, cid, pos, title, body, append) VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?})',