aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2009-06-17 10:01:54 +0000
committerJoas Schilling <nickvergessen@gmx.de>2009-06-17 10:01:54 +0000
commit2b020c632707f1eefe96392ba4cf074af3cab6d8 (patch)
tree517144282e4e99e41e5bcfd3ed57036386c69c78
parentac72c7e0491cf78c5af852236d8e0543d85515e1 (diff)
downloadforums-2b020c632707f1eefe96392ba4cf074af3cab6d8.tar
forums-2b020c632707f1eefe96392ba4cf074af3cab6d8.tar.gz
forums-2b020c632707f1eefe96392ba4cf074af3cab6d8.tar.bz2
forums-2b020c632707f1eefe96392ba4cf074af3cab6d8.tar.xz
forums-2b020c632707f1eefe96392ba4cf074af3cab6d8.zip
Fix bug #20625 - Do not display birthdays of banned users
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9604 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/index.php10
2 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 2ec2979527..896d52b6be 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -113,6 +113,7 @@
<li>[Fix] Template cache error for files of template-subfolders (Bug #46145 - Patch by nickvergessen)</li>
<li>[Fix] Display user's Jabber address in popup when Jabber functionality is disabled (Bug #20775 - Patch by nickvergessen)</li>
<li>[Fix] Exclude forum from active topics option is ignored (Bug #19135 - Patch by nickvergessen)</li>
+ <li>[Fix] Do not display birthdays of banned users (Bug #20625 - Patch by nickvergessen)</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
<li>[Change] Template engine now permits to a limited extent variable includes.</li>
diff --git a/phpBB/index.php b/phpBB/index.php
index 2d1329c511..9dffade44c 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -84,10 +84,12 @@ $birthday_list = '';
if ($config['load_birthdays'] && $config['allow_birthdays'])
{
$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
- $sql = 'SELECT user_id, username, user_colour, user_birthday
- FROM ' . USERS_TABLE . "
- WHERE user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
- AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
+ $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday, b.ban_id
+ FROM ' . USERS_TABLE . ' u
+ LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid)
+ WHERE b.ban_id IS NULL
+ AND u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
+ AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))