fixed some oversights

This commit is contained in:
flash 2016-10-13 20:45:44 +02:00
parent f8b6bd6f46
commit fbdd6b96da
3 changed files with 6 additions and 2 deletions

View file

@ -68,6 +68,11 @@ class Parser
// Parse all emoticons // Parse all emoticons
foreach ($emotes as $emote) { foreach ($emotes as $emote) {
if ($poster === null) {
// eventually check for hierarchies here
continue;
}
$image = "<img src='{$emote->emote_path}' alt='{$emote->emote_string}' class='emoticon'>"; $image = "<img src='{$emote->emote_path}' alt='{$emote->emote_string}' class='emoticon'>";
$icon = preg_quote($emote->emote_string, '#'); $icon = preg_quote($emote->emote_string, '#');
$text = preg_replace("#{$icon}#", $image, $text); $text = preg_replace("#{$icon}#", $image, $text);

View file

@ -7,7 +7,6 @@
namespace Sakura\BBCode\Tags; namespace Sakura\BBCode\Tags;
use Sakura\BBCode\TagBase; use Sakura\BBCode\TagBase;
use Sakura\CurrentSession;
use Sakura\Forum\Forum; use Sakura\Forum\Forum;
use Sakura\Forum\Post; use Sakura\Forum\Post;
use Sakura\Perms\Forum as ForumPerms; use Sakura\Perms\Forum as ForumPerms;

View file

@ -171,7 +171,7 @@ class Post
'post_time' => time(), 'post_time' => time(),
'post_subject' => $subject, 'post_subject' => $subject,
'post_text' => $text, 'post_text' => $text,
'post_text_parsed' => BBParser::toHTML(htmlentities($text), $this->poster), 'post_text_parsed' => BBParser::toHTML(htmlentities($text), $poster),
]); ]);
// Update the last post date // Update the last post date