(bug 49694) Apply $wgSpamRegex to the new section name in action=edit§ion=new
Either on $this->sectiontitle or $this->summary depending on which will be used. bug: 49694 Change-Id: Ie35c6bfe5cc66313930b0dc4d8f9e618657b3aea
This commit is contained in:
parent
bc61093c5a
commit
6e83874748
2 changed files with 9 additions and 0 deletions
|
|
@ -230,6 +230,8 @@ production.
|
|||
* (bug 51891) Fixed PHP notice on Special:PagesWithProp when no properties
|
||||
are defined.
|
||||
* (bug 52006) Corrected documentation of $wgTranscludeCacheExpiry.
|
||||
* (bug 49694) $wgSpamRegex is now also applied on the new section headline text
|
||||
adding a new topic on a page
|
||||
|
||||
=== API changes in 1.22 ===
|
||||
* (bug 25553) The JSON output formatter now leaves forward slashes unescaped
|
||||
|
|
|
|||
|
|
@ -1402,6 +1402,13 @@ class EditPage {
|
|||
|
||||
# Check for spam
|
||||
$match = self::matchSummarySpamRegex( $this->summary );
|
||||
if ( $match === false && $this->section == 'new' ) {
|
||||
if ( $this->sectiontitle !== '' ) {
|
||||
$match = self::matchSpamRegex( $this->sectiontitle );
|
||||
} else {
|
||||
$match = self::matchSpamRegex( $this->summary );
|
||||
}
|
||||
}
|
||||
if ( $match === false ) {
|
||||
$match = self::matchSpamRegex( $this->textbox1 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue