GitHub PullRequestReviewCommentEvent at 2014-07-02 15:12:50
Repository: core
Actor: butonic
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/owncloud/core/pulls/comments/14462530","id":14462530,"diff_hunk":"@@ -72,6 +73,7 @@ public static function register($method, $url, $action, $app,\n \t\t\t\t->requirements($requirements)\n \t\t\t\t->action('OC_API', 'call');\n \t\t\tself::$actions[$name] = array();\n+\t\t\tOC::$server->getRouter()->useCollection($oldCollection);","path":"lib/private/api.php","position":12,"original_position":12,"commit_id":"5a588333b236519aed449a309be818d0686edb3a","original_commit_id":"5a588333b236519aed449a309be818d0686edb3a","user":{"login":"butonic","id":956847,"avatar_url":"https://avatars.githubusercontent.com/u/956847?","gravatar_id":"9760c134cabf66e10dbba06d7525f5c7","url":"https://api.github.com/users/butonic","html_url":"https://github.com/butonic","followers_url":"https://api.github.com/users/butonic/followers","following_url":"https://api.github.com/users/butonic/following{/other_user}","gists_url":"https://api.github.com/users/butonic/gists{/gist_id}","starred_url":"https://api.github.com/users/butonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/butonic/subscriptions","organizations_url":"https://api.github.com/users/butonic/orgs","repos_url":"https://api.github.com/users/butonic/repos","events_url":"https://api.github.com/users/butonic/events{/privacy}","received_events_url":"https://api.github.com/users/butonic/received_events","type":"User","site_admin":false},"body":"actually, before the route.php is included the collection is set to the collection for the current app: https://github.com/owncloud/core/blob/fix_versions_preview/lib/private/route/router.php#L128\r\n\r\nregistering api routes in routes.php is simply wrong. they should go into api-routes.php or something. This PR at least resets the collection to what it was before setting an API route.","created_at":"2014-07-02T15:12:50Z","updated_at":"2014-07-02T15:12:50Z","html_url":"https://github.com/owncloud/core/pull/9269#discussion_r14462530","pull_request_url":"https://api.github.com/repos/owncloud/core/pulls/9269","_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments/14462530"},"html":{"href":"https://github.com/owncloud/core/pull/9269#discussion_r14462530"},"pull_request":{"href":"https://api.github.com/repos/owncloud/core/pulls/9269"}}},"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/9269","id":17715420,"html_url":"https://github.com/owncloud/core/pull/9269","diff_url":"https://github.com/owncloud/core/pull/9269.diff","patch_url":"https://github.com/owncloud/core/pull/9269.patch","issue_url":"https://api.github.com/repos/owncloud/core/issues/9269","number":9269,"state":"open","title":"change order of registering api and capabilities to fix file version previews","user":{"login":"butonic","id":956847,"avatar_url":"https://avatars.githubusercontent.com/u/956847?","gravatar_id":"9760c134cabf66e10dbba06d7525f5c7","url":"https://api.github.com/users/butonic","html_url":"https://github.com/butonic","followers_url":"https://api.github.com/users/butonic/followers","following_url":"https://api.github.com/users/butonic/following{/other_user}","gists_url":"https://api.github.com/users/butonic/gists{/gist_id}","starred_url":"https://api.github.com/users/butonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/butonic/subscriptions","organizations_url":"https://api.github.com/users/butonic/orgs","repos_url":"https://api.github.com/users/butonic/repos","events_url":"https://api.github.com/users/butonic/events{/privacy}","received_events_url":"https://api.github.com/users/butonic/received_events","type":"User","site_admin":false},"body":"When registering an api call the collection gets set to\r\n```php\r\n\t\t\tOC::$server->getRouter()->useCollection('ocs');\r\n```\r\nMy guess is it does not get reverted so when the next create rout call is executed is goes into the wrong collection. Fixes \r\n\r\n@PVince81 @icewind1991 @schiesbn a quick review please.","created_at":"2014-06-27T17:35:32Z","updated_at":"2014-07-02T15:12:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e48c60fd4aaa992075fc99f453b53c005fd29caa","assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/9","labels_url":"https://api.github.com/repos/owncloud/core/milestones/9/labels","id":696130,"number":9,"title":"ownCloud 7 CE","description":"ownCloud 7 Community Edition","creator":{"login":"craigpg","id":160667,"avatar_url":"https://avatars.githubusercontent.com/u/160667?","gravatar_id":"9185b746eef97fdc0713de3ec7d2e327","url":"https://api.github.com/users/craigpg","html_url":"https://github.com/craigpg","followers_url":"https://api.github.com/users/craigpg/followers","following_url":"https://api.github.com/users/craigpg/following{/other_user}","gists_url":"https://api.github.com/users/craigpg/gists{/gist_id}","starred_url":"https://api.github.com/users/craigpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigpg/subscriptions","organizations_url":"https://api.github.com/users/craigpg/orgs","repos_url":"https://api.github.com/users/craigpg/repos","events_url":"https://api.github.com/users/craigpg/events{/privacy}","received_events_url":"https://api.github.com/users/craigpg/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":92,"state":"open","created_at":"2014-06-19T19:28:47Z","updated_at":"2014-07-02T14:46:28Z","due_on":"2014-07-16T07:00:00Z"},"commits_url":"https://api.github.com/repos/owncloud/core/pulls/9269/commits","review_comments_url":"https://api.github.com/repos/owncloud/core/pulls/9269/comments","review_comment_url":"https://api.github.com/repos/owncloud/core/pulls/comments/{number}","comments_url":"https://api.github.com/repos/owncloud/core/issues/9269/comments","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/5a588333b236519aed449a309be818d0686edb3a","head":{"label":"owncloud:fix_versions_preview","ref":"fix_versions_preview","sha":"5a588333b236519aed449a309be818d0686edb3a","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?","gravatar_id":"021e207e86fe81a7d81c67ef1ff38a0c","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?","gravatar_id":"021e207e86fe81a7d81c67ef1ff38a0c","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":"The ownCloud core","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments/{number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","created_at":"2012-08-25T10:32:48Z","updated_at":"2014-07-02T12:53:15Z","pushed_at":"2014-07-02T14:46:33Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":null,"size":583757,"stargazers_count":2302,"watchers_count":2302,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":748,"mirror_url":null,"open_issues_count":1020,"forks":748,"open_issues":1020,"watchers":2302,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"09dea42f7e610ebe656868f309437d3a8271d9a1","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?","gravatar_id":"021e207e86fe81a7d81c67ef1ff38a0c","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?","gravatar_id":"021e207e86fe81a7d81c67ef1ff38a0c","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/core","description":"The ownCloud core","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments/{number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","created_at":"2012-08-25T10:32:48Z","updated_at":"2014-07-02T12:53:15Z","pushed_at":"2014-07-02T14:46:33Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":null,"size":583757,"stargazers_count":2302,"watchers_count":2302,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":748,"mirror_url":null,"open_issues_count":1020,"forks":748,"open_issues":1020,"watchers":2302,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/9269"},"html":{"href":"https://github.com/owncloud/core/pull/9269"},"issue":{"href":"https://api.github.com/repos/owncloud/core/issues/9269"},"comments":{"href":"https://api.github.com/repos/owncloud/core/issues/9269/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/core/pulls/9269/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/owncloud/core/pulls/9269/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/core/statuses/5a588333b236519aed449a309be818d0686edb3a"}}}}