=James Birkholz= wrote:
It should be a simple matter to deny edits that
contain certain text.
This edit.php snippet appears to do just that:
if ( "save" == $formtype ) {
# Check for spam
if ( $wgSpamRegex && preg_match( $wgSpamRegex,
$this->textbox1, $matches ) ) {
$this->spamPage( $matches[0] );
return;
}
But I can't find where to set $wgSpamRegex (not in localSettings.php) ,
All configuration variables are to be set in LocalSettings.php; that is indeed
the correct place to set it.
nor am I able to even add or replace its value
directly in the code.
I've tried inserting these two assignments
$wgSpamRegex = '1px;';
$wgSpamRegex .= '1px;';
If you have PHP set to display or log warnings you may see a warning printed on
save; this is because you need to include a delimiter around the expression.
For more background, see the documentation:
http://www.php.net/manual/en/ref.pcre.php
-- brion vibber (brion @
pobox.com)