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());
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'];