Author |
Message |
|
Post subject: Disallowed comments on polls from unregistered users
Posted: Feb 16, 2008 - 22:37
|
|
Butterfly
Joined: Aug 16, 2003
Posts: 883
Location: Göteborg
|
|
Finally disallowed this unwanted feature
It is unfortunately impossible to disallow that from the PostNuke adminstation panel so I had to modify the code. Well, it was not hard to do but but is harder than it should be so it never happened before. But now it is done so there should be no more spam in the RSS feeds.
It is a simple one-liner, and here is the path for anyone enjoying reading them.
Code: |
Index: modules/Polls/comments.php
===================================================================
--- modules/Polls/comments.php (revision 63)
+++ modules/Polls/comments.php (revision 64)
@@ -819,7 +819,7 @@
list($troll) = $result->fields;
}
- if((!$tia) && ($fake == 1) && ($troll < 6)) {
+ if((!$tia) && ($fake == 1) && ($troll < 6) && pnUserLoggedIn()) {
$column = &$pntable['pollcomments_column'];
$nextid = $dbconn->GenId($pntable['pollcomments']);
$result =& $dbconn->Execute("INSERT INTO $pntable[pollcomments] ($column[tid],
|
|
_________________ Programmers are tools for converting caffeine into code.
|
|
|
|
|
|
| |