Commit: 5e9dff7a2e603bd94402d535b60658a5fcdb1ac7 Author: Kalle Sommer Nielsen <[email protected]> Sat, 27 Dec 2014 18:16:37 +0100 Parents: 38c15ff1d6ee0b1d494bd510ef3844e75a945ac6 Branches: master
Link: http://git.php.net/?p=web/news.git;a=commitdiff;h=5e9dff7a2e603bd94402d535b60658a5fcdb1ac7 Log: Fixed bug #51543 (newsweb: bug summary/subject string issue) Bugs: https://bugs.php.net/51543 Changed paths: M common.php Diff: diff --git a/common.php b/common.php index a3ab38c..78a7245 100644 --- a/common.php +++ b/common.php @@ -125,7 +125,13 @@ function format_author($a, $charset) { function format_subject($s, $charset) { global $article; $s = recode_header($s, $charset); - $s = preg_replace("/^(Re: *)?\[(PHP|PEAR)(-.*)?\] /i", "\\1", $s); + + if ((($pos = strpos($s, '[PHP')) !== false || ($pos = strpos($s, '[PEAR')) !== false)) { + if (($end_pos = strpos($s, ']', $pos)) !== false) { + $s = ltrim(substr_replace($s, '', $pos, $end_pos - $pos + 1)); + } + } + // make this look better on the preview page.. if (strlen($s) > 150 && !isset($article)) { $s = substr($s, 0, 150) . "..."; -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
