www.pegasos.org

Announcements - Disallowed comments on polls from unregistered users

kozz - Feb 16, 2008 - 22:37
Post subject: Disallowed comments on polls from unregistered users
Finally disallowed this unwanted feature Smile

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],

All times are GMT + 1 Hour
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits