Need to load "verb" from notify table, too. This whole thing is a maintenance (#5459)
nightmare. Let's use the new database frontend/backend system and load all columns anywhere the "entity" is requested.
This commit is contained in:
parent
bb99ac8111
commit
d3144e2837
|
@ -402,6 +402,7 @@ class NotificationsManager extends BaseObject
|
||||||
$fields = ['id', 'parent', 'verb', 'author-name', 'unseen', 'author-link', 'author-avatar', 'contact-avatar',
|
$fields = ['id', 'parent', 'verb', 'author-name', 'unseen', 'author-link', 'author-avatar', 'contact-avatar',
|
||||||
'network', 'created', 'object', 'parent-author-name', 'parent-author-link', 'parent-guid'];
|
'network', 'created', 'object', 'parent-author-name', 'parent-author-link', 'parent-guid'];
|
||||||
$params = ['order' => ['created' => true], 'limit' => [$start, $limit]];
|
$params = ['order' => ['created' => true], 'limit' => [$start, $limit]];
|
||||||
|
|
||||||
$items = Item::selectForUser(local_user(), $fields, $condition, $params);
|
$items = Item::selectForUser(local_user(), $fields, $condition, $params);
|
||||||
|
|
||||||
if (DBM::is_result($items)) {
|
if (DBM::is_result($items)) {
|
||||||
|
@ -439,12 +440,13 @@ class NotificationsManager extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q(
|
$r = q(
|
||||||
"SELECT `id`, `url`, `photo`, `msg`, `date`, `seen` FROM `notify`
|
"SELECT `id`, `url`, `photo`, `msg`, `date`, `seen`, `verb` FROM `notify`
|
||||||
WHERE `uid` = %d $sql_seen ORDER BY `date` DESC LIMIT %d, %d ",
|
WHERE `uid` = %d $sql_seen ORDER BY `date` DESC LIMIT %d, %d ",
|
||||||
intval(local_user()),
|
intval(local_user()),
|
||||||
intval($start),
|
intval($start),
|
||||||
intval($limit)
|
intval($limit)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (DBM::is_result($r)) {
|
if (DBM::is_result($r)) {
|
||||||
$notifs = $this->formatNotifs($r, $ident);
|
$notifs = $this->formatNotifs($r, $ident);
|
||||||
}
|
}
|
||||||
|
@ -487,6 +489,7 @@ class NotificationsManager extends BaseObject
|
||||||
$fields = ['id', 'parent', 'verb', 'author-name', 'unseen', 'author-link', 'author-avatar', 'contact-avatar',
|
$fields = ['id', 'parent', 'verb', 'author-name', 'unseen', 'author-link', 'author-avatar', 'contact-avatar',
|
||||||
'network', 'created', 'object', 'parent-author-name', 'parent-author-link', 'parent-guid'];
|
'network', 'created', 'object', 'parent-author-name', 'parent-author-link', 'parent-guid'];
|
||||||
$params = ['order' => ['created' => true], 'limit' => [$start, $limit]];
|
$params = ['order' => ['created' => true], 'limit' => [$start, $limit]];
|
||||||
|
|
||||||
$items = Item::selectForUser(local_user(), $fields, $condition, $params);
|
$items = Item::selectForUser(local_user(), $fields, $condition, $params);
|
||||||
|
|
||||||
if (DBM::is_result($items)) {
|
if (DBM::is_result($items)) {
|
||||||
|
|
Loading…
Reference in a new issue