aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2005-10-02 18:15:12 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2005-10-02 18:15:12 +0000
commit58d146cac61a8c574346ee794a04bdfeaab9215d (patch)
treece653b0234b03a5069812399b5365249d9a57865 /phpBB/includes/acm
parentb6e154f49492684d90e7dbc5dc6f210abbca3d0f (diff)
downloadforums-58d146cac61a8c574346ee794a04bdfeaab9215d.tar
forums-58d146cac61a8c574346ee794a04bdfeaab9215d.tar.gz
forums-58d146cac61a8c574346ee794a04bdfeaab9215d.tar.bz2
forums-58d146cac61a8c574346ee794a04bdfeaab9215d.tar.xz
forums-58d146cac61a8c574346ee794a04bdfeaab9215d.zip
- move some functions from global functions file to functions_display (those only needed in posting and viewtopic/forum)
git-svn-id: file:///svn/phpbb/trunk@5240 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm')
-rw-r--r--phpBB/includes/acm/acm_main.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/phpBB/includes/acm/acm_main.php b/phpBB/includes/acm/acm_main.php
index b174dab92b..bdb8189bd7 100644
--- a/phpBB/includes/acm/acm_main.php
+++ b/phpBB/includes/acm/acm_main.php
@@ -273,9 +273,24 @@ class cache extends acm
}
else
{
- $sql = 'SELECT user_id, bot_agent, bot_ip
- FROM ' . BOTS_TABLE . '
- WHERE bot_active = 1';
+ switch (SQL_LAYER)
+ {
+ case 'mssql':
+ case 'mssql_odbc':
+ $sql = 'SELECT user_id, bot_agent, bot_ip
+ FROM ' . BOTS_TABLE . '
+ WHERE bot_active = 1
+ ORDER BY LEN(bot_agent) DESC';
+ break;
+
+ // LENGTH supported by MySQL, IBM DB2 and Oracle for sure...
+ default:
+ $sql = 'SELECT user_id, bot_agent, bot_ip
+ FROM ' . BOTS_TABLE . '
+ WHERE bot_active = 1
+ ORDER BY LENGTH(bot_agent) DESC';
+ break;
+ }
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))