From 037aea067b5e2200c52413f8b397665bf93b385e Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 8 Feb 2010 16:43:39 +0000 Subject: Fix Bug #57455 - Fix problems with firebird by no longer using 'count' as a column alias. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10484 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/includes/acp/acp_icons.php | 5 +++-- phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php | 4 ++-- phpBB/includes/functions_posting.php | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) (limited to 'phpBB') diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 4248dd3761..7092d6683b 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -166,6 +166,7 @@
  • [Fix] Fix javascript bug in the smilies ACP. (Bug #55725)
  • [Fix] Unify BBCode Selection across browsers. (Bug #38765)
  • [Fix] Allow convertors to read in configuration from files. (Bug #57265) (patch by Dicky)
  • +
  • [Fix] Fix problems with firebird by no longer using 'count' as a column alias. (Bug #57455)
  • [Change] Move redirect into a hidden field to avoid issues with mod_security. (Bug #54145)
  • [Change] Log activation through inactive users ACP. (Bug #30145)
  • [Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)
  • diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php index e1deb7e533..3d64a2acda 100644 --- a/phpBB/includes/acp/acp_icons.php +++ b/phpBB/includes/acp/acp_icons.php @@ -941,11 +941,12 @@ class acp_icons { global $db; - $sql = "SELECT COUNT(*) AS count + $sql = "SELECT COUNT(*) AS item_count FROM $table"; $result = $db->sql_query($sql); - $item_count = (int) $db->sql_fetchfield('count'); + $item_count = (int) $db->sql_fetchfield('item_count'); $db->sql_freeresult($result); + return $item_count; } } diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index ef4d8e9fac..49a64b9339 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -137,14 +137,14 @@ class phpbb_captcha_qa return false; } - $sql = 'SELECT COUNT(question_id) as count + $sql = 'SELECT COUNT(question_id) AS question_count FROM ' . CAPTCHA_QUESTIONS_TABLE . " WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - return ((bool) $row['count']); + return ((bool) $row['question_count']); } /** diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 0a31ea49a8..49ea382411 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -46,7 +46,7 @@ function generate_smilies($mode, $forum_id) page_header($user->lang['SMILIES']); - $sql = 'SELECT COUNT(smiley_id) AS count + $sql = 'SELECT COUNT(smiley_id) AS item_count FROM ' . SMILIES_TABLE . ' GROUP BY smiley_url'; $result = $db->sql_query($sql, 3600); -- cgit v1.2.1