diff options
| author | 2018-11-05 18:10:38 +0100 | |
|---|---|---|
| committer | 2018-11-05 18:10:38 +0100 | |
| commit | cf899d8d25c57b05dff89b89e2c7e56808f83c50 (patch) | |
| tree | d91c139f4f7d12c5b83359a6a3c093e6405b93b1 /app/Models/FeedDAO.php | |
| parent | e1faf9dfcf74725e0616a56303aeeb80fa9ed82f (diff) | |
TT-RSS import (#2099)
* TT-RSS import
Import of Tiny Tiny RSS favourites
https://github.com/FreshRSS/FreshRSS/issues/2018#issuecomment-432710462
* Fallback feed_url
* Simpler JSON
* TT-RSS import custom labels
* Fix syntax
Diffstat (limited to 'app/Models/FeedDAO.php')
| -rw-r--r-- | app/Models/FeedDAO.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index e579f5881..7f00642f4 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -465,9 +465,15 @@ UPDATE `{$this->prefix}feed` SQL; $stm = $this->bd->prepare($sql); if (!($stm && $stm->execute(array(':new_value' => FreshRSS_Feed::TTL_DEFAULT, ':old_value' => -2)))) { + $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); + Minz_Log::error('SQL warning updateTTL 1: ' . $info[2] . ' ' . $sql); + $sql2 = 'ALTER TABLE `' . $this->prefix . 'feed` ADD COLUMN ttl INT NOT NULL DEFAULT ' . FreshRSS_Feed::TTL_DEFAULT; //v0.7.3 $stm = $this->bd->prepare($sql2); - $stm->execute(); + if (!($stm && $stm->execute())) { + $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo(); + Minz_Log::error('SQL error updateTTL 2: ' . $info[2] . ' ' . $sql2); + } } else { $stm->execute(array(':new_value' => -3600, ':old_value' => -1)); } |
