-
- if ($_POST['dropalbum'] == L10n::t('Delete Album')) {
- // Check if we should do HTML-based delete confirmation
- if (!empty($_REQUEST['confirm'])) {
- $drop_url = $a->query_string;
-
- $extra_inputs = [
- ['name' => 'albumname', 'value' => $_POST['albumname']],
- ];
-
- $a->page['content'] = Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
- '$method' => 'post',
- '$message' => L10n::t('Do you really want to delete this photo album and all its photos?'),
- '$extra_inputs' => $extra_inputs,
- '$confirm' => L10n::t('Delete Album'),
- '$confirm_url' => $drop_url,
- '$confirm_name' => 'dropalbum', // Needed so that confirmation will bring us back into this if statement
- '$cancel' => L10n::t('Cancel'),
- ]);
-
- $a->error = 1; // Set $a->error so the other module functions don't execute
- return;
- }
-