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 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 :
++ +