- if (($a->argc == 2) && x($_POST,'delete') && x($_POST, 'id')) {
-
- // Check if we should do HTML-based delete confirmation
- if (!x($_REQUEST,'confirm')) {
- if (x($_REQUEST,'canceled')) {
- goaway(System::baseUrl() . '/videos/' . $a->data['user']['nickname']);
- }
-
- $drop_url = $a->query_string;
- $a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), [
- '$method' => 'post',
- '$message' => L10n::t('Do you really want to delete this video?'),
- '$extra_inputs' => [
- ['name'=>'id', 'value'=> $_POST['id']],
- ['name'=>'delete', 'value'=>'x']
- ],
- '$confirm' => L10n::t('Delete Video'),
- '$confirm_url' => $drop_url,
- '$confirm_name' => 'confirm', // 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;
- }
-