Skip to content

Commit

Permalink
Merge branch 'smf3' of github.com:Oldiesmann/SMF21 into reactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldiesmann committed Jul 11, 2024
2 parents 6af7ee2 + 7788cb5 commit 38a52d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Sources/ServerSideIncludes.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ public static function queryPosts(
$request = Db::$db->query(
'substring',
'SELECT
m.poster_time, m.subject, m.id_topic, m.id_member, m.id_msg, m.id_board, m.likes, b.name AS board_name,
m.poster_time, m.subject, m.id_topic, m.id_member, m.id_msg, m.id_board, m.likes, m.version, b.name AS board_name,
COALESCE(mem.real_name, m.poster_name) AS poster_name, ' . (User::$me->is_guest ? '1 AS is_read, 0 AS new_from' : '
COALESCE(lt.id_msg, lmr.id_msg, 0) >= m.id_msg_modified AS is_read,
COALESCE(lt.id_msg, lmr.id_msg, -1) + 1 AS new_from') . ', ' . ($limit_body ? 'SUBSTRING(m.body, 1, 384) AS body' : 'm.body') . ', m.smileys_enabled
Expand Down Expand Up @@ -2188,7 +2188,8 @@ public static function boardNews(?int $board = null, ?int $limit = null, ?int $s
'',
'SELECT
m.icon, m.subject, m.body, COALESCE(mem.real_name, m.poster_name) AS poster_name, m.poster_time, m.likes,
t.num_replies, t.id_topic, m.id_member, m.smileys_enabled, m.id_msg, t.locked, t.id_last_msg, m.id_board
t.num_replies, t.id_topic, m.id_member, m.smileys_enabled, m.id_msg, t.locked, t.id_last_msg, m.id_board,
m.version
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function ($matches) use ($substitute) {
if (
// Control characters (except \t, \n, and \r).
($num < 0x20 && $num !== 0x9 && $num !== 0xA && $num !== 0xD)
|| ($num >= 0x74 && $num < 0xA0)
|| ($num >= 0x7F && $num < 0xA0)

// UTF-16 surrogate pairs.
|| ($num >= 0xD800 && $num <= 0xDFFF)
Expand Down

0 comments on commit 38a52d6

Please sign in to comment.