diff options
Diffstat (limited to 'src/build_post.php')
-rw-r--r-- | src/build_post.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/build_post.php b/src/build_post.php index aa0cbf6..9039dcb 100644 --- a/src/build_post.php +++ b/src/build_post.php @@ -4,21 +4,21 @@ function build_post_subject($listtag, $forumtag, $subject) { // strip the '[list]' and '[forum]' tags $tagpat = '/(' . preg_quote($listtag, '/') . '|' . preg_quote($forumtag, '/') . ')\\s*/'; - $subj = preg_replace($tagpat, '', $subject); + $subject = preg_replace($tagpat, '', $subject); // strip leading sequences of Re-equivalents and Edit $re = '/^(?:(?:RE|AW|SV|VS|EDIT)(?:\\[\\d+\\])?:\\s*)+/i'; - if (preg_match($re, $subj, $m)) { - $subj = substr($subj, strlen($m[0])); + if (preg_match($re, $subject, $m)) { + $subject = substr($subject, strlen($m[0])); } // ensure nonempty subject - $subj = trim($subj); - if ($subj == '') { - $subj = '(no subject)'; + $subject = trim($subject); + if ($subject == '') { + $subject = '(no subject)'; } - return $subj; + return $subject; } ?> |