summaryrefslogtreecommitdiff
path: root/app/Models/FeedDAOSQLite.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-05-01 17:02:11 +0200
committerGravatar GitHub <noreply@github.com> 2018-05-01 17:02:11 +0200
commitb552abb3327f09baa1c0f4e821dc9f6bd6ef738e (patch)
treedc5439bcf0e65d16fda118d45d2ded0c7ff7230c /app/Models/FeedDAOSQLite.php
parent404ca869e9aafa40931914812b8552e4b9973694 (diff)
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
Diffstat (limited to 'app/Models/FeedDAOSQLite.php')
-rw-r--r--app/Models/FeedDAOSQLite.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/Models/FeedDAOSQLite.php b/app/Models/FeedDAOSQLite.php
new file mode 100644
index 000000000..3c203b378
--- /dev/null
+++ b/app/Models/FeedDAOSQLite.php
@@ -0,0 +1,17 @@
+<?php
+
+class FreshRSS_FeedDAOSQLite extends FreshRSS_FeedDAO {
+
+ protected function autoUpdateDb($errorInfo) {
+ if ($tableInfo = $this->bd->query("PRAGMA table_info('feed')")) {
+ $columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1);
+ foreach (array('attributes') as $column) {
+ if (!in_array($column, $columns)) {
+ return $this->addColumn($column);
+ }
+ }
+ }
+ return false;
+ }
+
+}