Version 5.0.0 beta 2
This commit is contained in:
1 parent
15c7beabc5
commit
f61b0da85d
181 files changed
+3182
-1533
No files matched your search
@@ -566,7 +566,6 @@ class Controller extends CoverPhotoController
|
||||
$showing = intval( Request::i()->showing ?: 0 );
|
||||
foreach ( $newComments as $newComment )
|
||||
{
|
||||
$output[] = Output::i()->replaceEmojiWithImages( $newComment->html() );
|
||||
$lastId = ( $newComment->$commentIdColumn > $lastId ) ? $newComment->$commentIdColumn : $lastId;
|
||||
if ( ++$showing >= $perPage )
|
||||
{
|
||||
|
||||
@@ -4525,7 +4525,7 @@ abstract class Item extends Content
|
||||
}
|
||||
else
|
||||
{
|
||||
Output::i()->json( array( 'type' => 'merge', 'id' => $lastComment->$commentIdColumn, 'page' => $newPageCount, 'total' => $this->mapped('num_comments'), 'content' => Output::i()->replaceEmojiWithImages( $newContent ) ) );
|
||||
Output::i()->json( array( 'type' => 'merge', 'id' => $lastComment->$commentIdColumn, 'page' => $newPageCount, 'total' => $this->mapped('num_comments'), 'content' => $newContent ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4557,7 +4557,7 @@ abstract class Item extends Content
|
||||
|
||||
if ( $currentPageCount != $newPageCount )
|
||||
{
|
||||
Output::i()->json( array( 'type' => 'redirect', 'page' => $newPageCount, 'total' => $this->mapped('num_comments'), 'content' => Output::i()->replaceEmojiWithImages( $comment->html() ), 'url' => (string) $comment->url('find') ) );
|
||||
Output::i()->json( array( 'type' => 'redirect', 'page' => $newPageCount, 'total' => $this->mapped('num_comments'), 'content' => $comment->html(), 'url' => (string) $comment->url('find') ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4596,7 +4596,7 @@ abstract class Item extends Content
|
||||
'id' => $comment->$commentIdColumn,
|
||||
'page' => $newPageCount,
|
||||
'total' => $this->mapped('num_comments'),
|
||||
'content' => Output::i()->replaceEmojiWithImages( $output ),
|
||||
'content' => $output,
|
||||
'message' => $message,
|
||||
'postedByLoggedInMember' => true,
|
||||
/* This is used on the front end */
|
||||
|
||||
@@ -390,13 +390,14 @@ trait Reactable
|
||||
else
|
||||
{
|
||||
/* Set the data in $this->reputation to save queries later */
|
||||
$this->reputation = array();
|
||||
$_reputation = array();
|
||||
foreach( Db::i()->select( '*', 'core_reputation_index', $this->getReactionWhereClause() )->join( 'core_reactions', 'reaction=reaction_id' ) AS $reaction )
|
||||
{
|
||||
$this->reputation[ $reaction['member_id'] ] = $reaction['reaction'];
|
||||
$_reputation[ $reaction['member_id'] ] = $reaction['reaction'];
|
||||
$this->_reactions[ $reaction['member_id'] ][] = $reaction['reaction'];
|
||||
$this->_reactionCount += $reaction['rep_rating'];
|
||||
}
|
||||
$this->reputation = $_reputation;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,17 +39,6 @@ abstract class Result
|
||||
*/
|
||||
public static function preDisplay( string $content ): string
|
||||
{
|
||||
/* We cannot use images (or *anything* other than text) in search results as it messes with the truncation
|
||||
logic. All HTML (including emoticons) are already stripped before they go into the search index
|
||||
for this reason, but Emoji (because they're text) won't be. We can't swap the Emoji back out
|
||||
with one of the alternative Emoji style images though because that re-introduces images, so we
|
||||
just strip them out (making them behave like emoticons) */
|
||||
|
||||
if ( Settings::i()->emoji_style == 'twemoji' )
|
||||
{
|
||||
$content = preg_replace( '/(?:' . Parser::getEmojiRegex() . '|\x{200d})+/u', '', $content );
|
||||
}
|
||||
|
||||
/* We need to strip the image labels as returned by the AI image scanner */
|
||||
return preg_replace('#<i\s+?l="([^<]+?)</i>#', '', $content);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user