Commit e65b0663 authored by MBoretto's avatar MBoretto

pdo also inside Telegram.php

parent c7438436
...@@ -65,6 +65,7 @@ class DB ...@@ -65,6 +65,7 @@ class DB
} }
self::$pdo = $pdo; self::$pdo = $pdo;
return self::$pdo;
} }
/** /**
......
...@@ -87,6 +87,12 @@ class Telegram ...@@ -87,6 +87,12 @@ class Telegram
* @var boolean * @var boolean
*/ */
protected $mysql_enabled = false; protected $mysql_enabled = false;
/**
* PDO object
*
* @var \PDO
*/
protected $pdo;
/** /**
* Commands config * Commands config
...@@ -148,7 +154,7 @@ class Telegram ...@@ -148,7 +154,7 @@ class Telegram
*/ */
public function enableMySQL(array $credential, $table_prefix = null) public function enableMySQL(array $credential, $table_prefix = null)
{ {
DB::initialize($credential, $table_prefix); $this->pdo = DB::initialize($credential, $table_prefix);
$this->mysql_enabled = true; $this->mysql_enabled = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment