mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
fix issue where event items were parsed multiple times
This commit is contained in:
@@ -362,7 +362,8 @@ class ThreadItem {
|
||||
|
||||
localize_item($item);
|
||||
|
||||
$body = prepare_body($item,true);
|
||||
$opts = (($item['resource_type'] === 'event') ? ['is_event_item' => true] : []);
|
||||
$body = prepare_body($item, true, $opts);
|
||||
|
||||
// $viewthread (below) is only valid in list mode. If this is a channel page, build the thread viewing link
|
||||
// since we can't depend on llink or plink pointing to the right local location.
|
||||
|
||||
@@ -2082,10 +2082,15 @@ function prepare_text($text, $content_type = 'text/bbcode', $opts = false) {
|
||||
default:
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
if(stristr($text, '[nosmile]'))
|
||||
$s = bbcode($text, ((is_array($opts)) ? $opts : [] ));
|
||||
else
|
||||
$s = smilies(bbcode($text, ((is_array($opts)) ? $opts : [] )));
|
||||
// events are handled in format_event_obj()
|
||||
if (empty($opts['is_event_item'])) {
|
||||
if(stristr($text, '[nosmile]')) {
|
||||
$s = bbcode($text, ((is_array($opts)) ? $opts : [] ));
|
||||
}
|
||||
else {
|
||||
$s = smilies(bbcode($text, ((is_array($opts)) ? $opts : [] )));
|
||||
}
|
||||
}
|
||||
|
||||
$s = zidify_links($s);
|
||||
|
||||
|
||||
@@ -1008,7 +1008,7 @@ function liveUpdate(notify_id) {
|
||||
in_progress = false;
|
||||
liveRecurse ++;
|
||||
if(liveRecurse < 10) {
|
||||
liveUpdate();
|
||||
liveUpdate(notify_id);
|
||||
}
|
||||
else {
|
||||
console.log('Incomplete data. Too many attempts. Giving up.');
|
||||
|
||||
Reference in New Issue
Block a user