From 45134645f88a4aba3c9b4fb1759078b50631d74a Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Mon, 6 Sep 2004 20:36:35 +0000 Subject: [PATCH] Parentheses needed for this regex for correct treatment of alternatives. ^(#REDIRECT|#UMLEITUNG) instead of ^#REDIRECT|#UMLEITUNG, where the anchor would only be used for #REDIRECT Bug reported by borislav for Bulgarian deletion log page --- includes/MagicWord.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/MagicWord.php b/includes/MagicWord.php index a41445b0ba..0508f96155 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -131,7 +131,7 @@ class MagicWord { $this->mBaseRegex = implode( '|', $escSyn ); $case = $this->mCaseSensitive ? '' : 'i'; $this->mRegex = "/{$this->mBaseRegex}/{$case}"; - $this->mRegexStart = "/^{$this->mBaseRegex}/{$case}"; + $this->mRegexStart = "/^({$this->mBaseRegex})/{$case}"; $this->mVariableRegex = str_replace( "\\$1", "([$variableClass]*?)", $this->mRegex ); $this->mVariableStartToEndRegex = str_replace( "\\$1", "([$variableClass]*?)", "/^({$this->mBaseRegex})$/{$case}" ); -- 2.20.1