Merge pull request #11070 from annando/api-array-reverse
Fix: array_reverse returns the reversed content as return value
This commit is contained in:
commit
43b32abe46
23 changed files with 23 additions and 23 deletions
|
@ -81,7 +81,7 @@ class Followers extends BaseApi
|
||||||
DBA::close($followers);
|
DBA::close($followers);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($accounts);
|
$accounts = array_reverse($accounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -81,7 +81,7 @@ class Following extends BaseApi
|
||||||
DBA::close($followers);
|
DBA::close($followers);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($accounts);
|
$accounts = array_reverse($accounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -113,7 +113,7 @@ class Statuses extends BaseApi
|
||||||
DBA::close($items);
|
DBA::close($items);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($statuses);
|
$statuses = array_reverse($statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -81,7 +81,7 @@ class Blocks extends BaseApi
|
||||||
DBA::close($followers);
|
DBA::close($followers);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($accounts);
|
$accounts = array_reverse($accounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -77,7 +77,7 @@ class Bookmarks extends BaseApi
|
||||||
DBA::close($items);
|
DBA::close($items);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($statuses);
|
$statuses = array_reverse($statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -91,7 +91,7 @@ class Conversations extends BaseApi
|
||||||
DBA::close($convs);
|
DBA::close($convs);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($conversations);
|
$conversations = array_reverse($conversations);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -73,7 +73,7 @@ class Favourited extends BaseApi
|
||||||
DBA::close($items);
|
DBA::close($items);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($statuses);
|
$statuses = array_reverse($statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -100,7 +100,7 @@ class Accounts extends BaseApi
|
||||||
DBA::close($members);
|
DBA::close($members);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($accounts);
|
$accounts = array_reverse($accounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -81,7 +81,7 @@ class Mutes extends BaseApi
|
||||||
DBA::close($followers);
|
DBA::close($followers);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($accounts);
|
$accounts = array_reverse($accounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -105,7 +105,7 @@ class ScheduledStatuses extends BaseApi
|
||||||
DBA::close($posts);
|
DBA::close($posts);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($statuses);
|
$statuses = array_reverse($statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -167,7 +167,7 @@ class Search extends BaseApi
|
||||||
DBA::close($items);
|
DBA::close($items);
|
||||||
|
|
||||||
if (!empty($min_id)) {
|
if (!empty($min_id)) {
|
||||||
array_reverse($statuses);
|
$statuses = array_reverse($statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -75,7 +75,7 @@ class Direct extends BaseApi
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($statuses);
|
$statuses = array_reverse($statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -98,7 +98,7 @@ class Home extends BaseApi
|
||||||
DBA::close($items);
|
DBA::close($items);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($statuses);
|
$statuses = array_reverse($statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -103,7 +103,7 @@ class ListTimeline extends BaseApi
|
||||||
DBA::close($items);
|
DBA::close($items);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($statuses);
|
$statuses = array_reverse($statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -109,7 +109,7 @@ class PublicTimeline extends BaseApi
|
||||||
DBA::close($items);
|
DBA::close($items);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($statuses);
|
$statuses = array_reverse($statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -112,7 +112,7 @@ class Tag extends BaseApi
|
||||||
DBA::close($items);
|
DBA::close($items);
|
||||||
|
|
||||||
if (!empty($request['min_id'])) {
|
if (!empty($request['min_id'])) {
|
||||||
array_reverse($statuses);
|
$statuses = array_reverse($statuses);
|
||||||
}
|
}
|
||||||
|
|
||||||
self::setLinkHeader();
|
self::setLinkHeader();
|
||||||
|
|
|
@ -79,7 +79,7 @@ class Ids extends ContactEndpoint
|
||||||
DBA::close($contacts);
|
DBA::close($contacts);
|
||||||
|
|
||||||
if (!empty($min_id)) {
|
if (!empty($min_id)) {
|
||||||
array_reverse($ids);
|
$ids = array_reverse($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids);
|
$return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids);
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Lists extends ContactEndpoint
|
||||||
DBA::close($contacts);
|
DBA::close($contacts);
|
||||||
|
|
||||||
if (!empty($min_id)) {
|
if (!empty($min_id)) {
|
||||||
array_reverse($ids);
|
$ids = array_reverse($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities);
|
$return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities);
|
||||||
|
|
|
@ -84,7 +84,7 @@ class Ids extends ContactEndpoint
|
||||||
DBA::close($followers);
|
DBA::close($followers);
|
||||||
|
|
||||||
if (!empty($min_id)) {
|
if (!empty($min_id)) {
|
||||||
array_reverse($ids);
|
$ids = array_reverse($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids);
|
$return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids);
|
||||||
|
|
|
@ -85,7 +85,7 @@ class Lists extends ContactEndpoint
|
||||||
DBA::close($followers);
|
DBA::close($followers);
|
||||||
|
|
||||||
if (!empty($min_id)) {
|
if (!empty($min_id)) {
|
||||||
array_reverse($ids);
|
$ids = array_reverse($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities);
|
$return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities);
|
||||||
|
|
|
@ -84,7 +84,7 @@ class Ids extends ContactEndpoint
|
||||||
DBA::close($followers);
|
DBA::close($followers);
|
||||||
|
|
||||||
if (!empty($min_id)) {
|
if (!empty($min_id)) {
|
||||||
array_reverse($ids);
|
$ids = array_reverse($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids);
|
$return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids);
|
||||||
|
|
|
@ -85,7 +85,7 @@ class Lists extends ContactEndpoint
|
||||||
DBA::close($followers);
|
DBA::close($followers);
|
||||||
|
|
||||||
if (!empty($min_id)) {
|
if (!empty($min_id)) {
|
||||||
array_reverse($ids);
|
$ids = array_reverse($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities);
|
$return = self::list($ids, $total_count, $uid, $cursor, $count, $skip_status, $include_user_entities);
|
||||||
|
|
|
@ -79,7 +79,7 @@ class Incoming extends ContactEndpoint
|
||||||
DBA::close($contacts);
|
DBA::close($contacts);
|
||||||
|
|
||||||
if (!empty($min_id)) {
|
if (!empty($min_id)) {
|
||||||
array_reverse($ids);
|
$ids = array_reverse($ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
$return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids);
|
$return = self::ids($ids, $total_count, $cursor, $count, $stringify_ids);
|
||||||
|
|
Loading…
Reference in a new issue