mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-10 10:28:50 +00:00
New methods in item class
This commit is contained in:
parent
f96a41a411
commit
229b21d7b2
3 changed files with 16 additions and 14 deletions
|
@ -70,6 +70,7 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\Worker;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Photo;
|
||||
use Friendica\Model\Queue;
|
||||
use Friendica\Model\User;
|
||||
|
@ -755,7 +756,7 @@ function twitter_expire(App $a, $b)
|
|||
if (count($r)) {
|
||||
foreach ($r as $rr) {
|
||||
logger('twitter_expire: user ' . $rr['uid']);
|
||||
item_expire($rr['uid'], $days, NETWORK_TWITTER, true);
|
||||
Item::expire($rr['uid'], $days, NETWORK_TWITTER, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1603,7 +1604,7 @@ function twitter_checknotification(App $a, $uid, $own_id, $top_item, $postarray)
|
|||
'to_email' => $user[0]['email'],
|
||||
'uid' => $user[0]['uid'],
|
||||
'item' => $postarray,
|
||||
'link' => $a->get_baseurl() . '/display/' . urlencode(get_item_guid($top_item)),
|
||||
'link' => $a->get_baseurl() . '/display/' . urlencode(Item::getGuidById($top_item)),
|
||||
'source_name' => $postarray['author-name'],
|
||||
'source_link' => $postarray['author-link'],
|
||||
'source_photo' => $postarray['author-avatar'],
|
||||
|
@ -1657,7 +1658,7 @@ function twitter_fetchparentposts(App $a, $uid, $post, $connection, $self, $own_
|
|||
if (trim($postarray['body']) == "")
|
||||
continue;
|
||||
|
||||
$item = item_store($postarray);
|
||||
$item = Item::insert($postarray);
|
||||
$postarray["id"] = $item;
|
||||
|
||||
logger('twitter_fetchparentpost: User ' . $self["nick"] . ' posted parent timeline item ' . $item);
|
||||
|
@ -1774,7 +1775,7 @@ function twitter_fetchhometimeline(App $a, $uid)
|
|||
continue;
|
||||
}
|
||||
|
||||
$item = item_store($postarray);
|
||||
$item = Item::insert($postarray);
|
||||
$postarray["id"] = $item;
|
||||
|
||||
logger('twitter_fetchhometimeline: User ' . $self["nick"] . ' posted home timeline item ' . $item);
|
||||
|
@ -1826,7 +1827,7 @@ function twitter_fetchhometimeline(App $a, $uid)
|
|||
continue;
|
||||
}
|
||||
|
||||
$item = item_store($postarray);
|
||||
$item = Item::insert($postarray);
|
||||
$postarray["id"] = $item;
|
||||
|
||||
if ($item && function_exists("check_item_notification")) {
|
||||
|
@ -1861,7 +1862,7 @@ function twitter_fetchhometimeline(App $a, $uid)
|
|||
'to_email' => $u[0]['email'],
|
||||
'uid' => $u[0]['uid'],
|
||||
'item' => $postarray,
|
||||
'link' => $a->get_baseurl() . '/display/' . urlencode(get_item_guid($item)),
|
||||
'link' => $a->get_baseurl() . '/display/' . urlencode(Item::getGuidById($item)),
|
||||
'source_name' => $postarray['author-name'],
|
||||
'source_link' => $postarray['author-link'],
|
||||
'source_photo' => $postarray['author-avatar'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue