diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-05-17 11:59:06 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-05-17 11:59:06 +0000 |
commit | 94a91530da9f952a8b6e729ff187932706282f5a (patch) | |
tree | 4477d65c06a123707f171beb4f26659c4c24d668 /phpBB/includes/functions_posting.php | |
parent | 9d5e18714d527ffbad2d3a687db9ba6e07deb684 (diff) | |
download | forums-94a91530da9f952a8b6e729ff187932706282f5a.tar forums-94a91530da9f952a8b6e729ff187932706282f5a.tar.gz forums-94a91530da9f952a8b6e729ff187932706282f5a.tar.bz2 forums-94a91530da9f952a8b6e729ff187932706282f5a.tar.xz forums-94a91530da9f952a8b6e729ff187932706282f5a.zip |
adjust smilies. Also allow adding more codes to existing smilies... no one noticed this before. :/
git-svn-id: file:///svn/phpbb/trunk@7614 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index becd792388..bea1c7397b 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -64,9 +64,19 @@ function generate_smilies($mode, $forum_id) ORDER BY smiley_order'; $result = $db->sql_query($sql, 3600); + $smilies = array(); while ($row = $db->sql_fetchrow($result)) { - if ($row['smiley_url'] !== $last_url) + if (empty($smilies[$row['smiley_url']])) + { + $smilies[$row['smiley_url']] = $row; + } + } + $db->sql_freeresult($result); + + if (sizeof($smilies)) + { + foreach ($smilies as $row) { $template->assign_block_vars('smiley', array( 'SMILEY_CODE' => $row['code'], @@ -77,9 +87,7 @@ function generate_smilies($mode, $forum_id) 'SMILEY_DESC' => $row['emotion']) ); } - $last_url = $row['smiley_url']; } - $db->sql_freeresult($result); if ($mode == 'inline' && $display_link) { |