本文整理汇总了PHP中c2cTools::clearCommentCache方法的典型用法代码示例。如果您正苦于以下问题:PHP c2cTools::clearCommentCache方法的具体用法?PHP c2cTools::clearCommentCache怎么用?PHP c2cTools::clearCommentCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类c2cTools
的用法示例。
在下文中一共展示了c2cTools::clearCommentCache方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mark_topic_read
mark_topic_read($new_tid, $fid, $now);
}
}
}
// If the posting user is logged in, increment his/her post count
if (!$pun_user['is_guest']) {
if ($pun_user['num_posts'] == 0) {
}
$low_prio = $db_type == 'mysql' ? 'LOW_PRIORITY ' : '';
$db->query('UPDATE ' . $low_prio . $db->prefix . 'users SET num_posts=num_posts+1, last_post=' . $now . ' WHERE id=' . $pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
}
// Redirect to "symfony app" after comment has been posted
if ($is_comment) {
$doc_param = get_doc_param($cur_posting['subject'] ? $cur_posting['subject'] : $subject);
// clear symfony cache for the corresponding docs view, diff, history.. - in order to have number of comments properly displayed)
c2cTools::clearCommentCache($doc_param[0], $doc_param[1]);
// if this is the first comment on an outing or an image, we should send notifications to concerned people
// and subscribe them to topic
if ($fid) {
$users = c2cTools::getUsersToNotify($doc_param[0]);
if (!empty($users)) {
// subscribe users to topic
$values = array();
foreach ($users as $user) {
$values[] = '(\'' . $user . "', '{$new_tid}')";
}
$db->query('INSERT INTO ' . $db->prefix . 'subscriptions (user_id, topic_id) VALUES ' . implode(', ', $values)) or error('Unable to add subscription', __FILE__, __LINE__, $db->error());
// TODO maybe just continue silently if subscription fails?
// send mails to concerned users
require PUN_ROOT . 'include/email.php';
$result = $db->query('SELECT id, language, email FROM ' . $db->prefix . 'users WHERE id IN (' . implode(', ', $users) . ')') or error('Unable to fetch user languages', __FILE__, __LINE__, $db->error());
示例2: confirm_referrer
confirm_referrer('delete.php');
}
require PUN_ROOT . 'include/search_idx.php';
if ($is_topic_post) {
// Delete the topic and all of it's posts
delete_topic($cur_post['tid']);
update_forum($cur_post['fid']);
redirect('viewforum.php?id=' . $cur_post['fid'], $lang_delete['Topic del redirect']);
} else {
// Delete just this one post
delete_post($id, $cur_post['tid']);
update_forum($cur_post['fid']);
if ($cur_post['fid'] == 1) {
$LangId = split('_', $cur_post['subject']);
// clear symfony cache for the corresponding docs view, diff, history.. - in order to have number of comments properly displayed)
c2cTools::clearCommentCache($LangId[0], $LangId[1]);
redirect('/documents/comment/' . $LangId[0] . '/' . $LangId[1], $lang_delete['Post del redirect']);
} else {
redirect('viewtopic.php?id=' . $cur_post['tid'], $lang_delete['Post del redirect']);
}
}
}
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . ' / ' . $lang_delete['Delete post'];
require PUN_ROOT . 'header.php';
require PUN_ROOT . 'include/parser.php';
$cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);
?>
<div class="linkst">
<div class="inbox">
<ul><li><a href="index.php"><?php
echo $lang_common['Index'];