diff options
author | Joel Uckelman <uckelman@nomic.net> | 2012-03-01 03:19:59 +0100 |
---|---|---|
committer | Joel Uckelman <uckelman@nomic.net> | 2012-03-01 03:19:59 +0100 |
commit | 39ed0e2ce2abd2377552ea5af36fa25cf1b66a3f (patch) | |
tree | 926731a91e68d4028eaea2096d777881c30a38ae | |
parent | 6a1a634202995b9d409ed10eadb4b5d8c21c8c00 (diff) |
Cleanup.
-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; } ?> |