1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-29 01:34:31 +01:00

Config: deletion of boards covers img_root now

This commit is contained in:
Jayden Callahan 2014-09-26 07:01:11 +09:30
parent 1f2cd47562
commit cb5fed2bdf
2 changed files with 7 additions and 0 deletions

View File

@ -130,6 +130,10 @@ foreach($delete as $i => $d){
// Delete entire board directory
rrmdir($board['uri'] . '/');
rrmdir('static/banners/' . $board['uri']);
// HAAAAAX
if($config['dir']['img_root'] != '')
rrmdir($config['dir']['img_root'] . $board['uri']);
cache::delete('board_' . $board['uri']);
_syslog(LOG_NOTICE, "Board deleted: {$board['uri']}");

View File

@ -429,6 +429,9 @@ function mod_edit_board($boardName) {
// Delete entire board directory
rrmdir($board['uri'] . '/');
// To reiterate: HAAAAAX
if($config['dir']['img_root'] != '')
rrmdir($config['dir']['img_root'] . $board['uri']);
} else {
$query = prepare('UPDATE ``boards`` SET `title` = :title, `subtitle` = :subtitle WHERE `uri` = :uri');
$query->bindValue(':uri', $board['uri']);