Jacek Kowalski
2012-07-13 4c05eca9dee137436b998b2d506db5fbd6d10550
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;
      }
   }