~fabrixxm/apthread

530421a7c55ada1bf37787245ee0f4d3b891ee03 — fabrixxm 2 months ago b7a260d
Use summary as page title if present
1 files changed, 3 insertions(+), 0 deletions(-)

M lib.php
M lib.php => lib.php +3 -0
@@ 86,6 86,9 @@ function get_first_reply($obj) {

function title($obj, $max=8) {
    // $t = preg_replace("|<[^>]*>|", "", $obj['content']);
    $t = $obj['summary'] ?? "";
    if ($t != "")
        return $t;
    $t = $obj['content'];
    $t = preg_replace("%(</p>|br\w*/?>)%", "\$1\n", $t);
    $t = explode("\n", trim($t))[0];