1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

More fixes, prune everything option (for forum admin), minor change to avatar mime type preg ... see if that helps with certain "doesn't match image type" issues

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3133 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2002-11-28 01:00:32 +00:00
parent ca6ad31ff8
commit d51c358ddb
4 changed files with 9 additions and 7 deletions

View File

@@ -27,18 +27,18 @@ if ( !defined('IN_PHPBB') )
require($phpbb_root_path . 'includes/functions_search.'.$phpEx);
function prune($forum_id, $prune_date)
function prune($forum_id, $prune_date, $prune_all = false;)
{
global $db, $lang;
$prune_all = ($prune_all) ? '' : 'AND t.topic_vote = 0 AND t.topic_type <> ' . POST_ANNOUNCE;
//
// Those without polls ...
// Those without polls and announcements ... unless told otherwise!
//
$sql = "SELECT t.topic_id
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE t.forum_id = $forum_id
AND t.topic_vote = 0
AND t.topic_type <> " . POST_ANNOUNCE . "
$prune_all
AND ( p.post_id = t.topic_last_post_id
OR t.topic_last_post_id = 0 )";
if ( $prune_date != '' )