Update of /cvsroot/php-blog/serendipity/plugins/serendipity_event_karma
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17254/plugins/serendipity_event_karma
Modified Files:
serendipity_event_karma.php
Log Message:
those nasty googlebots even index a location.href javascript. so exclude
them from the karma logging.
Index: serendipity_event_karma.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_event_karma/serendipity_event_karma.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- serendipity_event_karma.php 9 Jul 2004 09:35:12 -0000 1.12
+++ serendipity_event_karma.php 18 Aug 2004 14:08:30 -0000 1.13
@@ -264,6 +264,12 @@
return ;
}
+ if (stristr($_SERVER['HTTP_USER_AGENT'], 'google')) {
+ // We don't want googlebots hitting the karma-voting
+ $this->karmaVote = 'invalid1';
+ return ;
+ }
+
// Voting takes place here.
$q = 'SELECT *
FROM ' . $serendipity['dbPrefix'] . 'entries AS e
|