Differential D16041 Diff 38608 src/applications/notification/controller/PhabricatorNotificationClearController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/notification/controller/PhabricatorNotificationClearController.php
| Show All 12 Lines | if ($request->isDialogFormPost()) { | ||||
| queryfx( | queryfx( | ||||
| $table->establishConnection('w'), | $table->establishConnection('w'), | ||||
| 'UPDATE %T SET hasViewed = 1 '. | 'UPDATE %T SET hasViewed = 1 '. | ||||
| 'WHERE userPHID = %s AND hasViewed = 0 and chronologicalKey <= %s', | 'WHERE userPHID = %s AND hasViewed = 0 and chronologicalKey <= %s', | ||||
| $table->getTableName(), | $table->getTableName(), | ||||
| $viewer->getPHID(), | $viewer->getPHID(), | ||||
| $chrono_key); | $chrono_key); | ||||
| PhabricatorUserCache::clearCache( | |||||
| PhabricatorUserNotificationCountCacheType::KEY_COUNT, | |||||
| $viewer->getPHID()); | |||||
| return id(new AphrontReloadResponse()) | return id(new AphrontReloadResponse()) | ||||
| ->setURI('/notification/'); | ->setURI('/notification/'); | ||||
| } | } | ||||
| $dialog = new AphrontDialogView(); | $dialog = new AphrontDialogView(); | ||||
| $dialog->setUser($viewer); | $dialog->setUser($viewer); | ||||
| $dialog->addCancelButton('/notification/'); | $dialog->addCancelButton('/notification/'); | ||||
| if ($chrono_key) { | if ($chrono_key) { | ||||
| Show All 25 Lines | |||||