diff -r e3d7322305bf -r 5e1f1e916419 punbb/include/common_admin.php --- a/punbb/include/common_admin.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ - -
-
-

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 '.$pun_db->prefix.'topics WHERE forum_id='.$forum_id.$extra_sql, true) or error('Unable to fetch topics', __FILE__, __LINE__, $pun_db->error()); - - $topic_ids = ''; - while ($row = $pun_db->fetch_row($result)) - $topic_ids .= (($topic_ids != '') ? ',' : '').$row[0]; - - if ($topic_ids != '') - { - // Fetch posts to prune - $result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'posts WHERE topic_id IN('.$topic_ids.')', true) or error('Unable to fetch posts', __FILE__, __LINE__, $pun_db->error()); - - $post_ids = ''; - while ($row = $pun_db->fetch_row($result)) - $post_ids .= (($post_ids != '') ? ',' : '').$row[0]; - - if ($post_ids != '') - { - // Delete topics - $pun_db->query('DELETE FROM '.$pun_db->prefix.'topics WHERE id IN('.$topic_ids.')') or error('Unable to prune topics', __FILE__, __LINE__, $pun_db->error()); - // Delete subscriptions - $pun_db->query('DELETE FROM '.$pun_db->prefix.'subscriptions WHERE topic_id IN('.$topic_ids.')') or error('Unable to prune subscriptions', __FILE__, __LINE__, $pun_db->error()); - // Delete posts - $pun_db->query('DELETE FROM '.$pun_db->prefix.'posts WHERE id IN('.$post_ids.')') or error('Unable to prune posts', __FILE__, __LINE__, $pun_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); - } - } -}