mirror of
https://we.phorge.it/source/phorge.git
synced 2025-03-29 04:28:12 +01:00
Don't prompt to mark notifications as read if we don't need to
Summary: Fixes whatever task is tracking this junk, if one exists. Don't prompt unless there's a security issue. Test Plan: - Generated notifications from a test account. - Clicked "Mark All" from dropdown menu, no prompt. - Clicked "Mark All" from notifications screen, no prompt. - Command-Clicked "Mark All" from dropdown menu to open in new window, got normal prompt. Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D18483
This commit is contained in:
parent
b8b701faf7
commit
643877b467
1 changed files with 11 additions and 0 deletions
|
@ -8,6 +8,17 @@ final class PhabricatorNotificationClearController
|
||||||
$chrono_key = $request->getStr('chronoKey');
|
$chrono_key = $request->getStr('chronoKey');
|
||||||
|
|
||||||
if ($request->isDialogFormPost()) {
|
if ($request->isDialogFormPost()) {
|
||||||
|
$should_clear = true;
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
$request->validateCSRF();
|
||||||
|
$should_clear = true;
|
||||||
|
} catch (AphrontMalformedRequestException $ex) {
|
||||||
|
$should_clear = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($should_clear) {
|
||||||
$table = new PhabricatorFeedStoryNotification();
|
$table = new PhabricatorFeedStoryNotification();
|
||||||
|
|
||||||
queryfx(
|
queryfx(
|
||||||
|
|
Loading…
Add table
Reference in a new issue