From eac90243793cf8ba3da2117ac2d76efbcec24e53 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Mon, 15 Feb 2016 21:04:47 +0000
Subject: [PATCH] Usprawnienia wczytywania UTF-8 w module kino
---
modules/30_pogoda/handler.php | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/30_pogoda/handler.php b/modules/30_pogoda/handler.php
index 39beb6a..175c7ed 100644
--- a/modules/30_pogoda/handler.php
+++ b/modules/30_pogoda/handler.php
@@ -37,6 +37,7 @@
catch(Exception $e) {
}
+ $forced = FALSE;
if(empty($arg)) {
$arg = 'Warszawa';
$forced = TRUE;
@@ -138,9 +139,11 @@
$arg = trim($msg->args);
}
+ $out = new BotMsg();
+
if(empty($arg)) {
- if(isset($this->session->miasto)) {
- return new BotMsg('Aktualnie ustawione miejsce to: '.htmlspecialchars($this->session->miasto).', '.htmlspecialchars($this->session->countryName));
+ if(isset($msg->session->miasto)) {
+ return new BotMsg('Aktualnie ustawione miejsce to: '.htmlspecialchars($msg->session->miasto).', '.htmlspecialchars($msg->session->kraj));
}
try {
@@ -160,7 +163,7 @@
}
else
{
- $out = new BotMsg();
+
}
$api = new api_geonames();
@@ -178,9 +181,8 @@
$msg->session->cc = $dane['countryCode'];
$msg->session->geo = array('lat' => $dane['lat'], 'lon' => $dane['lng']);
- $out->a('<p>Ustawiono miejsce: '.htmlspecialchars($this->session->miasto).', '.htmlspecialchars($this->session->countryName).'</p>');
+ $out->a('<p>Ustawiono miejsce: '.htmlspecialchars($msg->session->miasto).', '.htmlspecialchars($msg->session->kraj).'</p>');
return $out;
}
}
-?>
\ No newline at end of file
--
Gitblit v1.9.1