mirror of
https://github.com/friendica/friendica
synced 2025-04-22 01:50:11 +00:00
Merge "notification" routes
This commit is contained in:
parent
dd8d9d7c70
commit
c2b8c65104
8 changed files with 16 additions and 15 deletions
|
@ -23,7 +23,7 @@ class Notification extends BaseModule
|
|||
{
|
||||
$request_id = $parameters['id'] ?? false;
|
||||
|
||||
if (DI::args()->get(1) == 'action' && $request_id) {
|
||||
if ($request_id) {
|
||||
$intro = DI::intro()->selectFirst(['id' => $request_id, 'uid' => local_user()]);
|
||||
|
||||
switch ($_POST['submit']) {
|
||||
|
@ -65,10 +65,11 @@ class Notification extends BaseModule
|
|||
*/
|
||||
public static function content(array $parameters = [])
|
||||
{
|
||||
// @TODO: Replace with parameter from router
|
||||
if (DI::args()->getArgc() > 2 && DI::args()->get(1) === 'view' && intval(DI::args()->get(2))) {
|
||||
$request_id = $parameters['id'] ?? false;
|
||||
|
||||
if ($request_id) {
|
||||
try {
|
||||
$notification = DI::notify()->getByID(DI::args()->get(2));
|
||||
$notification = DI::notify()->getByID($request_id);
|
||||
$notification->setSeen();
|
||||
|
||||
if (!empty($notification->link)) {
|
||||
|
@ -86,3 +87,4 @@ class Notification extends BaseModule
|
|||
DI::baseUrl()->redirect('notifications/system');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue