Use default value for comments in article importer
authorMarcel Werk <burntime@woltlab.com>
Fri, 7 Oct 2016 15:34:28 +0000 (17:34 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 7 Oct 2016 15:34:28 +0000 (17:34 +0200)
wcfsetup/install/files/lib/system/importer/ArticleImporter.class.php

index 1cb946fe7a4146391e092df0c089813ee80dc3d4..76b7e0266a039b5ccdefa2ad5f37b4e9c463787c 100644 (file)
@@ -81,6 +81,9 @@ class ArticleImporter extends AbstractImporter {
                }
                $data['categoryID'] = $categoryID;
                
+               // comments
+               if (!isset($data['enableComments'])) $data['enableComments'] = ARTICLE_ENABLE_COMMENTS_DEFAULT_VALUE ? 1 : 0;
+               
                // save article
                $article = ArticleEditor::create($data);