{"action":"created","comment":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments/40600908","id":40600908,"diff_hunk":"@@ -388,6 +388,10 @@ function restful_get_restful_handler_for_path($path = NULL) {\n   list($major_version, $minor_version) = \\RestfulBase::getVersionFromRequest($path);\n \n   $handlers[$path] = restful_get_restful_handler($resource, $major_version, $minor_version);\n+  // Make sure we have a fresh request.\n+  $request = restful_parse_request();","path":"restful.module","position":5,"original_position":5,"commit_id":"910bdc5d419dbe0fcf20f49b47f637d12721c93e","original_commit_id":"910bdc5d419dbe0fcf20f49b47f637d12721c93e","user":{"login":"pcambra","id":104912,"avatar_url":"https://avatars.githubusercontent.com/u/104912?v=3","gravatar_id":"","url":"https://api.github.com/users/pcambra","html_url":"https://github.com/pcambra","followers_url":"https://api.github.com/users/pcambra/followers","following_url":"https://api.github.com/users/pcambra/following{/other_user}","gists_url":"https://api.github.com/users/pcambra/gists{/gist_id}","starred_url":"https://api.github.com/users/pcambra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcambra/subscriptions","organizations_url":"https://api.github.com/users/pcambra/orgs","repos_url":"https://api.github.com/users/pcambra/repos","events_url":"https://api.github.com/users/pcambra/events{/privacy}","received_events_url":"https://api.github.com/users/pcambra/received_events","type":"User","site_admin":false},"body":"Because the request comes cached and without filters at the point of calculating the count of results, I'll try to demonstrate it in a test ","created_at":"2015-09-28T20:26:31Z","updated_at":"2015-09-28T20:26:31Z","html_url":"https://github.com/RESTful-Drupal/restful/pull/661#discussion_r40600908","pull_request_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/661","_links":{"self":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments/40600908"},"html":{"href":"https://github.com/RESTful-Drupal/restful/pull/661#discussion_r40600908"},"pull_request":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/661"}}},"pull_request":{"url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/661","id":46195793,"html_url":"https://github.com/RESTful-Drupal/restful/pull/661","diff_url":"https://github.com/RESTful-Drupal/restful/pull/661.diff","patch_url":"https://github.com/RESTful-Drupal/restful/pull/661.patch","issue_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/661","number":661,"state":"open","locked":false,"title":"Fixed request and count calculation for HATEOAS ‘next’ pager","user":{"login":"pcambra","id":104912,"avatar_url":"https://avatars.githubusercontent.com/u/104912?v=3","gravatar_id":"","url":"https://api.github.com/users/pcambra","html_url":"https://github.com/pcambra","followers_url":"https://api.github.com/users/pcambra/followers","following_url":"https://api.github.com/users/pcambra/following{/other_user}","gists_url":"https://api.github.com/users/pcambra/gists{/gist_id}","starred_url":"https://api.github.com/users/pcambra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcambra/subscriptions","organizations_url":"https://api.github.com/users/pcambra/orgs","repos_url":"https://api.github.com/users/pcambra/repos","events_url":"https://api.github.com/users/pcambra/events{/privacy}","received_events_url":"https://api.github.com/users/pcambra/received_events","type":"User","site_admin":false},"body":"When listing nodes, the count and next pager is not calculated correctly when a filter is present, this PR fixes the request refresh and also takes care of unpublished content not being added to the final count.\r\n\r\nTest is pending","created_at":"2015-09-28T19:13:21Z","updated_at":"2015-09-28T20:26:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"901d8627292577470852b9a5f2f783b192fc1f5e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/661/commits","review_comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/661/comments","review_comment_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/661/comments","statuses_url":"https://api.github.com/repos/RESTful-Drupal/restful/statuses/910bdc5d419dbe0fcf20f49b47f637d12721c93e","head":{"label":"pcambra:fix_hateoas_pager","ref":"fix_hateoas_pager","sha":"910bdc5d419dbe0fcf20f49b47f637d12721c93e","user":{"login":"pcambra","id":104912,"avatar_url":"https://avatars.githubusercontent.com/u/104912?v=3","gravatar_id":"","url":"https://api.github.com/users/pcambra","html_url":"https://github.com/pcambra","followers_url":"https://api.github.com/users/pcambra/followers","following_url":"https://api.github.com/users/pcambra/following{/other_user}","gists_url":"https://api.github.com/users/pcambra/gists{/gist_id}","starred_url":"https://api.github.com/users/pcambra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcambra/subscriptions","organizations_url":"https://api.github.com/users/pcambra/orgs","repos_url":"https://api.github.com/users/pcambra/repos","events_url":"https://api.github.com/users/pcambra/events{/privacy}","received_events_url":"https://api.github.com/users/pcambra/received_events","type":"User","site_admin":false},"repo":{"id":43319791,"name":"restful","full_name":"pcambra/restful","owner":{"login":"pcambra","id":104912,"avatar_url":"https://avatars.githubusercontent.com/u/104912?v=3","gravatar_id":"","url":"https://api.github.com/users/pcambra","html_url":"https://github.com/pcambra","followers_url":"https://api.github.com/users/pcambra/followers","following_url":"https://api.github.com/users/pcambra/following{/other_user}","gists_url":"https://api.github.com/users/pcambra/gists{/gist_id}","starred_url":"https://api.github.com/users/pcambra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcambra/subscriptions","organizations_url":"https://api.github.com/users/pcambra/orgs","repos_url":"https://api.github.com/users/pcambra/repos","events_url":"https://api.github.com/users/pcambra/events{/privacy}","received_events_url":"https://api.github.com/users/pcambra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pcambra/restful","description":"RESTful best practices for Drupal","fork":true,"url":"https://api.github.com/repos/pcambra/restful","forks_url":"https://api.github.com/repos/pcambra/restful/forks","keys_url":"https://api.github.com/repos/pcambra/restful/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcambra/restful/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcambra/restful/teams","hooks_url":"https://api.github.com/repos/pcambra/restful/hooks","issue_events_url":"https://api.github.com/repos/pcambra/restful/issues/events{/number}","events_url":"https://api.github.com/repos/pcambra/restful/events","assignees_url":"https://api.github.com/repos/pcambra/restful/assignees{/user}","branches_url":"https://api.github.com/repos/pcambra/restful/branches{/branch}","tags_url":"https://api.github.com/repos/pcambra/restful/tags","blobs_url":"https://api.github.com/repos/pcambra/restful/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcambra/restful/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcambra/restful/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcambra/restful/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcambra/restful/statuses/{sha}","languages_url":"https://api.github.com/repos/pcambra/restful/languages","stargazers_url":"https://api.github.com/repos/pcambra/restful/stargazers","contributors_url":"https://api.github.com/repos/pcambra/restful/contributors","subscribers_url":"https://api.github.com/repos/pcambra/restful/subscribers","subscription_url":"https://api.github.com/repos/pcambra/restful/subscription","commits_url":"https://api.github.com/repos/pcambra/restful/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcambra/restful/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcambra/restful/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcambra/restful/issues/comments{/number}","contents_url":"https://api.github.com/repos/pcambra/restful/contents/{+path}","compare_url":"https://api.github.com/repos/pcambra/restful/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcambra/restful/merges","archive_url":"https://api.github.com/repos/pcambra/restful/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcambra/restful/downloads","issues_url":"https://api.github.com/repos/pcambra/restful/issues{/number}","pulls_url":"https://api.github.com/repos/pcambra/restful/pulls{/number}","milestones_url":"https://api.github.com/repos/pcambra/restful/milestones{/number}","notifications_url":"https://api.github.com/repos/pcambra/restful/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcambra/restful/labels{/name}","releases_url":"https://api.github.com/repos/pcambra/restful/releases{/id}","created_at":"2015-09-28T18:43:45Z","updated_at":"2015-09-28T18:43:46Z","pushed_at":"2015-09-28T19:11:07Z","git_url":"git://github.com/pcambra/restful.git","ssh_url":"git@github.com:pcambra/restful.git","clone_url":"https://github.com/pcambra/restful.git","svn_url":"https://github.com/pcambra/restful","homepage":"https://drupal.org/project/restful","size":7995,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"7.x-1.x"}},"base":{"label":"RESTful-Drupal:7.x-1.x","ref":"7.x-1.x","sha":"a61051f00b1f7ef6ca32cf7693142f3433792093","user":{"login":"RESTful-Drupal","id":10175793,"avatar_url":"https://avatars.githubusercontent.com/u/10175793?v=3","gravatar_id":"","url":"https://api.github.com/users/RESTful-Drupal","html_url":"https://github.com/RESTful-Drupal","followers_url":"https://api.github.com/users/RESTful-Drupal/followers","following_url":"https://api.github.com/users/RESTful-Drupal/following{/other_user}","gists_url":"https://api.github.com/users/RESTful-Drupal/gists{/gist_id}","starred_url":"https://api.github.com/users/RESTful-Drupal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RESTful-Drupal/subscriptions","organizations_url":"https://api.github.com/users/RESTful-Drupal/orgs","repos_url":"https://api.github.com/users/RESTful-Drupal/repos","events_url":"https://api.github.com/users/RESTful-Drupal/events{/privacy}","received_events_url":"https://api.github.com/users/RESTful-Drupal/received_events","type":"Organization","site_admin":false},"repo":{"id":17918315,"name":"restful","full_name":"RESTful-Drupal/restful","owner":{"login":"RESTful-Drupal","id":10175793,"avatar_url":"https://avatars.githubusercontent.com/u/10175793?v=3","gravatar_id":"","url":"https://api.github.com/users/RESTful-Drupal","html_url":"https://github.com/RESTful-Drupal","followers_url":"https://api.github.com/users/RESTful-Drupal/followers","following_url":"https://api.github.com/users/RESTful-Drupal/following{/other_user}","gists_url":"https://api.github.com/users/RESTful-Drupal/gists{/gist_id}","starred_url":"https://api.github.com/users/RESTful-Drupal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RESTful-Drupal/subscriptions","organizations_url":"https://api.github.com/users/RESTful-Drupal/orgs","repos_url":"https://api.github.com/users/RESTful-Drupal/repos","events_url":"https://api.github.com/users/RESTful-Drupal/events{/privacy}","received_events_url":"https://api.github.com/users/RESTful-Drupal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RESTful-Drupal/restful","description":"RESTful best practices for Drupal","fork":false,"url":"https://api.github.com/repos/RESTful-Drupal/restful","forks_url":"https://api.github.com/repos/RESTful-Drupal/restful/forks","keys_url":"https://api.github.com/repos/RESTful-Drupal/restful/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RESTful-Drupal/restful/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RESTful-Drupal/restful/teams","hooks_url":"https://api.github.com/repos/RESTful-Drupal/restful/hooks","issue_events_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/events{/number}","events_url":"https://api.github.com/repos/RESTful-Drupal/restful/events","assignees_url":"https://api.github.com/repos/RESTful-Drupal/restful/assignees{/user}","branches_url":"https://api.github.com/repos/RESTful-Drupal/restful/branches{/branch}","tags_url":"https://api.github.com/repos/RESTful-Drupal/restful/tags","blobs_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/refs{/sha}","trees_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RESTful-Drupal/restful/statuses/{sha}","languages_url":"https://api.github.com/repos/RESTful-Drupal/restful/languages","stargazers_url":"https://api.github.com/repos/RESTful-Drupal/restful/stargazers","contributors_url":"https://api.github.com/repos/RESTful-Drupal/restful/contributors","subscribers_url":"https://api.github.com/repos/RESTful-Drupal/restful/subscribers","subscription_url":"https://api.github.com/repos/RESTful-Drupal/restful/subscription","commits_url":"https://api.github.com/repos/RESTful-Drupal/restful/commits{/sha}","git_commits_url":"https://api.github.com/repos/RESTful-Drupal/restful/git/commits{/sha}","comments_url":"https://api.github.com/repos/RESTful-Drupal/restful/comments{/number}","issue_comment_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues/comments{/number}","contents_url":"https://api.github.com/repos/RESTful-Drupal/restful/contents/{+path}","compare_url":"https://api.github.com/repos/RESTful-Drupal/restful/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RESTful-Drupal/restful/merges","archive_url":"https://api.github.com/repos/RESTful-Drupal/restful/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RESTful-Drupal/restful/downloads","issues_url":"https://api.github.com/repos/RESTful-Drupal/restful/issues{/number}","pulls_url":"https://api.github.com/repos/RESTful-Drupal/restful/pulls{/number}","milestones_url":"https://api.github.com/repos/RESTful-Drupal/restful/milestones{/number}","notifications_url":"https://api.github.com/repos/RESTful-Drupal/restful/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RESTful-Drupal/restful/labels{/name}","releases_url":"https://api.github.com/repos/RESTful-Drupal/restful/releases{/id}","created_at":"2014-03-19T19:58:55Z","updated_at":"2015-09-24T03:06:27Z","pushed_at":"2015-09-28T20:04:06Z","git_url":"git://github.com/RESTful-Drupal/restful.git","ssh_url":"git@github.com:RESTful-Drupal/restful.git","clone_url":"https://github.com/RESTful-Drupal/restful.git","svn_url":"https://github.com/RESTful-Drupal/restful","homepage":"https://drupal.org/project/restful","size":7995,"stargazers_count":272,"watchers_count":272,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":82,"mirror_url":null,"open_issues_count":124,"forks":82,"open_issues":124,"watchers":272,"default_branch":"7.x-1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/661"},"html":{"href":"https://github.com/RESTful-Drupal/restful/pull/661"},"issue":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/issues/661"},"comments":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/issues/661/comments"},"review_comments":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/661/comments"},"review_comment":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/pulls/661/commits"},"statuses":{"href":"https://api.github.com/repos/RESTful-Drupal/restful/statuses/910bdc5d419dbe0fcf20f49b47f637d12721c93e"}}}}