From 09ac53ee541b28ef9cd04f04174f59fe7bfe100b Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Sun, 12 Aug 2012 13:39:13 +0000
Subject: [PATCH] Użycie funkcji http_build_query do tworzenia zapytań do botmastera w klasie BotAPIGG.

---
 class/BotAPIGG.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/class/BotAPIGG.php b/class/BotAPIGG.php
index 213bd49..f375de3 100644
--- a/class/BotAPIGG.php
+++ b/class/BotAPIGG.php
@@ -151,10 +151,10 @@
 		
 		$tok = $this->httpQuery('https://'.$token['host'].'/setStatus/'.$auth['numer'], array(
 			CURLOPT_POST => TRUE,
-			CURLOPT_POSTFIELDS => array(
+			CURLOPT_POSTFIELDS => http_build_query(array(
 				'status' => $status,
 				'desc' => $desc,
-			),
+			), '', '&'),
 		));
 		
 		if( (string)$tok->status != '0') {
@@ -183,7 +183,7 @@
 		
 		$tok = $this->httpQuery('https://'.$token['host'].'/botmaster/setUrl/'.$auth['numer'], array(
 			CURLOPT_POST => TRUE,
-			CURLOPT_POSTFIELDS => array('hash' => $hash),
+			CURLOPT_POSTFIELDS => http_build_query(array('hash' => $hash), '', '&'),
 		), TRUE, FALSE);
 		
 		return $tok;
@@ -195,7 +195,7 @@
 		
 		$tok = $this->httpQuery('https://'.$token['host'].'/botmaster/setUrl/'.$auth['numer'], array(
 			CURLOPT_POST => TRUE,
-			CURLOPT_POSTFIELDS => array('hash' => $hash),
+			CURLOPT_POSTFIELDS => http_build_query(array('hash' => $hash), '', '&'),
 		), TRUE, FALSE);
 		
 		if( (string)$tok->status != '0') {

--
Gitblit v1.9.1