Fixes NL article insertion.
authorStéphane Jacob <sj@m4x.org>
Wed, 27 Oct 2010 12:38:21 +0000 (14:38 +0200)
committerStéphane Jacob <sj@m4x.org>
Wed, 27 Oct 2010 13:23:50 +0000 (15:23 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
include/newsletter.inc.php

index d15d64e..86ce712 100644 (file)
@@ -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  ({?}, {?}, {?}, {?}, {?}, {?}, {?})',