Skip to content

Commit

Permalink
#1195 Fix undefined variable smilies
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick committed Apr 5, 2015
1 parent fb75172 commit 19218d9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
20 changes: 14 additions & 6 deletions include/parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -724,13 +724,9 @@ function do_clickable($text) {
return substr($text, 1);
}


//
// Convert a series of smilies to images
//
function do_smilies($text) {
function get_smilies() {
global $luna_config;

// Here you can add additional smilies if you like (please note that you must escape single quote and backslash)
if ($luna_config['o_emoji'] == 1) {
$smilies = array(
Expand Down Expand Up @@ -784,6 +780,18 @@ function do_smilies($text) {
'^.^' => 'happy.png'
);
}

return $smilies;
}


//
// Convert a series of smilies to images
//
function do_smilies($text) {
global $luna_config;

$smilies = get_smilies();

$text = ' '.$text.' ';

Expand Down
2 changes: 2 additions & 0 deletions themes/Luna/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
// Display the smiley set
require FORUM_ROOT.'include/parser.php';

$smilies = get_smilies();

$smiley_groups = array();

foreach ($smilies as $smiley_text => $smiley_img)
Expand Down

0 comments on commit 19218d9

Please sign in to comment.