mirror of
https://github.com/friendica/friendica
synced 2025-04-26 03:50:12 +00:00
Move Friendica\Core\NotificationsManager to Friendica\Model\Notify
This commit is contained in:
parent
b632114b12
commit
1f368d469f
4 changed files with 10 additions and 13 deletions
|
@ -4,14 +4,12 @@
|
|||
* @brief Methods for read and write notifications from/to database
|
||||
* or for formatting notifications
|
||||
*/
|
||||
namespace Friendica\Core;
|
||||
namespace Friendica\Model;
|
||||
|
||||
use Friendica\BaseObject;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Content\Text\HTML;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Protocol\Activity;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
|
@ -22,7 +20,7 @@ use Friendica\Util\XML;
|
|||
* @brief Methods for read and write notifications from/to database
|
||||
* or for formatting notifications
|
||||
*/
|
||||
class NotificationsManager extends BaseObject
|
||||
final class Notify extends BaseObject
|
||||
{
|
||||
/**
|
||||
* @brief set some extra note properties
|
|
@ -4,8 +4,8 @@ namespace Friendica\Module\Notifications;
|
|||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\NotificationsManager;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\Notify as ModelNotify;
|
||||
use Friendica\Network\HTTPException;
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ class Notify extends BaseModule
|
|||
|
||||
// @TODO: Replace with parameter from router
|
||||
if ($a->argc > 2 && $a->argv[1] === 'mark' && $a->argv[2] === 'all') {
|
||||
$notificationsManager = new NotificationsManager();
|
||||
$notificationsManager = new ModelNotify();
|
||||
$success = $notificationsManager->setAllSeen();
|
||||
|
||||
header('Content-type: application/json; charset=utf-8');
|
||||
|
@ -49,7 +49,7 @@ class Notify extends BaseModule
|
|||
|
||||
// @TODO: Replace with parameter from router
|
||||
if ($a->argc > 2 && $a->argv[1] === 'view' && intval($a->argv[2])) {
|
||||
$notificationsManager = new NotificationsManager();
|
||||
$notificationsManager = new ModelNotify();
|
||||
// @TODO: Replace with parameter from router
|
||||
$note = $notificationsManager->getByID($a->argv[2]);
|
||||
if (!empty($note)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue