mirror of
https://github.com/friendica/friendica
synced 2024-11-19 03:03:41 +00:00
One more query
This commit is contained in:
parent
28d3980fab
commit
24d7b2af82
1 changed files with 4 additions and 6 deletions
|
@ -131,12 +131,10 @@ function notification($params)
|
||||||
$p = null;
|
$p = null;
|
||||||
|
|
||||||
if ($params['otype'] === 'item' && $parent_id) {
|
if ($params['otype'] === 'item' && $parent_id) {
|
||||||
$p = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1",
|
$p = dba::select('item', [], ['id' => $parent_id], ['limit' => 1]);
|
||||||
intval($parent_id)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$item_post_type = item_post_type($p[0]);
|
$item_post_type = item_post_type($p);
|
||||||
|
|
||||||
// "a post"
|
// "a post"
|
||||||
$dest_str = sprintf(t('%1$s commented on [url=%2$s]a %3$s[/url]'),
|
$dest_str = sprintf(t('%1$s commented on [url=%2$s]a %3$s[/url]'),
|
||||||
|
@ -149,12 +147,12 @@ function notification($params)
|
||||||
$dest_str = sprintf(t('%1$s commented on [url=%2$s]%3$s\'s %4$s[/url]'),
|
$dest_str = sprintf(t('%1$s commented on [url=%2$s]%3$s\'s %4$s[/url]'),
|
||||||
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
|
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
|
||||||
$itemlink,
|
$itemlink,
|
||||||
$p[0]['author-name'],
|
$p['author-name'],
|
||||||
$item_post_type);
|
$item_post_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
// "your post"
|
// "your post"
|
||||||
if ($p[0]['owner-name'] == $p[0]['author-name'] && $p[0]['wall']) {
|
if ($p['owner-name'] == $p['author-name'] && $p['wall']) {
|
||||||
$dest_str = sprintf(t('%1$s commented on [url=%2$s]your %3$s[/url]'),
|
$dest_str = sprintf(t('%1$s commented on [url=%2$s]your %3$s[/url]'),
|
||||||
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
|
'[url='.$params['source_link'].']'.$params['source_name'].'[/url]',
|
||||||
$itemlink,
|
$itemlink,
|
||||||
|
|
Loading…
Reference in a new issue