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 | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/class/BotAPIGG.php b/class/BotAPIGG.php index b08003f..f375de3 100644 --- a/class/BotAPIGG.php +++ b/class/BotAPIGG.php @@ -6,7 +6,7 @@ function __construct($msg, $httpcode, $content) { $this->httpcode = $httpcode; $this->content = $content; - parent::__construct($msg); + parent::__construct($msg.' Błąd '.$httpcode); } function __get($name) { @@ -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