Menu

read()) !== false) { $prefix = substr($entry, 0, strpos($entry, '_')); $suffix = substr($entry, strlen($entry) - 4); if ($suffix == '.php' && ((!$is_admin && $prefix == 'AMP') || ($is_admin && ($prefix == 'AP' || $prefix == 'AMP')))) $plugins[] = array(substr(substr($entry, strpos($entry, '_') + 1), 0, -4), $entry); } $d->close(); // Did we find any plugins? if (!empty($plugins)) { ?>

Plugins

query('SELECT id FROM '.$db->prefix.'topics WHERE forum_id='.$forum_id.$extra_sql, true) or error('Impossible de retrouver la liste des discussions', __FILE__, __LINE__, $db->error()); $topic_ids = ''; while ($row = $db->fetch_row($result)) $topic_ids .= (($topic_ids != '') ? ',' : '').$row[0]; if ($topic_ids != '') { // Fetch posts to prune $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE topic_id IN('.$topic_ids.')', true) or error('Impossible de retrouver les messages', __FILE__, __LINE__, $db->error()); $post_ids = ''; while ($row = $db->fetch_row($result)) $post_ids .= (($post_ids != '') ? ',' : '').$row[0]; if ($post_ids != '') { // Delete topics $db->query('DELETE FROM '.$db->prefix.'topics WHERE id IN('.$topic_ids.')') or error('Impossible d\'élaguer les discussions', __FILE__, __LINE__, $db->error()); // Delete subscriptions $db->query('DELETE FROM '.$db->prefix.'subscriptions WHERE topic_id IN('.$topic_ids.')') or error('Impossible d\'élaguer les abonnements', __FILE__, __LINE__, $db->error()); // Delete posts $db->query('DELETE FROM '.$db->prefix.'posts WHERE id IN('.$post_ids.')') or error('Impossible d\'élaguer les messages', __FILE__, __LINE__, $db->error()); // We removed a bunch of posts, so now we have to update the search index require_once PUN_ROOT.'include/search_idx.php'; strip_search_index($post_ids); } } }