{"action":"created","comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/comments/80047450","id":80047450,"diff_hunk":"@@ -2713,6 +2713,26 @@ public function getPageLevel() {\n \t}\n \n \t/**\n+\t * @return string\n+\t */\n+\tpublic function getControllerName() {\n+\t\tif ($this->class === SiteTree::class) {\n+\t\t\t$controller = ContentController::class;\n+\t\t} else {\n+\t\t\t$ancestry = ClassInfo::ancestry($this->class);\n+\t\t\twhile ($class = array_pop($ancestry)) {\n+\t\t\t\tif (class_exists($class . \"_Controller\")) {\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\t$controller = ($class !== null) ? \"{$class}_Controller\" : ContentController::class;","path":"code/Model/SiteTree.php","position":17,"original_position":17,"commit_id":"62816e1ff8cb2e8307859853fbc1a26a7e6470e8","original_commit_id":"62816e1ff8cb2e8307859853fbc1a26a7e6470e8","user":{"login":"kinglozzer","id":1655548,"avatar_url":"https://avatars.githubusercontent.com/u/1655548?v=3","gravatar_id":"","url":"https://api.github.com/users/kinglozzer","html_url":"https://github.com/kinglozzer","followers_url":"https://api.github.com/users/kinglozzer/followers","following_url":"https://api.github.com/users/kinglozzer/following{/other_user}","gists_url":"https://api.github.com/users/kinglozzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kinglozzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinglozzer/subscriptions","organizations_url":"https://api.github.com/users/kinglozzer/orgs","repos_url":"https://api.github.com/users/kinglozzer/repos","events_url":"https://api.github.com/users/kinglozzer/events{/privacy}","received_events_url":"https://api.github.com/users/kinglozzer/received_events","type":"User","site_admin":false},"body":"No reason, I just copied and pasted this block of code 😝","created_at":"2016-09-22T14:05:30Z","updated_at":"2016-09-22T14:05:31Z","html_url":"https://github.com/silverstripe/silverstripe-cms/pull/1605#discussion_r80047450","pull_request_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/1605","_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/comments/80047450"},"html":{"href":"https://github.com/silverstripe/silverstripe-cms/pull/1605#discussion_r80047450"},"pull_request":{"href":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/1605"}}},"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/1605","id":84506289,"html_url":"https://github.com/silverstripe/silverstripe-cms/pull/1605","diff_url":"https://github.com/silverstripe/silverstripe-cms/pull/1605.diff","patch_url":"https://github.com/silverstripe/silverstripe-cms/pull/1605.patch","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/issues/1605","number":1605,"state":"open","locked":false,"title":"Virtualpage refactor","user":{"login":"kinglozzer","id":1655548,"avatar_url":"https://avatars.githubusercontent.com/u/1655548?v=3","gravatar_id":"","url":"https://api.github.com/users/kinglozzer","html_url":"https://github.com/kinglozzer","followers_url":"https://api.github.com/users/kinglozzer/followers","following_url":"https://api.github.com/users/kinglozzer/following{/other_user}","gists_url":"https://api.github.com/users/kinglozzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kinglozzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinglozzer/subscriptions","organizations_url":"https://api.github.com/users/kinglozzer/orgs","repos_url":"https://api.github.com/users/kinglozzer/repos","events_url":"https://api.github.com/users/kinglozzer/events{/privacy}","received_events_url":"https://api.github.com/users/kinglozzer/received_events","type":"User","site_admin":false},"body":"Opening this early for review, probably needs more test coverage before being merged. I also need to write a patch for subsites, as that includes a class that extends `VirtualPage_Controller` (which I’ve deleted).\r\n\r\nFixes:\r\n\r\n- https://github.com/silverstripe/silverstripe-cms/issues/1336\r\n- https://github.com/silverstripe/silverstripe-cms/issues/1386\r\n- https://github.com/silverstripe/silverstripe-cms/issues/1101","created_at":"2016-09-08T16:02:02Z","updated_at":"2016-09-22T14:05:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87c6b6ae311cdb4c324d6766d39434a7a0de2637","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/1605/commits","review_comments_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/1605/comments","review_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/issues/1605/comments","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/statuses/62816e1ff8cb2e8307859853fbc1a26a7e6470e8","head":{"label":"kinglozzer:virtualpage-refactor","ref":"virtualpage-refactor","sha":"62816e1ff8cb2e8307859853fbc1a26a7e6470e8","user":{"login":"kinglozzer","id":1655548,"avatar_url":"https://avatars.githubusercontent.com/u/1655548?v=3","gravatar_id":"","url":"https://api.github.com/users/kinglozzer","html_url":"https://github.com/kinglozzer","followers_url":"https://api.github.com/users/kinglozzer/followers","following_url":"https://api.github.com/users/kinglozzer/following{/other_user}","gists_url":"https://api.github.com/users/kinglozzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kinglozzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinglozzer/subscriptions","organizations_url":"https://api.github.com/users/kinglozzer/orgs","repos_url":"https://api.github.com/users/kinglozzer/repos","events_url":"https://api.github.com/users/kinglozzer/events{/privacy}","received_events_url":"https://api.github.com/users/kinglozzer/received_events","type":"User","site_admin":false},"repo":{"id":9241346,"name":"silverstripe-cms","full_name":"kinglozzer/silverstripe-cms","owner":{"login":"kinglozzer","id":1655548,"avatar_url":"https://avatars.githubusercontent.com/u/1655548?v=3","gravatar_id":"","url":"https://api.github.com/users/kinglozzer","html_url":"https://github.com/kinglozzer","followers_url":"https://api.github.com/users/kinglozzer/followers","following_url":"https://api.github.com/users/kinglozzer/following{/other_user}","gists_url":"https://api.github.com/users/kinglozzer/gists{/gist_id}","starred_url":"https://api.github.com/users/kinglozzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinglozzer/subscriptions","organizations_url":"https://api.github.com/users/kinglozzer/orgs","repos_url":"https://api.github.com/users/kinglozzer/repos","events_url":"https://api.github.com/users/kinglozzer/events{/privacy}","received_events_url":"https://api.github.com/users/kinglozzer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kinglozzer/silverstripe-cms","description":"SilverStripe CMS - this is a module for Sapphire rather than a standalone app. Use https://github.com/silverstripe/silverstripe-installer/ to set this up.","fork":true,"url":"https://api.github.com/repos/kinglozzer/silverstripe-cms","forks_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/forks","keys_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/teams","hooks_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/hooks","issue_events_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/issues/events{/number}","events_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/events","assignees_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/assignees{/user}","branches_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/branches{/branch}","tags_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/tags","blobs_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/languages","stargazers_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/stargazers","contributors_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/contributors","subscribers_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/subscribers","subscription_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/subscription","commits_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/contents/{+path}","compare_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/merges","archive_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/downloads","issues_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/issues{/number}","pulls_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/labels{/name}","releases_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/releases{/id}","deployments_url":"https://api.github.com/repos/kinglozzer/silverstripe-cms/deployments","created_at":"2013-04-05T13:04:38Z","updated_at":"2015-04-02T10:44:20Z","pushed_at":"2016-09-22T13:37:59Z","git_url":"git://github.com/kinglozzer/silverstripe-cms.git","ssh_url":"git@github.com:kinglozzer/silverstripe-cms.git","clone_url":"https://github.com/kinglozzer/silverstripe-cms.git","svn_url":"https://github.com/kinglozzer/silverstripe-cms","homepage":"http://silverstripe.org/","size":13374,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"silverstripe:master","ref":"master","sha":"c46a6c3e9b24ca8be6089869bd0f22ea37618a6e","user":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"repo":{"id":1319183,"name":"silverstripe-cms","full_name":"silverstripe/silverstripe-cms","owner":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silverstripe/silverstripe-cms","description":"SilverStripe CMS - this is a module for SilverStripe Framework rather than a standalone app. Use https://github.com/silverstripe/silverstripe-installer/ to set this up.","fork":false,"url":"https://api.github.com/repos/silverstripe/silverstripe-cms","forks_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/forks","keys_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/teams","hooks_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/hooks","issue_events_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/events","assignees_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/tags","blobs_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/languages","stargazers_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/stargazers","contributors_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/contributors","subscribers_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/subscribers","subscription_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/subscription","commits_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/merges","archive_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/downloads","issues_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/releases{/id}","deployments_url":"https://api.github.com/repos/silverstripe/silverstripe-cms/deployments","created_at":"2011-02-02T04:01:36Z","updated_at":"2016-09-19T22:52:12Z","pushed_at":"2016-09-22T13:38:00Z","git_url":"git://github.com/silverstripe/silverstripe-cms.git","ssh_url":"git@github.com:silverstripe/silverstripe-cms.git","clone_url":"https://github.com/silverstripe/silverstripe-cms.git","svn_url":"https://github.com/silverstripe/silverstripe-cms","homepage":"http://silverstripe.org/","size":20120,"stargazers_count":399,"watchers_count":399,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":283,"mirror_url":null,"open_issues_count":304,"forks":283,"open_issues":304,"watchers":399,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/1605"},"html":{"href":"https://github.com/silverstripe/silverstripe-cms/pull/1605"},"issue":{"href":"https://api.github.com/repos/silverstripe/silverstripe-cms/issues/1605"},"comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-cms/issues/1605/comments"},"review_comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/1605/comments"},"review_comment":{"href":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silverstripe/silverstripe-cms/pulls/1605/commits"},"statuses":{"href":"https://api.github.com/repos/silverstripe/silverstripe-cms/statuses/62816e1ff8cb2e8307859853fbc1a26a7e6470e8"}}}}
{"actor":{"display_login":"kinglozzer"}}