From a28d9a42463c76e646fe4e7b4ed679cc2f5a6311 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Wed, 23 Apr 2025 19:55:19 +0200 Subject: [PATCH] functions.php: minor code semplification for crossbooard citations --- inc/functions.php | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 6c0c6033..c9f6657e 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2277,31 +2277,22 @@ function markup(&$body, $track_cites = false) { if ($cite) { if (isset($cited_posts[$_board][$cite])) { $link = $cited_posts[$_board][$cite]; - if (isset($original_board)){ - $replacement = '' . - '>>>/' . $original_board . '/' . $cite . + '>>>/' . $replacement_board . '/' . $cite . ''; + if ($track_cites && $config['track_cites']) { + $tracked_cites[] = [ $_board, $cite ]; } - else { - $replacement = '' . - '>>>/' . $_board . '/' . $cite . - ''; - - } - - if ($track_cites && $config['track_cites']) - $tracked_cites[] = array($_board, $cite); } else { $replacement = ">>>/$_board/$cite"; } - } elseif(isset($crossboard_indexes[$_board])) { + } elseif (isset($crossboard_indexes[$_board])) { $replacement = '' . '>>>/' . $_board . '/' . '';