forked from GithubBackups/tinyib
Delete .html files from res/ when posts are deleted
This commit is contained in:
parent
b908d035e7
commit
2b9b442073
@ -172,6 +172,9 @@ function deletePostByID($id) {
|
||||
}
|
||||
|
||||
if (isset($thispost)) {
|
||||
if ($thispost['parent'] == 0) {
|
||||
@unlink('res/' . $thispost['id'] . '.html');
|
||||
}
|
||||
deletePostImages($thispost);
|
||||
$GLOBALS['db']->deleteWhere(POSTS_FILE, new SimpleWhereClause(POST_ID, '=', $thispost['id'], INTEGER_COMPARISON));
|
||||
}
|
||||
|
@ -129,7 +129,11 @@ function deletePostByID($id) {
|
||||
} else {
|
||||
$thispost = $post;
|
||||
}
|
||||
} if (isset($thispost)) {
|
||||
}
|
||||
if (isset($thispost)) {
|
||||
if ($thispost['parent'] == 0) {
|
||||
@unlink('res/' . $thispost['id'] . '.html');
|
||||
}
|
||||
deletePostImages($thispost);
|
||||
mysql_query("DELETE FROM `" . $GLOBALS['mysql_posts_table'] . "` WHERE `id` = " . $thispost['id'] . " LIMIT 1");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user