From 4c2b27a116d7e50cbe0b362bd3f992a75dd6013e Mon Sep 17 00:00:00 2001 From: Dmitry Granovsky Date: Wed, 8 Jul 2020 12:25:07 +0300 Subject: [PATCH] fix changeset reversion code --- lib/lib_history.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/lib_history.php b/lib/lib_history.php index cedff533..2bac99ac 100644 --- a/lib/lib_history.php +++ b/lib/lib_history.php @@ -257,12 +257,16 @@ function revert_changeset($set_id, $comment) { $res = sql_pe("SELECT tf_id FROM tf_revisions WHERE set_id=?", array($set_id)); $res_revtext = sql_prepare("SELECT rev_text FROM tf_revisions WHERE tf_id=? AND set_idcloseCursor(); + foreach ($new_revisions as $rev) { + create_tf_revision($new_set_id, $rev[0], $rev[1]); + } $res = sql_pe("SELECT lemma_id FROM dict_revisions WHERE set_id=?", array($set_id)); $res_revtext = sql_prepare("SELECT rev_text FROM dict_revisions WHERE lemma_id=? AND set_id