diff options
author | David M <davidmj@users.sourceforge.net> | 2006-04-22 18:54:41 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-04-22 18:54:41 +0000 |
commit | 9404dfe2fb809c49ad79558bee12d9e8001c8e15 (patch) | |
tree | f7d9075e098e03d21fa34cf7b98e42a292f22ab1 /phpBB/includes/functions_posting.php | |
parent | 67c580e14861de94d79a07b57ad13f1475961806 (diff) | |
download | forums-9404dfe2fb809c49ad79558bee12d9e8001c8e15.tar forums-9404dfe2fb809c49ad79558bee12d9e8001c8e15.tar.gz forums-9404dfe2fb809c49ad79558bee12d9e8001c8e15.tar.bz2 forums-9404dfe2fb809c49ad79558bee12d9e8001c8e15.tar.xz forums-9404dfe2fb809c49ad79558bee12d9e8001c8e15.zip |
- Bug #1210
git-svn-id: file:///svn/phpbb/trunk@5832 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 4202c8bc0b..03f1c962ee 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -56,22 +56,27 @@ function generate_smilies($mode, $forum_id) $db->sql_freeresult($result); } + $last_url = ''; + $sql = 'SELECT * FROM ' . SMILIES_TABLE . (($mode == 'inline') ? ' WHERE display_on_posting = 1 ' : '') . ' - GROUP BY smiley_url ORDER BY smiley_order'; $result = $db->sql_query($sql, 3600); while ($row = $db->sql_fetchrow($result)) { - $template->assign_block_vars('smiley', array( - 'SMILEY_CODE' => $row['code'], - 'SMILEY_IMG' => $phpbb_root_path . $config['smilies_path'] . '/' . $row['smiley_url'], - 'SMILEY_WIDTH' => $row['smiley_width'], - 'SMILEY_HEIGHT' => $row['smiley_height'], - 'SMILEY_DESC' => $row['emotion']) - ); + if ($row['smiley_url'] !== $last_url) + { + $template->assign_block_vars('smiley', array( + 'SMILEY_CODE' => $row['code'], + 'SMILEY_IMG' => $phpbb_root_path . $config['smilies_path'] . '/' . $row['smiley_url'], + 'SMILEY_WIDTH' => $row['smiley_width'], + 'SMILEY_HEIGHT' => $row['smiley_height'], + 'SMILEY_DESC' => $row['emotion']) + ); + } + $last_url = $row['smiley_url']; } $db->sql_freeresult($result); |