|
@ -2076,10 +2076,17 @@ function markup(&$body, $track_cites = false, $op = false) { |
|
|
if ($board['uri'] != $_board) { |
|
|
if ($board['uri'] != $_board) { |
|
|
if (!openBoard($_board)){ |
|
|
if (!openBoard($_board)){ |
|
|
if (in_array($_board,array_keys($config['boards_alias']))){ |
|
|
if (in_array($_board,array_keys($config['boards_alias']))){ |
|
|
//$_board = $config['boards_alias'][$_board]; |
|
|
$_board = $config['boards_alias'][$_board]; |
|
|
//openBoard($_board); |
|
|
if (openBoard($_board)){ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
continue; // Unknown board |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
else { |
|
|
continue; // Unknown board |
|
|
continue; // Unknown board |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -2104,7 +2111,13 @@ function markup(&$body, $track_cites = false, $op = false) { |
|
|
openBoard($tmp_board); |
|
|
openBoard($tmp_board); |
|
|
|
|
|
|
|
|
foreach ($cites as $matches) { |
|
|
foreach ($cites as $matches) { |
|
|
|
|
|
$original_board = NULL; |
|
|
$_board = $matches[2][0]; |
|
|
$_board = $matches[2][0]; |
|
|
|
|
|
if (in_array($_board,array_keys($config['boards_alias']))){ |
|
|
|
|
|
$original_board = $_board; |
|
|
|
|
|
$_board = $config['boards_alias'][$_board]; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
$cite = @$matches[3][0]; |
|
|
$cite = @$matches[3][0]; |
|
|
|
|
|
|
|
|
// preg_match_all is not multibyte-safe |
|
|
// preg_match_all is not multibyte-safe |
|
@ -2115,7 +2128,16 @@ function markup(&$body, $track_cites = false, $op = false) { |
|
|
if ($cite) { |
|
|
if ($cite) { |
|
|
if (isset($cited_posts[$_board][$cite])) { |
|
|
if (isset($cited_posts[$_board][$cite])) { |
|
|
$link = $cited_posts[$_board][$cite]; |
|
|
$link = $cited_posts[$_board][$cite]; |
|
|
|
|
|
if (isset($original_board)){ |
|
|
|
|
|
$replacement = '<a ' . |
|
|
|
|
|
($_board == $board['uri'] ? |
|
|
|
|
|
'onclick="highlightReply(\''.$cite.'\', event);" ' |
|
|
|
|
|
: '') . 'href="' . $link . '">' . |
|
|
|
|
|
'>>>/' . $original_board . '/' . $cite . |
|
|
|
|
|
'</a>'; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
$replacement = '<a ' . |
|
|
$replacement = '<a ' . |
|
|
($_board == $board['uri'] ? |
|
|
($_board == $board['uri'] ? |
|
|
'onclick="highlightReply(\''.$cite.'\', event);" ' |
|
|
'onclick="highlightReply(\''.$cite.'\', event);" ' |
|
@ -2123,6 +2145,8 @@ function markup(&$body, $track_cites = false, $op = false) { |
|
|
'>>>/' . $_board . '/' . $cite . |
|
|
'>>>/' . $_board . '/' . $cite . |
|
|
'</a>'; |
|
|
'</a>'; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$body = mb_substr_replace($body, $matches[1][0] . $replacement . $matches[4][0], $matches[0][1] + $skip_chars, mb_strlen($matches[0][0])); |
|
|
$body = mb_substr_replace($body, $matches[1][0] . $replacement . $matches[4][0], $matches[0][1] + $skip_chars, mb_strlen($matches[0][0])); |
|
|
$skip_chars += mb_strlen($matches[1][0] . $replacement . $matches[4][0]) - mb_strlen($matches[0][0]); |
|
|
$skip_chars += mb_strlen($matches[1][0] . $replacement . $matches[4][0]) - mb_strlen($matches[0][0]); |
|
|
|
|
|
|
|
|