From b552abb3327f09baa1c0f4e821dc9f6bd6ef738e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 1 May 2018 17:02:11 +0200 Subject: JSON column for feeds (#1838) * Draft of JSON column for feeds https://github.com/FreshRSS/FreshRSS/issues/1654 * Add some per-feed options * Feed cURL timeout * Mark updated articles as read https://github.com/FreshRSS/FreshRSS/issues/891 * Mark as read upon reception https://github.com/FreshRSS/FreshRSS/issues/1702 * Ignore SSL (unsafe) https://github.com/FreshRSS/FreshRSS/issues/1811 * Try PHPCS workaround While waiting for a better syntax support --- lib/Minz/ModelPdo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Minz/ModelPdo.php') diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index d769e0ff4..6928a2857 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -69,7 +69,7 @@ class Minz_ModelPdo { case 'sqlite': $string = 'sqlite:' . join_path(DATA_PATH, 'users', $currentUser, 'db.sqlite'); $this->prefix = ''; - $this->bd = new MinzPDOMSQLite($string, $db['user'], $db['password'], $driver_options); + $this->bd = new MinzPDOSQLite($string, $db['user'], $db['password'], $driver_options); $this->bd->exec('PRAGMA foreign_keys = ON;'); break; case 'pgsql': @@ -160,7 +160,7 @@ class MinzPDOMySql extends MinzPDO { } } -class MinzPDOMSQLite extends MinzPDO { +class MinzPDOSQLite extends MinzPDO { public function lastInsertId($name = null) { return parent::lastInsertId(); //We discard the name, only used by PostgreSQL } -- cgit v1.2.3 From 0ffc006a7edcf36853c7133c9adba3c095b923cf Mon Sep 17 00:00:00 2001 From: Bartłomiej Cieszkowski <11327694+bartlomiejcieszkowski@users.noreply.github.com> Date: Sat, 26 May 2018 23:13:14 +0200 Subject: 1888 postgresql unix socket workaround (#1889) * Workaround to enable postgres unix socket instead of tcp * Support Unix sockets for MySQL and PostgreSQL --- lib/Minz/ModelPdo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Minz/ModelPdo.php') diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index 6928a2857..733982c14 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -58,7 +58,7 @@ class Minz_ModelPdo { try { switch ($db['type']) { case 'mysql': - $string = 'mysql:host=' . $dbServer['host'] . ';dbname=' . $db['base'] . ';charset=utf8mb4'; + $string = 'mysql:host=' . (empty($dbServer['host']) ? $db['host'] : $dbServer['host']) . ';dbname=' . $db['base'] . ';charset=utf8mb4'; if (!empty($dbServer['port'])) { $string .= ';port=' . $dbServer['port']; } @@ -73,7 +73,7 @@ class Minz_ModelPdo { $this->bd->exec('PRAGMA foreign_keys = ON;'); break; case 'pgsql': - $string = 'pgsql:host=' . $dbServer['host'] . ';dbname=' . $db['base']; + $string = 'pgsql:host=' . (empty($dbServer['host']) ? $db['host'] : $dbServer['host']) . ';dbname=' . $db['base']; if (!empty($dbServer['port'])) { $string .= ';port=' . $dbServer['port']; } -- cgit v1.2.3