2011-03-28 14:21:28 +00:00
|
|
|
<?
|
|
|
|
$ID = $_GET['id'];
|
|
|
|
if (!check_perms('admin_manage_wiki') || !is_number($ID) || ($ID == '136')) {
|
|
|
|
error(404);
|
|
|
|
}
|
|
|
|
|
|
|
|
$DB->query("SELECT Title FROM wiki_articles WHERE ID = $ID");
|
|
|
|
|
|
|
|
if($DB->record_count() < 1) {
|
|
|
|
error(404);
|
|
|
|
}
|
|
|
|
|
2012-07-25 08:00:15 +00:00
|
|
|
list($Title) = $DB->next_record(MYSQLI_NUM, false);
|
2011-03-28 14:21:28 +00:00
|
|
|
//Log
|
2012-10-11 08:00:15 +00:00
|
|
|
Misc::write_log("Wiki article ".$ID." (".$Title.") was deleted by ".$LoggedUser['Username']);
|
2011-03-28 14:21:28 +00:00
|
|
|
//Delete
|
|
|
|
$DB->query("DELETE FROM wiki_articles WHERE ID = $ID");
|
|
|
|
$DB->query("DELETE FROM wiki_aliases WHERE ArticleID = $ID");
|
|
|
|
$DB->query("DELETE FROM wiki_revisions WHERE ID = $ID");
|
|
|
|
|
|
|
|
$Cache->delete_value('wiki_article_'.$ID);
|
|
|
|
header("location: wiki.php");
|
|
|
|
|
|
|
|
?>
|