fix sqlStatement errors (dc 2.21)

This commit is contained in:
Jean-Christian Paul Denis 2022-02-13 21:42:39 +01:00
parent 9823608ba5
commit e55c5c5661
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
6 changed files with 18 additions and 9 deletions

View File

@ -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)

View File

@ -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

View File

@ -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',

View File

@ -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)

View File

@ -2,11 +2,11 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="zoneclearFeedServer">
<name>Feeds server</name>
<version>2021.11.06</version>
<version>2022.02.13</version>
<author>Jean-Christian Denis, BG, Pierre Van Glabeke</author>
<desc>Mix your blog with a feeds planet</desc>
<file>https://github.com/JcDenis/zoneclearFeedServer/releases/download/v2021.11.06/plugin-zoneclearFeedServer.zip</file>
<da:dcmin>2.20</da:dcmin>
<da:dcmin>2.21</da:dcmin>
<da:details>https://plugins.dotaddict.org/dc2/details/pacKman</da:details>
<da:support>https://github.com/JcDenis/zoneclearFeedServer</da:support>
</module>

View File

@ -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);
}
/**