allow claim id to be directly passed to dmca page

This commit is contained in:
Jeremy Kauffman 2019-03-21 14:34:28 -04:00
parent c65078f94e
commit 9fd48d6513

View file

@ -24,6 +24,10 @@ class ReportActions extends Actions
$values[$field] = $value;
}
if ($_GET['claim_id'] && !$values['identifier']) {
$values['identifier'] = htmlspecialchars($_GET['claim_id']);
}
if (!$errors) {
$values['report_id'] = Encoding::base58Encode(random_bytes(6));
Mailgun::sendDmcaReport($values);
@ -31,6 +35,9 @@ class ReportActions extends Actions
return Controller::redirect(Request::getRelativeUri(), 303);
}
return ['report/dmca', ['errors' => $errors, 'values' => $values]];
return ['report/dmca', [
'errors' => $errors,
'values' => $values
]];
}
}