Compare commits
2 commits
60866725c4
...
e6d188799e
Author | SHA1 | Date | |
---|---|---|---|
e6d188799e | |||
22acbbf113 |
2 changed files with 8 additions and 17 deletions
|
@ -3007,8 +3007,10 @@ function mod_reports(Context $ctx) {
|
|||
$po = new Post($post, '?/', $mod);
|
||||
}
|
||||
|
||||
$body .= $po->build(true);
|
||||
|
||||
// A little messy and inefficient.
|
||||
$append_html = Element('mod/report.html', array(
|
||||
$report_html = Element('mod/report.html', array(
|
||||
'report' => $report,
|
||||
'config' => $config,
|
||||
'mod' => $mod,
|
||||
|
@ -3016,22 +3018,7 @@ function mod_reports(Context $ctx) {
|
|||
'token_all' => make_secure_link_token('reports/' . $report['id'] . '/dismissall')
|
||||
));
|
||||
|
||||
// Bug fix for https://github.com/savetheinternet/Tinyboard/issues/21
|
||||
$po->body = truncate($po->body, $po->link(), $config['body_truncate'] - substr_count($append_html, '<br>'));
|
||||
|
||||
if (\mb_strlen($po->body) + \mb_strlen($append_html) > $config['body_truncate_char']) {
|
||||
// still too long; temporarily increase limit in the config
|
||||
$__old_body_truncate_char = $config['body_truncate_char'];
|
||||
$config['body_truncate_char'] = \mb_strlen($po->body) + \mb_strlen($append_html);
|
||||
}
|
||||
|
||||
$po->body .= $append_html;
|
||||
|
||||
$body .= $po->build(true) . '<hr>';
|
||||
|
||||
if (isset($__old_body_truncate_char)) {
|
||||
$config['body_truncate_char'] = $__old_body_truncate_char;
|
||||
}
|
||||
$body .= $report_html . '<hr>';
|
||||
}
|
||||
|
||||
$count = \count($report_rows);
|
||||
|
|
|
@ -808,6 +808,10 @@ hr {
|
|||
|
||||
div.report {
|
||||
color: #333;
|
||||
margin-left: 1.4em;
|
||||
padding-right: 3em;
|
||||
padding-bottom: 0.3em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
div.top_notice {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue