} elseif ($blogService->isBlogger($g_user)) {
// test if using authors from blog
if (!$blogService->isBlogAuthor($authorObj, $blogInfo)) {
continue;
}
}
// Sets the author type selected
$author_type = $f_article_author_type[$i];
$authorObj->setType($author_type);
// Links the author to the article
if ($authorObj->getId() != 0) {
$articleAuthorObj = new ArticleAuthor($articleObj->getArticleNumber(), $articleObj->getLanguageId(), $authorObj->getId(), $author_type, $i + 1);
}
if (isset($articleAuthorObj) && !$articleAuthorObj->exists()) {
$articleAuthorObj->create();
$dispatcher->dispatch("user.set_points", new \Newscoop\EventDispatcher\Events\GenericEvent($this, array('authorId' => $articleAuthorObj->getAuthorId())));
}
$i++;
}
}
// Update the article.
$articleObj->setTitle($f_article_title);
$articleObj->setIsIndexed(false);
if (!empty($f_comment_status)) {
if ($f_comment_status == "enabled" || $f_comment_status == "locked") {
$commentsEnabled = true;
} else {
$commentsEnabled = false;
}
// If status has changed, then you need to show/hide all the comments
// as appropriate.