diff --git a/CHANGELOG.md b/CHANGELOG.md index cb8cdc4..821bb95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ - [ ] add plugin muppet support (request Mathieu M.) - [ ] add log for errors +2022.02.13 +- Fix sqlStatement errors (dc 2.21) + 2021.11.06 - add generic filters (dc 2.20) - add user pref for columns and filters options (dc 2.20) diff --git a/README.md b/README.md index 9772110..70df6d4 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ It mix your blog with a feeds planet. * super admin permission for plugin and services configuration * admin permission to manage feeds - * Dotclear 2.20 + * Dotclear 2.21 ## USAGE diff --git a/_define.php b/_define.php index 2104c18..3fd2bfb 100644 --- a/_define.php +++ b/_define.php @@ -18,9 +18,9 @@ $this->registerModule( 'Feeds server', 'Mix your blog with a feeds planet', 'Jean-Christian Denis, BG, Pierre Van Glabeke', - '2021.11.06', + '2022.02.13', [ - 'requires' => [['core', '2.20']], + 'requires' => [['core', '2.21']], 'permissions' => 'admin', 'type' => 'plugin', 'support' => 'https://github.com/JcDenis/zoneclearFeedServer', diff --git a/_install.php b/_install.php index 481cb2f..f7bc8d9 100644 --- a/_install.php +++ b/_install.php @@ -51,7 +51,7 @@ try { ->feed_upd_last('integer', 0, false, 0) ->feed_status('smallint', 0, false, 0) ->feed_name('varchar', 255, false) - ->feed_desc('text', 0, true) //!pgsql reserved 'desc' + ->feed_desc('text', null, true) //!pgsql reserved 'desc' ->feed_url('varchar', 255, false) ->feed_feed('varchar', 255, false) ->feed_tags('varchar', 255, true) diff --git a/dcstore.xml b/dcstore.xml index 56950f2..c0166fb 100644 --- a/dcstore.xml +++ b/dcstore.xml @@ -2,11 +2,11 @@ Feeds server - 2021.11.06 + 2022.02.13 Jean-Christian Denis, BG, Pierre Van Glabeke Mix your blog with a feeds planet https://github.com/JcDenis/zoneclearFeedServer/releases/download/v2021.11.06/plugin-zoneclearFeedServer.zip - 2.20 + 2.21 https://plugins.dotaddict.org/dc2/details/pacKman https://github.com/JcDenis/zoneclearFeedServer diff --git a/inc/class.zoneclear.feed.server.php b/inc/class.zoneclear.feed.server.php index 02c2312..68bb72b 100644 --- a/inc/class.zoneclear.feed.server.php +++ b/inc/class.zoneclear.feed.server.php @@ -203,15 +203,21 @@ class zoneclearFeedServer return null; } - $params['from'] = 'LEFT JOIN ' . $this->core->prefix . 'meta F ' . - 'ON P.post_id = F.post_id '; + $sql = new dcSelectStatement($this->core, 'zcfs'); + $sql->join((new dcJoinStatement($this->core, 'zcfs')) + ->type('LEFT') + ->from($this->core->prefix . 'meta F') + ->on('P.post_id = F.post_id') + ->statement() + ); + $params['sql'] = "AND P.blog_id = '" . $this->blog . "' " . "AND F.meta_type = 'zoneclearfeed_id' " . "AND F.meta_id = '" . $this->con->escape($params['feed_id']) . "' "; unset($params['feed_id']); - return $this->core->blog->getPosts($params, $count_only); + return $this->core->blog->getPosts($params, $count_only, $sql); } /**