From 27156012e9742691cafd14a66fc206dbd01acf68 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Sun, 12 Aug 2012 14:19:38 +0000
Subject: [PATCH] 1. Poprawienie sposobu wysyłania obrazka przez metodę putImage klasy BotAPIGG. 2. Nie wysyłanie nagłówka przy braku formatowania.

---
 class/BotMessageGG.php |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/class/BotMessageGG.php b/class/BotMessageGG.php
index fd5ee9d..aa07ac8 100644
--- a/class/BotMessageGG.php
+++ b/class/BotMessageGG.php
@@ -15,6 +15,15 @@
 		$this->user = new BotUser($uid.'/'.$_GET['to']);
 		$this->session = new BotSession($uid);
 		$this->setText(file_get_contents('php://input'));
+		
+		if(isset($_GET['images'])) {
+			$images = explode(',', $_GET['images']);
+			foreach($images as $image) {
+				if(strlen($image) == 16 && ctype_xdigit($image)) {
+					$this->images[] = new BotImageGG($image);
+				}
+			}
+		}
 	}
 }
 ?>
\ No newline at end of file

--
Gitblit v1.9.1