From: <var...@us...> - 2009-11-20 12:09:11
|
Revision: 7268 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7268&view=rev Author: vargenau Date: 2009-11-20 12:09:00 +0000 (Fri, 20 Nov 2009) Log Message: ----------- Setting NUM_SPAM_LINKS to 0 will disable the check Modified Paths: -------------- trunk/config/config-dist.ini trunk/lib/editpage.php Modified: trunk/config/config-dist.ini =================================================================== --- trunk/config/config-dist.ini 2009-11-12 08:47:58 UTC (rev 7267) +++ trunk/config/config-dist.ini 2009-11-20 12:09:00 UTC (rev 7268) @@ -96,6 +96,7 @@ ; If more than this number of external links appear on non-authenticated ; edits it will be rejected as spam. +; Setting NUM_SPAM_LINKS to 0 will disable the check. ;NUM_SPAM_LINKS = 20 ; By setting DISABLE_UPLOAD_ONLY_ALLOWED_EXTENSIONS to true, you get Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2009-11-12 08:47:58 UTC (rev 7267) +++ trunk/lib/editpage.php 2009-11-20 12:09:00 UTC (rev 7268) @@ -407,7 +407,8 @@ * Need to check dynamically some blacklist wikipage settings * (plugin WikiAccessRestrictions) and some static blacklist. * DONE: - * Always: More then 20 new external links + * More than NUM_SPAM_LINKS (default: 20) new external links. + * Disabled if NUM_SPAM_LINKS is 0 * ENABLE_SPAMASSASSIN: content patterns by babycart (only php >= 4.3 for now) * ENABLE_SPAMBLOCKLIST: content domain blacklist */ @@ -422,8 +423,8 @@ // FIXME: in longer texts the NUM_SPAM_LINKS number should be increased. // better use a certain text : link ratio. - // 1. Not more then 20 new external links - if ($newlinks >= NUM_SPAM_LINKS) + // 1. Not more than NUM_SPAM_LINKS (default: 20) new external links + if ((NUM_SPAM_LINKS > 0) and ($newlinks >= NUM_SPAM_LINKS)) { // Allow strictly authenticated users? // TODO: mail the admin? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |