mirror of
https://github.com/friendica/friendica
synced 2025-04-23 07:50:12 +00:00
Improvements for the "post-reason"
This commit is contained in:
parent
a20d05ba39
commit
81aaacc67d
9 changed files with 46 additions and 43 deletions
|
@ -52,7 +52,7 @@ class Bookmark extends BaseApi
|
|||
}
|
||||
|
||||
if ($item['uid'] == 0) {
|
||||
$stored = Item::storeForUserByUriId($this->parameters['id'], $uid);
|
||||
$stored = Item::storeForUserByUriId($this->parameters['id'], $uid, ['post-reason' => Item::PR_ACTIVITY]);
|
||||
if (!empty($stored)) {
|
||||
$item = Post::selectFirst(['id', 'gravity'], ['id' => $stored]);
|
||||
if (!DBA::isResult($item)) {
|
||||
|
|
|
@ -52,7 +52,7 @@ class Unbookmark extends BaseApi
|
|||
}
|
||||
|
||||
if ($item['uid'] == 0) {
|
||||
$stored = Item::storeForUserByUriId($this->parameters['id'], $uid);
|
||||
$stored = Item::storeForUserByUriId($this->parameters['id'], $uid, ['post-reason' => Item::PR_ACTIVITY]);
|
||||
if (!empty($stored)) {
|
||||
$item = Post::selectFirst(['id', 'gravity'], ['id' => $stored]);
|
||||
if (!DBA::isResult($item)) {
|
||||
|
|
|
@ -56,7 +56,7 @@ class Star extends BaseModule
|
|||
}
|
||||
|
||||
if ($item['uid'] == 0) {
|
||||
$stored = Item::storeForUserByUriId($item['uri-id'], local_user());
|
||||
$stored = Item::storeForUserByUriId($item['uri-id'], local_user(), ['post-reason' => Item::PR_ACTIVITY]);
|
||||
if (!empty($stored)) {
|
||||
$item = Post::selectFirst(['starred'], ['id' => $stored]);
|
||||
if (!DBA::isResult($item)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue