本文整理汇总了PHP中content::updateCommentCount方法的典型用法代码示例。如果您正苦于以下问题:PHP content::updateCommentCount方法的具体用法?PHP content::updateCommentCount怎么用?PHP content::updateCommentCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类content
的用法示例。
在下文中一共展示了content::updateCommentCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unlink
$result = $cObj->postComment($comment, $app);
if (!preg_match('/^[0-9]+$/', $result)) {
$error = true;
$errorMsg = " comment save error: {$result}";
} else {
$siteCommentId = $result;
$filename = PATH_CACHE . '/read_' . $cid . '_com_m.cac';
if (file_exists($filename)) {
unlink($filename);
}
$filename = PATH_CACHE . '/read_' . $cid . '_com_n.cac';
if (file_exists($filename)) {
unlink($filename);
}
}
$cObj->updateCommentCount($cid);
}
if (!$error) {
require_once PATH_CORE . '/classes/log.class.php';
$logObj = new log($db);
$logItem = $logObj->serialize(0, $userid, 'comment', $siteCommentId, 0, $cid);
$inLog = $logObj->add($logItem);
$code = '<div id="dialogMessage"><h2>Your comment has been published successfully.</h2><p>What would you like to do next?</p>';
$code .= '<ul class="bullet_list">' . $storyOption . '<li><a href="#" onclick="hideDialog(); return shareStory(this,' . $cid . ');">Share story with friends</a></li><li><a href="?p=invite" onclick="hideDialog(); return switchPage(\'invite\');">Invite friends to ' . SITE_TITLE . '</a></li></ul></div>';
} else {
$code = '<div id="dialogMessage">Sorry, there was a problem publishing your comment. Error: ' . $errorMsg . '</div>';
}
break;
case 'requestVerify':
// send it
// to do - this code is duped in pagesignup, move to account.class.php