aboutsummaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-11-22 18:30:09 +0100
committerGravatar GitHub <noreply@github.com> 2019-11-22 18:30:09 +0100
commit90c7292326538522a5df97b3f0a847b8a28f759f (patch)
tree3e667d2cb629a6ff16db4196e8622d37bf10cf4e /app/Models
parent09c088c62ece3b17615fb4e2addfa16663bb334f (diff)
parent996b49f1d8fba327f24b5859f3bacb85edb79da9 (diff)
Merge pull request #2683 from FreshRSS/dev
FreshRSS 1.15.3
Diffstat (limited to 'app/Models')
-rw-r--r--app/Models/CategoryDAO.php2
-rw-r--r--app/Models/TagDAO.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php
index 08dc4eef0..4bba23d9c 100644
--- a/app/Models/CategoryDAO.php
+++ b/app/Models/CategoryDAO.php
@@ -81,7 +81,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable
public function addCategory($valuesTmp) {
$sql = 'INSERT INTO `_category`(name, attributes) '
- . 'SELECT * FROM (SELECT TRIM(?), ?) c2 ' //TRIM() to provide a type hint as text for PostgreSQL
+ . 'SELECT * FROM (SELECT TRIM(?) AS name, TRIM(?) AS attributes) c2 ' //TRIM() to provide a type hint as text
. 'WHERE NOT EXISTS (SELECT 1 FROM `_tag` WHERE name = TRIM(?))'; //No tag of the same name
$stm = $this->pdo->prepare($sql);
diff --git a/app/Models/TagDAO.php b/app/Models/TagDAO.php
index 5882eee76..09397c6a1 100644
--- a/app/Models/TagDAO.php
+++ b/app/Models/TagDAO.php
@@ -106,9 +106,9 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
public function updateTagAttribute($tag, $key, $value) {
if ($tag instanceof FreshRSS_Tag) {
$tag->_attributes($key, $value);
- return $this->updateFeed(
+ return $this->updateTag(
$tag->id(),
- array('attributes' => $feed->attributes())
+ [ 'attributes' => $tag->attributes() ]
);
}
return false;