aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-06-13 08:32:32 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-06-13 08:32:32 +0000
commitb4d3854cd2892f51ac34e69a73c36588d625f818 (patch)
tree8c6ccc6c4428d4353feb749b460202f2b1daa04a /phpBB/includes
parentd707a5f099c99bd1030b7a01c91c67d9ef1ecbe4 (diff)
downloadforums-b4d3854cd2892f51ac34e69a73c36588d625f818.tar
forums-b4d3854cd2892f51ac34e69a73c36588d625f818.tar.gz
forums-b4d3854cd2892f51ac34e69a73c36588d625f818.tar.bz2
forums-b4d3854cd2892f51ac34e69a73c36588d625f818.tar.xz
forums-b4d3854cd2892f51ac34e69a73c36588d625f818.zip
Added a count of total number of topics to the get_db_stats function
git-svn-id: file:///svn/phpbb/trunk@485 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php6
-rw-r--r--phpBB/includes/page_header.php2
2 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 72d48c1bf0..d35ca75ac4 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -45,6 +45,10 @@ function get_db_stat($mode)
ORDER BY user_id DESC
LIMIT 1";
break;
+ case 'topiccount':
+ $sql = "SELECT SUM(forum_topics) AS total
+ FROM ".FORUMS_TABLE;
+ break;
}
@@ -427,7 +431,7 @@ function validate_username($username)
// a UNION clause which would be very nice here :(
// So we have to use two queries
case 'mysql':
- $sql_users = "SELECT group_name AS username
+ $sql_users = "SELECT group_name AS username
FROM " . GROUPS_TABLE . "
WHERE LOWER(group_name) = '" . strtolower($username) . "'";
$sql_disallow = "SELECT disallow_username
diff --git a/phpBB/includes/page_header.php b/phpBB/includes/page_header.php
index 853e8abc65..b54f386b62 100644
--- a/phpBB/includes/page_header.php
+++ b/phpBB/includes/page_header.php
@@ -215,7 +215,7 @@ $template->assign_vars(array(
"S_LOGIN_ACTION" => append_sid("login.$phpEx"),
"S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx"),
"S_LAST_VISIT_DATE" => $s_last_visit,
- "s_CURRENT_TIME" => create_date($board_config['default_dateformat'], $current_time, $board_config['default_timezone']),
+ "S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['default_timezone']),
"T_HEAD_STYLESHEET" => $theme['head_stylesheet'],
"T_BODY_BACKGROUND" => $theme['body_background'],