diff options
| author | 2016-08-14 10:05:38 +0200 | |
|---|---|---|
| committer | 2016-08-14 10:05:38 +0200 | |
| commit | b90f815e2592a4ed498c93b343b8ed5b4186730a (patch) | |
| tree | 84288fcac53f094dd9147dd45ee3ceee6308ede1 /lib/Minz | |
| parent | 462c1e208f02e4977c7e96c0f5936987931d5bc1 (diff) | |
| parent | a180485f9146f22d48470f3ba541317dbc2ee076 (diff) | |
Merge branch 'FreshRSS/dev' into SuperFeeder_timeout
Diffstat (limited to 'lib/Minz')
| -rw-r--r-- | lib/Minz/ModelPdo.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index 25999f02b..845aecaae 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -16,7 +16,6 @@ class Minz_ModelPdo { public static $useSharedBd = true; private static $sharedBd = null; private static $sharedPrefix; - private static $has_transaction = false; private static $sharedCurrentUser; protected static $sharedDbType; @@ -60,8 +59,8 @@ class Minz_ModelPdo { if ($type === 'mysql') { $string = 'mysql:host=' . $db['host'] . ';dbname=' . $db['base'] - . ';charset=utf8'; - $driver_options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES utf8'; + . ';charset=utf8mb4'; + $driver_options[PDO::MYSQL_ATTR_INIT_COMMAND] = 'SET NAMES utf8mb4'; $this->prefix = $db['prefix'] . $currentUser . '_'; } elseif ($type === 'sqlite') { $string = 'sqlite:' . join_path(DATA_PATH, 'users', $currentUser, 'db.sqlite'); @@ -96,18 +95,15 @@ class Minz_ModelPdo { public function beginTransaction() { $this->bd->beginTransaction(); - self::$has_transaction = true; } - public function hasTransaction() { - return self::$has_transaction; + public function inTransaction() { + return $this->bd->inTransaction(); //requires PHP >= 5.3.3 } public function commit() { $this->bd->commit(); - self::$has_transaction = false; } public function rollBack() { $this->bd->rollBack(); - self::$has_transaction = false; } public static function clean() { |
