* Changed karma plugin to only track GET requests as visits, not
POSTs. Thanks to Marcus Friedman
This commit is contained in:
@@ -3,6 +3,9 @@
|
|||||||
Version 1.5 ()
|
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 <p> tags, by onli
|
* Enhanced nl2br plugin to also use <p> tags, by onli
|
||||||
|
|
||||||
* Added possibility for templates to register a central function
|
* Added possibility for templates to register a central function
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class serendipity_event_karma extends serendipity_event
|
|||||||
$propbag->add('description', PLUGIN_KARMA_BLAHBLAH);
|
$propbag->add('description', PLUGIN_KARMA_BLAHBLAH);
|
||||||
$propbag->add('stackable', false);
|
$propbag->add('stackable', false);
|
||||||
$propbag->add('author', 'Garvin Hicking, Grischa Brockhaus, Gregor V<>ltz, Judebert');
|
$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(
|
$propbag->add('requirements', array(
|
||||||
'serendipity' => '0.8',
|
'serendipity' => '0.8',
|
||||||
'smarty' => '2.6.7',
|
'smarty' => '2.6.7',
|
||||||
@@ -975,7 +975,7 @@ END_IMG_CSS;
|
|||||||
// Update the number of visits
|
// Update the number of visits
|
||||||
// Are we supposed to track visits?
|
// Are we supposed to track visits?
|
||||||
$track_clicks = serendipity_db_bool($this->get_config('visits_active', true)) && $this->track_clicks_allowed_by_user();
|
$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(
|
$sql = serendipity_db_query(
|
||||||
"UPDATE {$serendipity['dbPrefix']}karma
|
"UPDATE {$serendipity['dbPrefix']}karma
|
||||||
SET visits = visits + 1
|
SET visits = visits + 1
|
||||||
|
|||||||
Reference in New Issue
Block a user