From 38e16479d4c5b83cced5fb2365c4f8bf73c26558 Mon Sep 17 00:00:00 2001
From: PhilippeBrangier
Date: Fri, 7 Jul 2023 18:14:55 +0200
Subject: [PATCH 1/2] Update admin.tpl
added purge orphean button
---
template/admin.tpl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/template/admin.tpl b/template/admin.tpl
index 622a216..abdd91a 100755
--- a/template/admin.tpl
+++ b/template/admin.tpl
@@ -108,4 +108,8 @@ jQuery(document).ready(function() {
{/if}
+ For those who can't register a trigger in mysql feel free to manualy purge orpherans :
+
+
+
From 7792eab5881e0eea95594c8f3c8bf05e9d690ab0 Mon Sep 17 00:00:00 2001
From: PhilippeBrangier
Date: Fri, 7 Jul 2023 18:16:07 +0200
Subject: [PATCH 2/2] Update admin.php
---
admin.php | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/admin.php b/admin.php
index 6906b47..2ecb5f0 100755
--- a/admin.php
+++ b/admin.php
@@ -61,7 +61,16 @@
array_push($page['infos'], l10n('Information data registered in database'));
}
-
+/*
+ * Purge orpheans manualy.
+ */
+if(isset($_POST['purge'])) {
+ unset($_POST['purge']);
+ $makePurgeQuery = "DELETE FROM face_tag_positions
+ WHERE tag_id NOT IN (SELECT id FROM ".TAGS_TABLE.")";
+ pwg_query($makePurgeQuery);
+ array_push($page['infos'], l10n('Purge Done ! '));
+}
/*
* Add our template to the global template