Skip to content

Commit

Permalink
fix: avoid duplicate entries for revisions, closes #2843
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Mar 2, 2024
1 parent 469f12c commit 1f9d46e
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions phpmyfaq/src/phpMyFAQ/Administration/Revision.php
Expand Up @@ -41,14 +41,17 @@ public function create(int $faqId, string $faqLanguage): bool
{
$query = sprintf(
"
INSERT INTO
%sfaqdata_revisions
SELECT * FROM
%sfaqdata
WHERE
id = %d
AND
lang = '%s'",
INSERT INTO
%sfaqdata_revisions
SELECT
id, lang, solution_id, revision_id + 1, active, sticky, keywords, thema, content, author, email,
comment, updated, date_start, date_end, created, notes
FROM
%sfaqdata
WHERE
id = %d
AND
laqng = '%s'",

This comment has been minimized.

Copy link
@thorsten

thorsten Apr 23, 2024

Author Owner

already fixed

This comment has been minimized.

Copy link
@kst87

kst87 Apr 23, 2024

I just saw it and wanted to delete my comment.

Database::getTablePrefix(),
Database::getTablePrefix(),
$faqId,
Expand Down

0 comments on commit 1f9d46e

Please sign in to comment.