Correction de la modif de l'attribut "is_commentable" dans le blog

This commit is contained in:
leosw
2026-01-18 13:10:57 +01:00
parent 0ee127ca3f
commit dd333fc2aa
2 changed files with 7 additions and 1 deletions

View File

@@ -130,6 +130,12 @@ class BlogArticle
$result = pg_execute($con, "prepare3", array($this->locale_id, $user->id))
or die ("Cannot execute statement\n");
$query = "UPDATE contents SET is_commentable = $1 WHERE id = $2";
pg_prepare($con, "prepare4", $query)
or die ("Cannot prepare statement\n");
pg_execute($con, "prepare4", array($this->is_commentable ? 't' : 'f', $this->content_id))
or die ("Cannot prepare statement\n");
pg_close($con);
error_log(