From 39ed0e2ce2abd2377552ea5af36fa25cf1b66a3f Mon Sep 17 00:00:00 2001 From: Joel Uckelman Date: Thu, 1 Mar 2012 03:19:59 +0100 Subject: Cleanup. --- src/build_post.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/build_post.php') 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; } ?> -- cgit v1.2.3