Remove type parameter from api_get_last_status function prototype
This commit is contained in:
parent
e60e7a56ac
commit
ab7ec357cb
|
@ -953,9 +953,9 @@ function api_account_verify_credentials($type)
|
||||||
|
|
||||||
// - Adding last status
|
// - Adding last status
|
||||||
if (!$skip_status) {
|
if (!$skip_status) {
|
||||||
$last_status = api_get_last_status($user_info['pid'], $user_info['uid'], $type);
|
$item = api_get_last_status($user_info['pid'], $user_info['uid']);
|
||||||
if ($last_status) {
|
if ($item) {
|
||||||
$user_info['status'] = $last_status;
|
$user_info['status'] = api_format_item($item, $type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1265,11 +1265,10 @@ function api_status_show($type, $item_id)
|
||||||
*
|
*
|
||||||
* @param int $ownerId Public contact Id
|
* @param int $ownerId Public contact Id
|
||||||
* @param int $uid User Id
|
* @param int $uid User Id
|
||||||
* @param string $type Return format (atom, rss, xml, json)
|
|
||||||
* @return array
|
* @return array
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
function api_get_last_status($ownerId, $uid, $type = 'json')
|
function api_get_last_status($ownerId, $uid)
|
||||||
{
|
{
|
||||||
$condition = [
|
$condition = [
|
||||||
'owner-id' => $ownerId,
|
'owner-id' => $ownerId,
|
||||||
|
@ -1280,9 +1279,7 @@ function api_get_last_status($ownerId, $uid, $type = 'json')
|
||||||
|
|
||||||
$item = api_get_item($condition);
|
$item = api_get_item($condition);
|
||||||
|
|
||||||
$status_info = api_format_item($item, $type);
|
return $item;
|
||||||
|
|
||||||
return $status_info;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1317,9 +1314,9 @@ function api_users_show($type)
|
||||||
|
|
||||||
$user_info = api_get_user($a);
|
$user_info = api_get_user($a);
|
||||||
|
|
||||||
$lastStatus = api_get_last_status($user_info['pid'], $user_info['uid'], $type);
|
$item = api_get_last_status($user_info['pid'], $user_info['uid']);
|
||||||
if ($lastStatus) {
|
if ($item) {
|
||||||
$user_info['status'] = $lastStatus;
|
$user_info['status'] = api_format_item($item, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
// "uid" and "self" are only needed for some internal stuff, so remove it from here
|
// "uid" and "self" are only needed for some internal stuff, so remove it from here
|
||||||
|
|
Loading…
Reference in a new issue