From 332344cff07e9fc89bfcde3717888128cf1edd5e Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Fri, 24 Aug 2012 11:26:28 +0000
Subject: [PATCH] 1. Przeportowanie modułu version (wersja) do nowej wersji API. 2. Przeportowanie modułu czesc do nowej wersji API. 3. Zmiana kolejności ładowania modułu legacy (zmiana numeru).
---
class/BotSession.php | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/class/BotSession.php b/class/BotSession.php
index a70734e..cec7f45 100644
--- a/class/BotSession.php
+++ b/class/BotSession.php
@@ -54,6 +54,9 @@
);
$files = glob(BOT_TOPDIR.'/db/*/'.$this->user_struct['user'].'.ggdb');
+ if(!$files) {
+ return;
+ }
$this->PDO->beginTransaction();
$st = $this->PDO->prepare('INSERT OR REPLACE INTO data (class, name, value) VALUES (?, ?, ?)');
@@ -72,7 +75,9 @@
}
}
catch(Exception $e) {
- @unlink(BOT_TOPDIR.'/database/'.sha1($this->user).'.sqlite');
+ if(file_exists(BOT_TOPDIR.'/database/'.sha1($this->user).'.sqlite')) {
+ @unlink(BOT_TOPDIR.'/database/'.sha1($this->user).'.sqlite');
+ }
throw $e;
}
}
--
Gitblit v1.9.1