From 7d8a6abbb21979fd77dca10275ebb8e01a04b6e4 Mon Sep 17 00:00:00 2001
From: Michael Hamann <michael@content-space.de>
Date: Mon, 29 Jul 2013 16:33:44 +0200
Subject: [PATCH] Fix popularity data submission in the backend FS#2808

The POST data contained the raw data instead of an array with the data
that should be submitted like in the requests from the browser. The
server backend has been fixed to be able to process both versions.
---
 lib/plugins/popularity/helper.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php
index 5bbeddba0..0e38bcb88 100644
--- a/lib/plugins/popularity/helper.php
+++ b/lib/plugins/popularity/helper.php
@@ -85,7 +85,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin {
     function sendData($data){
         $error = '';
         $httpClient = new DokuHTTPClient();
-        $status = $httpClient->sendRequest($this->submitUrl, $data, 'POST');
+        $status = $httpClient->sendRequest($this->submitUrl, array('data' => $data), 'POST');
         if ( ! $status ){
             $error = $httpClient->error;
         }
-- 
GitLab