aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/mcp.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-09-26 19:59:41 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-09-26 19:59:41 +0000
commit734492958eaa2f193db304fd5d4cf050390eff1a (patch)
tree37f19f2dd765fd45024bcd9180e729b79c9a430a /phpBB/mcp.php
parente339c36ec035520ce6f3ae4c8ad69bff35eabde6 (diff)
downloadforums-734492958eaa2f193db304fd5d4cf050390eff1a.tar
forums-734492958eaa2f193db304fd5d4cf050390eff1a.tar.gz
forums-734492958eaa2f193db304fd5d4cf050390eff1a.tar.bz2
forums-734492958eaa2f193db304fd5d4cf050390eff1a.tar.xz
forums-734492958eaa2f193db304fd5d4cf050390eff1a.zip
These changes should let olympus scale a little bit better.
i haven't adjusted the schemas but added the details to create_schema_files - david is able to build them then in line with his changes. :) git-svn-id: file:///svn/phpbb/trunk@6411 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/mcp.php')
-rw-r--r--phpBB/mcp.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 1b09eb1e2c..b9df35c7a7 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -467,8 +467,12 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$sql = 'SELECT COUNT(post_id) AS total
FROM ' . POSTS_TABLE . "
$where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : get_forum_list('m_approve')) . '
- AND post_approved = 0
- AND post_time >= ' . $min_time;
+ AND post_approved = 0';
+
+ if ($min_time)
+ {
+ $sql .= ' AND post_time >= ' . $min_time;
+ }
break;
case 'unapproved_topics':
@@ -479,8 +483,12 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$sql = 'SELECT COUNT(topic_id) AS total
FROM ' . TOPICS_TABLE . "
$where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : get_forum_list('m_approve')) . '
- AND topic_approved = 0
- AND topic_time >= ' . $min_time;
+ AND topic_approved = 0';
+
+ if ($min_time)
+ {
+ $sql .= ' AND topic_time >= ' . $min_time;
+ }
break;
case 'reports':