From 6d0060111afed6e587e5410a9495bd0140219a6d Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Wed, 29 Aug 2012 12:55:32 +0000
Subject: [PATCH] Dodanie informacji o pogodzie pod wyświetlanymi ikonami w module pogoda.
---
class/BotSession.php | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/class/BotSession.php b/class/BotSession.php
index e8b8930..d273779 100644
--- a/class/BotSession.php
+++ b/class/BotSession.php
@@ -9,10 +9,10 @@
* Nazwa modułu, którego zmienne klasa przetwarza
* @var string max. 40 znaków
*/
- var $class;
+ protected $class = '';
+ protected $class_empty = TRUE;
private $user;
-
/**
* Inicjuje klasę w zależności od użytkownika
@@ -21,11 +21,11 @@
$this->user = sha1($user);
$this->user_struct = parse_url($user);
- $this->class = '';
+ $this->class_empty = FALSE;
}
private function init() {
- if(strlen($this->class) == 0) {
+ if(strlen($this->class) == 0 && !$this->class_empty) {
throw new Exception('Przed użyciem $msg->session należy ustawić nazwę modułu za pomocą metody setClass - patrz "Poradnik tworzenia modułów", dział "Klasa BotMessage", rozdział "Pole $session".');
}
--
Gitblit v1.9.1