Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2368273
PhabricatorNotificationClearController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorNotificationClearController.php
View Options
<?php
final
class
PhabricatorNotificationClearController
extends
PhabricatorNotificationController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
if
(
$request
->
isDialogFormPost
())
{
$table
=
new
PhabricatorFeedStoryNotification
();
queryfx
(
$table
->
establishConnection
(
'w'
),
'UPDATE %T SET hasViewed = 1 WHERE
userPHID = %s AND hasViewed = 0'
,
$table
->
getTableName
(),
$user
->
getPHID
());
return
id
(
new
AphrontReloadResponse
())
->
setURI
(
'/notification/'
);
}
$dialog
=
new
AphrontDialogView
();
$dialog
->
setUser
(
$user
);
$dialog
->
setTitle
(
'Really mark all notifications as read?'
);
$is_serious
=
PhabricatorEnv
::
getEnvConfig
(
'phabricator.serious-business'
);
if
(
$is_serious
)
{
$dialog
->
appendChild
(
pht
(
'All unread notifications will be marked as read. You can not '
.
'undo this action.'
));
}
else
{
$dialog
->
appendChild
(
pht
(
"You can't ignore your problems forever, you know."
));
}
$dialog
->
addCancelButton
(
'/notification/'
);
$dialog
->
addSubmitButton
(
pht
(
'Mark All Read'
));
return
id
(
new
AphrontDialogResponse
())->
setDialog
(
$dialog
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Sep 16, 6:37 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
431441
Default Alt Text
PhabricatorNotificationClearController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment