mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
New user based item function
This commit is contained in:
parent
ef0a2f6f8d
commit
c66dcf96ac
5 changed files with 7 additions and 7 deletions
|
@ -462,7 +462,7 @@ function statusnet_post_hook(App $a, &$b)
|
|||
}
|
||||
|
||||
$condition = ['uri' => $b["thr-parent"], 'uid' => $b["uid"]];
|
||||
$orig_post = Item::selectFirst($b["uid"], ['author-link', 'uri'], $condition);
|
||||
$orig_post = Item::selectFirst(['author-link', 'uri'], $condition);
|
||||
if (!count($orig_post)) {
|
||||
logger("statusnet_post_hook: no parent found " . $b["thr-parent"]);
|
||||
return;
|
||||
|
@ -683,7 +683,7 @@ function statusnet_prepare_body(App $a, &$b)
|
|||
$item["plink"] = $a->get_baseurl() . "/display/" . $a->user["nickname"] . "/" . $item["parent"];
|
||||
|
||||
$condition = ['uri' => $item["thr-parent"], 'uid' => local_user()];
|
||||
$orig_post = Item::selectFirst(local_user(), ['author-link', 'uri'], $condition);
|
||||
$orig_post = Item::selectFirst(['author-link', 'uri'], $condition);
|
||||
if (count($orig_post)) {
|
||||
$nick = preg_replace("=https?://(.*)/(.*)=ism", "$2", $orig_post["author-link"]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue