{"action":"created","comment":{"url":"https://api.github.com/repos/ppy/osu-web/pulls/comments/75275661","id":75275661,"diff_hunk":"@@ -52,29 +53,55 @@ public function scores($id)\n \n         $beatmap = Beatmap::findOrFail($id);\n         $mode = Request::input('mode', Beatmap::modeStr($beatmap->playmode));\n+        $enabled_mods = Request::input('enabledMods');\n \n         try {\n-            $scores = $beatmap\n+            $query = $beatmap\n                 ->scoresBest($mode)\n                 ->defaultListing()\n                 ->with('user');\n         } catch (\\InvalidArgumentException $ex) {\n             return error_popup($ex->getMessage());\n         }\n \n+        if ($enabled_mods) {\n+            if (!$user->isSupporter()) {\n+                return error_popup(trans('errors.supporter_only'));\n+            }\n+\n+            $query->whereIn('enabled_mods', [$enabled_mods, 0]);","path":"app/Http/Controllers/BeatmapsController.php","position":34,"original_position":34,"commit_id":"503143e62f65cf78aa578ad29ec1c6b71ce6db97","original_commit_id":"503143e62f65cf78aa578ad29ec1c6b71ce6db97","user":{"login":"nanaya","id":276295,"avatar_url":"https://avatars.githubusercontent.com/u/276295?v=3","gravatar_id":"","url":"https://api.github.com/users/nanaya","html_url":"https://github.com/nanaya","followers_url":"https://api.github.com/users/nanaya/followers","following_url":"https://api.github.com/users/nanaya/following{/other_user}","gists_url":"https://api.github.com/users/nanaya/gists{/gist_id}","starred_url":"https://api.github.com/users/nanaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nanaya/subscriptions","organizations_url":"https://api.github.com/users/nanaya/orgs","repos_url":"https://api.github.com/users/nanaya/repos","events_url":"https://api.github.com/users/nanaya/events{/privacy}","received_events_url":"https://api.github.com/users/nanaya/received_events","type":"User","site_admin":false},"body":"wouldn't the result then includes both with and without mods?","created_at":"2016-08-18T09:27:43Z","updated_at":"2016-08-18T09:27:43Z","html_url":"https://github.com/ppy/osu-web/pull/683#discussion_r75275661","pull_request_url":"https://api.github.com/repos/ppy/osu-web/pulls/683","_links":{"self":{"href":"https://api.github.com/repos/ppy/osu-web/pulls/comments/75275661"},"html":{"href":"https://github.com/ppy/osu-web/pull/683#discussion_r75275661"},"pull_request":{"href":"https://api.github.com/repos/ppy/osu-web/pulls/683"}}},"pull_request":{"url":"https://api.github.com/repos/ppy/osu-web/pulls/683","id":80597863,"html_url":"https://github.com/ppy/osu-web/pull/683","diff_url":"https://github.com/ppy/osu-web/pull/683.diff","patch_url":"https://github.com/ppy/osu-web/pull/683.patch","issue_url":"https://api.github.com/repos/ppy/osu-web/issues/683","number":683,"state":"open","locked":false,"title":"Beatmap info page redesign","user":{"login":"LiquidPL","id":991831,"avatar_url":"https://avatars.githubusercontent.com/u/991831?v=3","gravatar_id":"","url":"https://api.github.com/users/LiquidPL","html_url":"https://github.com/LiquidPL","followers_url":"https://api.github.com/users/LiquidPL/followers","following_url":"https://api.github.com/users/LiquidPL/following{/other_user}","gists_url":"https://api.github.com/users/LiquidPL/gists{/gist_id}","starred_url":"https://api.github.com/users/LiquidPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiquidPL/subscriptions","organizations_url":"https://api.github.com/users/LiquidPL/orgs","repos_url":"https://api.github.com/users/LiquidPL/repos","events_url":"https://api.github.com/users/LiquidPL/events{/privacy}","received_events_url":"https://api.github.com/users/LiquidPL/received_events","type":"User","site_admin":false},"body":"Resolves #559.\r\n\r\nReact/CS ready for review, only thing left to do is mod filtering.\r\n\r\nAlso I recall talking with nanaya about handling the converts and how he'll escalate this to @arflyte. Anything on that?","created_at":"2016-08-09T10:38:21Z","updated_at":"2016-08-18T09:27:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8039b6bf688d0ccfbb22743c3a6244b80348049b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ppy/osu-web/pulls/683/commits","review_comments_url":"https://api.github.com/repos/ppy/osu-web/pulls/683/comments","review_comment_url":"https://api.github.com/repos/ppy/osu-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ppy/osu-web/issues/683/comments","statuses_url":"https://api.github.com/repos/ppy/osu-web/statuses/503143e62f65cf78aa578ad29ec1c6b71ce6db97","head":{"label":"LiquidPL:beatmapsets-part-deux","ref":"beatmapsets-part-deux","sha":"503143e62f65cf78aa578ad29ec1c6b71ce6db97","user":{"login":"LiquidPL","id":991831,"avatar_url":"https://avatars.githubusercontent.com/u/991831?v=3","gravatar_id":"","url":"https://api.github.com/users/LiquidPL","html_url":"https://github.com/LiquidPL","followers_url":"https://api.github.com/users/LiquidPL/followers","following_url":"https://api.github.com/users/LiquidPL/following{/other_user}","gists_url":"https://api.github.com/users/LiquidPL/gists{/gist_id}","starred_url":"https://api.github.com/users/LiquidPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiquidPL/subscriptions","organizations_url":"https://api.github.com/users/LiquidPL/orgs","repos_url":"https://api.github.com/users/LiquidPL/repos","events_url":"https://api.github.com/users/LiquidPL/events{/privacy}","received_events_url":"https://api.github.com/users/LiquidPL/received_events","type":"User","site_admin":false},"repo":{"id":43460292,"name":"osu-web","full_name":"LiquidPL/osu-web","owner":{"login":"LiquidPL","id":991831,"avatar_url":"https://avatars.githubusercontent.com/u/991831?v=3","gravatar_id":"","url":"https://api.github.com/users/LiquidPL","html_url":"https://github.com/LiquidPL","followers_url":"https://api.github.com/users/LiquidPL/followers","following_url":"https://api.github.com/users/LiquidPL/following{/other_user}","gists_url":"https://api.github.com/users/LiquidPL/gists{/gist_id}","starred_url":"https://api.github.com/users/LiquidPL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiquidPL/subscriptions","organizations_url":"https://api.github.com/users/LiquidPL/orgs","repos_url":"https://api.github.com/users/LiquidPL/repos","events_url":"https://api.github.com/users/LiquidPL/events{/privacy}","received_events_url":"https://api.github.com/users/LiquidPL/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LiquidPL/osu-web","description":"the future face of osu!","fork":true,"url":"https://api.github.com/repos/LiquidPL/osu-web","forks_url":"https://api.github.com/repos/LiquidPL/osu-web/forks","keys_url":"https://api.github.com/repos/LiquidPL/osu-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LiquidPL/osu-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LiquidPL/osu-web/teams","hooks_url":"https://api.github.com/repos/LiquidPL/osu-web/hooks","issue_events_url":"https://api.github.com/repos/LiquidPL/osu-web/issues/events{/number}","events_url":"https://api.github.com/repos/LiquidPL/osu-web/events","assignees_url":"https://api.github.com/repos/LiquidPL/osu-web/assignees{/user}","branches_url":"https://api.github.com/repos/LiquidPL/osu-web/branches{/branch}","tags_url":"https://api.github.com/repos/LiquidPL/osu-web/tags","blobs_url":"https://api.github.com/repos/LiquidPL/osu-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LiquidPL/osu-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LiquidPL/osu-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/LiquidPL/osu-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LiquidPL/osu-web/statuses/{sha}","languages_url":"https://api.github.com/repos/LiquidPL/osu-web/languages","stargazers_url":"https://api.github.com/repos/LiquidPL/osu-web/stargazers","contributors_url":"https://api.github.com/repos/LiquidPL/osu-web/contributors","subscribers_url":"https://api.github.com/repos/LiquidPL/osu-web/subscribers","subscription_url":"https://api.github.com/repos/LiquidPL/osu-web/subscription","commits_url":"https://api.github.com/repos/LiquidPL/osu-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/LiquidPL/osu-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/LiquidPL/osu-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/LiquidPL/osu-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/LiquidPL/osu-web/contents/{+path}","compare_url":"https://api.github.com/repos/LiquidPL/osu-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LiquidPL/osu-web/merges","archive_url":"https://api.github.com/repos/LiquidPL/osu-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LiquidPL/osu-web/downloads","issues_url":"https://api.github.com/repos/LiquidPL/osu-web/issues{/number}","pulls_url":"https://api.github.com/repos/LiquidPL/osu-web/pulls{/number}","milestones_url":"https://api.github.com/repos/LiquidPL/osu-web/milestones{/number}","notifications_url":"https://api.github.com/repos/LiquidPL/osu-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LiquidPL/osu-web/labels{/name}","releases_url":"https://api.github.com/repos/LiquidPL/osu-web/releases{/id}","deployments_url":"https://api.github.com/repos/LiquidPL/osu-web/deployments","created_at":"2015-09-30T21:28:53Z","updated_at":"2016-04-16T17:37:57Z","pushed_at":"2016-08-14T08:05:11Z","git_url":"git://github.com/LiquidPL/osu-web.git","ssh_url":"git@github.com:LiquidPL/osu-web.git","clone_url":"https://github.com/LiquidPL/osu-web.git","svn_url":"https://github.com/LiquidPL/osu-web","homepage":null,"size":26720,"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":"master"}},"base":{"label":"ppy:master","ref":"master","sha":"4c85a202a8e356004c67ce1c3bfcc3ae5b356149","user":{"login":"ppy","id":995763,"avatar_url":"https://avatars.githubusercontent.com/u/995763?v=3","gravatar_id":"","url":"https://api.github.com/users/ppy","html_url":"https://github.com/ppy","followers_url":"https://api.github.com/users/ppy/followers","following_url":"https://api.github.com/users/ppy/following{/other_user}","gists_url":"https://api.github.com/users/ppy/gists{/gist_id}","starred_url":"https://api.github.com/users/ppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppy/subscriptions","organizations_url":"https://api.github.com/users/ppy/orgs","repos_url":"https://api.github.com/users/ppy/repos","events_url":"https://api.github.com/users/ppy/events{/privacy}","received_events_url":"https://api.github.com/users/ppy/received_events","type":"Organization","site_admin":false},"repo":{"id":41410580,"name":"osu-web","full_name":"ppy/osu-web","owner":{"login":"ppy","id":995763,"avatar_url":"https://avatars.githubusercontent.com/u/995763?v=3","gravatar_id":"","url":"https://api.github.com/users/ppy","html_url":"https://github.com/ppy","followers_url":"https://api.github.com/users/ppy/followers","following_url":"https://api.github.com/users/ppy/following{/other_user}","gists_url":"https://api.github.com/users/ppy/gists{/gist_id}","starred_url":"https://api.github.com/users/ppy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppy/subscriptions","organizations_url":"https://api.github.com/users/ppy/orgs","repos_url":"https://api.github.com/users/ppy/repos","events_url":"https://api.github.com/users/ppy/events{/privacy}","received_events_url":"https://api.github.com/users/ppy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ppy/osu-web","description":"the future face of osu!","fork":false,"url":"https://api.github.com/repos/ppy/osu-web","forks_url":"https://api.github.com/repos/ppy/osu-web/forks","keys_url":"https://api.github.com/repos/ppy/osu-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ppy/osu-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ppy/osu-web/teams","hooks_url":"https://api.github.com/repos/ppy/osu-web/hooks","issue_events_url":"https://api.github.com/repos/ppy/osu-web/issues/events{/number}","events_url":"https://api.github.com/repos/ppy/osu-web/events","assignees_url":"https://api.github.com/repos/ppy/osu-web/assignees{/user}","branches_url":"https://api.github.com/repos/ppy/osu-web/branches{/branch}","tags_url":"https://api.github.com/repos/ppy/osu-web/tags","blobs_url":"https://api.github.com/repos/ppy/osu-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ppy/osu-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ppy/osu-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/ppy/osu-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ppy/osu-web/statuses/{sha}","languages_url":"https://api.github.com/repos/ppy/osu-web/languages","stargazers_url":"https://api.github.com/repos/ppy/osu-web/stargazers","contributors_url":"https://api.github.com/repos/ppy/osu-web/contributors","subscribers_url":"https://api.github.com/repos/ppy/osu-web/subscribers","subscription_url":"https://api.github.com/repos/ppy/osu-web/subscription","commits_url":"https://api.github.com/repos/ppy/osu-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/ppy/osu-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/ppy/osu-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/ppy/osu-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/ppy/osu-web/contents/{+path}","compare_url":"https://api.github.com/repos/ppy/osu-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ppy/osu-web/merges","archive_url":"https://api.github.com/repos/ppy/osu-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ppy/osu-web/downloads","issues_url":"https://api.github.com/repos/ppy/osu-web/issues{/number}","pulls_url":"https://api.github.com/repos/ppy/osu-web/pulls{/number}","milestones_url":"https://api.github.com/repos/ppy/osu-web/milestones{/number}","notifications_url":"https://api.github.com/repos/ppy/osu-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ppy/osu-web/labels{/name}","releases_url":"https://api.github.com/repos/ppy/osu-web/releases{/id}","deployments_url":"https://api.github.com/repos/ppy/osu-web/deployments","created_at":"2015-08-26T07:14:32Z","updated_at":"2016-08-18T03:03:39Z","pushed_at":"2016-08-18T08:56:00Z","git_url":"git://github.com/ppy/osu-web.git","ssh_url":"git@github.com:ppy/osu-web.git","clone_url":"https://github.com/ppy/osu-web.git","svn_url":"https://github.com/ppy/osu-web","homepage":null,"size":28323,"stargazers_count":207,"watchers_count":207,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":87,"mirror_url":null,"open_issues_count":89,"forks":87,"open_issues":89,"watchers":207,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ppy/osu-web/pulls/683"},"html":{"href":"https://github.com/ppy/osu-web/pull/683"},"issue":{"href":"https://api.github.com/repos/ppy/osu-web/issues/683"},"comments":{"href":"https://api.github.com/repos/ppy/osu-web/issues/683/comments"},"review_comments":{"href":"https://api.github.com/repos/ppy/osu-web/pulls/683/comments"},"review_comment":{"href":"https://api.github.com/repos/ppy/osu-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ppy/osu-web/pulls/683/commits"},"statuses":{"href":"https://api.github.com/repos/ppy/osu-web/statuses/503143e62f65cf78aa578ad29ec1c6b71ce6db97"}}}}
{"actor":{"display_login":"nanaya"}}