|
@@ -365,8 +365,9 @@ function MessageIndex()
|
|
|
IFNULL(meml.real_name, ml.poster_name) AS last_display_name, t.id_first_msg,
|
|
|
mf.poster_time AS first_poster_time, mf.subject AS first_subject, mf.icon AS first_icon,
|
|
|
mf.poster_name AS first_member_name, mf.id_member AS first_id_member,
|
|
|
- IFNULL(memf.real_name, mf.poster_name) AS first_display_name, SUBSTRING(ml.body, 1, ' . ($modSettings['preview_characters'] + 256) . ') AS last_body,
|
|
|
- SUBSTRING(mf.body, 1, ' . ($modSettings['preview_characters'] + 256) . ') AS first_body, ml.smileys_enabled AS last_smileys, mf.smileys_enabled AS first_smileys
|
|
|
+ IFNULL(memf.real_name, mf.poster_name) AS first_display_name, ' . (!empty($modSettings['preview_characters']) ? '
|
|
|
+ SUBSTRING(ml.body, 1, ' . ($modSettings['preview_characters'] + 256) . ') AS last_body,
|
|
|
+ SUBSTRING(mf.body, 1, ' . ($modSettings['preview_characters'] + 256) . ') AS first_body' : '') . 'ml.smileys_enabled AS last_smileys, mf.smileys_enabled AS first_smileys
|
|
|
FROM {db_prefix}topics AS t
|
|
|
INNER JOIN {db_prefix}messages AS ml ON (ml.id_msg = t.id_last_msg)
|
|
|
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
|