Fixed topic deletion.
This commit is contained in:
parent
0da70b46cd
commit
ded21eb9c6
1 changed files with 19 additions and 19 deletions
|
@ -160,13 +160,7 @@ if (in_array($moderationMode, $validModerationModes, true)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$isXHR) {
|
if (!$isXHR) {
|
||||||
if (!$submissionConfirmed) {
|
if (!isset($_GET['confirm'])) {
|
||||||
header("Location: " . url(
|
|
||||||
'forum-topic',
|
|
||||||
['topic' => $topic['topic_id']]
|
|
||||||
));
|
|
||||||
break;
|
|
||||||
} elseif (!isset($_GET['confirm'])) {
|
|
||||||
echo tpl_render('forum.confirm', [
|
echo tpl_render('forum.confirm', [
|
||||||
'title' => 'Confirm topic deletion',
|
'title' => 'Confirm topic deletion',
|
||||||
'class' => 'far fa-trash-alt',
|
'class' => 'far fa-trash-alt',
|
||||||
|
@ -177,6 +171,12 @@ if (in_array($moderationMode, $validModerationModes, true)) {
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
|
} elseif (!$submissionConfirmed) {
|
||||||
|
header("Location: " . url(
|
||||||
|
'forum-topic',
|
||||||
|
['topic' => $topic['topic_id']]
|
||||||
|
));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,12 +212,7 @@ if (in_array($moderationMode, $validModerationModes, true)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$isXHR) {
|
if (!$isXHR) {
|
||||||
if (!$submissionConfirmed) {
|
if (!isset($_GET['confirm'])) {
|
||||||
header("Location: " . url('forum-topic', [
|
|
||||||
'topic' => $topic['topic_id'],
|
|
||||||
]));
|
|
||||||
break;
|
|
||||||
} elseif (!isset($_GET['confirm'])) {
|
|
||||||
echo tpl_render('forum.confirm', [
|
echo tpl_render('forum.confirm', [
|
||||||
'title' => 'Confirm topic restore',
|
'title' => 'Confirm topic restore',
|
||||||
'class' => 'fas fa-magic',
|
'class' => 'fas fa-magic',
|
||||||
|
@ -228,6 +223,11 @@ if (in_array($moderationMode, $validModerationModes, true)) {
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
|
} elseif (!$submissionConfirmed) {
|
||||||
|
header("Location: " . url('forum-topic', [
|
||||||
|
'topic' => $topic['topic_id'],
|
||||||
|
]));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,12 +255,7 @@ if (in_array($moderationMode, $validModerationModes, true)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$isXHR) {
|
if (!$isXHR) {
|
||||||
if (!$submissionConfirmed) {
|
if (!isset($_GET['confirm'])) {
|
||||||
header('Location: ' . url('forum-topic', [
|
|
||||||
'topic' => $topic['topic_id'],
|
|
||||||
]));
|
|
||||||
break;
|
|
||||||
} elseif (!isset($_GET['confirm'])) {
|
|
||||||
echo tpl_render('forum.confirm', [
|
echo tpl_render('forum.confirm', [
|
||||||
'title' => 'Confirm topic nuke',
|
'title' => 'Confirm topic nuke',
|
||||||
'class' => 'fas fa-radiation',
|
'class' => 'fas fa-radiation',
|
||||||
|
@ -271,6 +266,11 @@ if (in_array($moderationMode, $validModerationModes, true)) {
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
|
} elseif (!$submissionConfirmed) {
|
||||||
|
header('Location: ' . url('forum-topic', [
|
||||||
|
'topic' => $topic['topic_id'],
|
||||||
|
]));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue