Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions template/admin.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,8 @@ jQuery(document).ready(function() {
<input type="submit" value="{'Save'|@translate}" name="save" />
</p>
{/if}
<p> For those who can't register a trigger in mysql feel free to manualy purge orpherans : </p>
<p class="formButtons">
<input type="submit" value="{'Purge orphean'|@translate}" name="purge" />
</p>
</form>