diff --git a/docs/NEWS b/docs/NEWS index 2ad76c22..23012d4d 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 1.5 () ------------------------------------------------------------------------ + * Changed karma plugin to only track GET requests as visits, not + POSTs. Thanks to Marcus Friedman + * Enhanced nl2br plugin to also use
tags, by onli * Added possibility for templates to register a central function diff --git a/plugins/serendipity_event_karma/serendipity_event_karma.php b/plugins/serendipity_event_karma/serendipity_event_karma.php index 801b19a3..aeb00609 100644 --- a/plugins/serendipity_event_karma/serendipity_event_karma.php +++ b/plugins/serendipity_event_karma/serendipity_event_karma.php @@ -54,7 +54,7 @@ class serendipity_event_karma extends serendipity_event $propbag->add('description', PLUGIN_KARMA_BLAHBLAH); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking, Grischa Brockhaus, Gregor Völtz, Judebert'); - $propbag->add('version', '2.2'); + $propbag->add('version', '2.3'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -975,7 +975,7 @@ END_IMG_CSS; // Update the number of visits // Are we supposed to track visits? $track_clicks = serendipity_db_bool($this->get_config('visits_active', true)) && $this->track_clicks_allowed_by_user(); - if ($track_clicks) { + if ($track_clicks && $_SERVER['REQUEST_METHOD'] == 'GET') { $sql = serendipity_db_query( "UPDATE {$serendipity['dbPrefix']}karma SET visits = visits + 1