Patch bug51543 for Website problem Bug #51543
Patch version 2010-10-29 11:18 UTC
Return to Bug #51543 |
Download this patch
Patch Revisions:
Developer: kalle@php.net
Index: common.inc
===================================================================
--- common.inc (revision 304936)
+++ common.inc (working copy)
@@ -134,7 +134,13 @@
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) . "...";
|