summaryrefslogtreecommitdiff
path: root/classes/api.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-07-12 17:55:35 +0300
committerAndrew Dolgov <[email protected]>2015-07-12 18:08:02 +0300
commit48fefe2f6b6e625b64b0c6d54e35e3608e70a1bd (patch)
tree19fc05a66c470cb79a5a0775d75e7a28113d1dc3 /classes/api.php
parentec57104d6e221a2a44752d6f68615055eefea1db (diff)
fixes for first_id stuff
Diffstat (limited to 'classes/api.php')
-rw-r--r--classes/api.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/classes/api.php b/classes/api.php
index 648d6ca6e..08c1846d2 100644
--- a/classes/api.php
+++ b/classes/api.php
@@ -205,7 +205,7 @@ class API extends Handler {
$force_update = sql_bool_to_bool($_REQUEST["force_update"]);
$has_sandbox = sql_bool_to_bool($_REQUEST["has_sandbox"]);
$excerpt_length = (int)$this->dbh->escape_string($_REQUEST["excerpt_length"]);
- $check_top_id = (int)$this->dbh->escape_string($_REQUEST["check_top_id"]);
+ $check_first_id = (int)$this->dbh->escape_string($_REQUEST["check_first_id"]);
$include_header = sql_bool_to_bool($_REQUEST["include_header"]);
$_SESSION['hasSandbox'] = $has_sandbox;
@@ -230,7 +230,7 @@ class API extends Handler {
list($headlines, $headlines_header) = $this->api_get_headlines($feed_id, $limit, $offset,
$filter, $is_cat, $show_excerpt, $show_content, $view_mode, $override_order,
$include_attachments, $since_id, $search,
- $include_nested, $sanitize_content, $force_update, $excerpt_length, $check_top_id);
+ $include_nested, $sanitize_content, $force_update, $excerpt_length, $check_first_id);
if ($include_header) {
$this->wrap(self::STATUS_OK, array($headlines_header, $headlines));
@@ -644,7 +644,7 @@ class API extends Handler {
$filter, $is_cat, $show_excerpt, $show_content, $view_mode, $order,
$include_attachments, $since_id,
$search = "", $include_nested = false, $sanitize_content = true,
- $force_update = false, $excerpt_length = 100, $check_top_id = false) {
+ $force_update = false, $excerpt_length = 100, $check_first_id = false) {
if ($force_update && $feed_id > 0 && is_numeric($feed_id)) {
// Update the feed if required with some basic flood control
@@ -686,18 +686,20 @@ class API extends Handler {
"offset" => $offset,
"since_id" => $since_id,
"include_children" => $include_nested,
- "check_top_id" => $check_top_id
+ "check_first_id" => $check_first_id
);
$qfh_ret = queryFeedHeadlines($params);
$result = $qfh_ret[0];
$feed_title = $qfh_ret[1];
+ $first_id = $qfh_ret[6];
$headlines = array();
$headlines_header = array(
'id' => $feed_id,
+ 'first_id' => $first_id,
'is_cat' => $is_cat);
if (!is_numeric($result)) {
@@ -789,7 +791,7 @@ class API extends Handler {
array_push($headlines, $headline_row);
}
} else if (is_numeric($result) && $result == -1) {
- $headlines_header['top_id_changed'] = true;
+ $headlines_header['first_id_changed'] = true;
}
return array($headlines, $headlines_header);