{"action":"created","comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/comments/25901641","id":25901641,"diff_hunk":"@@ -44,19 +44,19 @@ class BlogEntry extends Page {\n \tstatic $allow_wysiwyg_editing = true;\n \t\n \t/**\n-\t * Overload so that the default date is today.\n+\t * Overload so that the default date is today and the default author is the logged in Member.\n \t */\n \tpublic function populateDefaults(){\n \t\tparent::populateDefaults();\n \t\t\n \t\t$this->setField('Date', date('Y-m-d H:i:s', strtotime('now')));\n+\t\t$this->setField('Author', Member::currentUser() ? Member::currentUser()->getName() : '');","path":"code/BlogEntry.php","position":11,"original_position":11,"commit_id":"6d7a1345c051d236abed9e36df1d21ba4cd099fd","original_commit_id":"6d7a1345c051d236abed9e36df1d21ba4cd099fd","user":{"login":"tractorcow","id":936064,"avatar_url":"https://avatars.githubusercontent.com/u/936064?v=3","gravatar_id":"","url":"https://api.github.com/users/tractorcow","html_url":"https://github.com/tractorcow","followers_url":"https://api.github.com/users/tractorcow/followers","following_url":"https://api.github.com/users/tractorcow/following{/other_user}","gists_url":"https://api.github.com/users/tractorcow/gists{/gist_id}","starred_url":"https://api.github.com/users/tractorcow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tractorcow/subscriptions","organizations_url":"https://api.github.com/users/tractorcow/orgs","repos_url":"https://api.github.com/users/tractorcow/repos","events_url":"https://api.github.com/users/tractorcow/events{/privacy}","received_events_url":"https://api.github.com/users/tractorcow/received_events","type":"User","site_admin":false},"body":"Make sure you call Security::database_is_ready() here before trying to access the current user.","created_at":"2015-03-05T21:09:33Z","updated_at":"2015-03-05T21:09:33Z","html_url":"https://github.com/silverstripe/silverstripe-blog/pull/126#discussion_r25901641","pull_request_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/126","_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/comments/25901641"},"html":{"href":"https://github.com/silverstripe/silverstripe-blog/pull/126#discussion_r25901641"},"pull_request":{"href":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/126"}}},"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/126","id":19341789,"html_url":"https://github.com/silverstripe/silverstripe-blog/pull/126","diff_url":"https://github.com/silverstripe/silverstripe-blog/pull/126.diff","patch_url":"https://github.com/silverstripe/silverstripe-blog/pull/126.patch","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/issues/126","number":126,"state":"open","locked":false,"title":"Add extension hooks to blog entry form","user":{"login":"mlewis-everley","id":687143,"avatar_url":"https://avatars.githubusercontent.com/u/687143?v=3","gravatar_id":"","url":"https://api.github.com/users/mlewis-everley","html_url":"https://github.com/mlewis-everley","followers_url":"https://api.github.com/users/mlewis-everley/followers","following_url":"https://api.github.com/users/mlewis-everley/following{/other_user}","gists_url":"https://api.github.com/users/mlewis-everley/gists{/gist_id}","starred_url":"https://api.github.com/users/mlewis-everley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlewis-everley/subscriptions","organizations_url":"https://api.github.com/users/mlewis-everley/orgs","repos_url":"https://api.github.com/users/mlewis-everley/repos","events_url":"https://api.github.com/users/mlewis-everley/events{/privacy}","received_events_url":"https://api.github.com/users/mlewis-everley/received_events","type":"User","site_admin":false},"body":"If we create more complex blog pages (with fields beyond the fields provided by this module) then we cannot edit this data using the \"BlogEntryForm\".\r\n\r\nAdding extension hooks on both the BlogEntryForm and the postblog methods would allow developers to product more complex forms without having extend BlogHolder (and add additional, possibly unnecessary Model classes to the SiteTree).\r\n\r\nJust a thought :-)\r\n\r\nMo","created_at":"2014-08-05T13:34:51Z","updated_at":"2015-03-05T21:09:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8c7cf7ef0c4ee2ae6790a017122013344f78334","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/126/commits","review_comments_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/126/comments","review_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/issues/126/comments","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/statuses/6d7a1345c051d236abed9e36df1d21ba4cd099fd","head":{"label":"mlewis-everley:mle-blogentryform","ref":"mle-blogentryform","sha":"6d7a1345c051d236abed9e36df1d21ba4cd099fd","user":{"login":"mlewis-everley","id":687143,"avatar_url":"https://avatars.githubusercontent.com/u/687143?v=3","gravatar_id":"","url":"https://api.github.com/users/mlewis-everley","html_url":"https://github.com/mlewis-everley","followers_url":"https://api.github.com/users/mlewis-everley/followers","following_url":"https://api.github.com/users/mlewis-everley/following{/other_user}","gists_url":"https://api.github.com/users/mlewis-everley/gists{/gist_id}","starred_url":"https://api.github.com/users/mlewis-everley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlewis-everley/subscriptions","organizations_url":"https://api.github.com/users/mlewis-everley/orgs","repos_url":"https://api.github.com/users/mlewis-everley/repos","events_url":"https://api.github.com/users/mlewis-everley/events{/privacy}","received_events_url":"https://api.github.com/users/mlewis-everley/received_events","type":"User","site_admin":false},"repo":{"id":1630601,"name":"silverstripe-blog","full_name":"mlewis-everley/silverstripe-blog","owner":{"login":"mlewis-everley","id":687143,"avatar_url":"https://avatars.githubusercontent.com/u/687143?v=3","gravatar_id":"","url":"https://api.github.com/users/mlewis-everley","html_url":"https://github.com/mlewis-everley","followers_url":"https://api.github.com/users/mlewis-everley/followers","following_url":"https://api.github.com/users/mlewis-everley/following{/other_user}","gists_url":"https://api.github.com/users/mlewis-everley/gists{/gist_id}","starred_url":"https://api.github.com/users/mlewis-everley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlewis-everley/subscriptions","organizations_url":"https://api.github.com/users/mlewis-everley/orgs","repos_url":"https://api.github.com/users/mlewis-everley/repos","events_url":"https://api.github.com/users/mlewis-everley/events{/privacy}","received_events_url":"https://api.github.com/users/mlewis-everley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mlewis-everley/silverstripe-blog","description":"Blog module for SilverStripe CMS","fork":true,"url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog","forks_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/forks","keys_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/teams","hooks_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/hooks","issue_events_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/issues/events{/number}","events_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/events","assignees_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/assignees{/user}","branches_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/branches{/branch}","tags_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/tags","blobs_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/statuses/{sha}","languages_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/languages","stargazers_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/stargazers","contributors_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/contributors","subscribers_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/subscribers","subscription_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/subscription","commits_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/contents/{+path}","compare_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/merges","archive_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/downloads","issues_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/issues{/number}","pulls_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/pulls{/number}","milestones_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/milestones{/number}","notifications_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/labels{/name}","releases_url":"https://api.github.com/repos/mlewis-everley/silverstripe-blog/releases{/id}","created_at":"2011-04-18T13:40:28Z","updated_at":"2015-02-27T12:49:49Z","pushed_at":"2015-02-27T15:02:11Z","git_url":"git://github.com/mlewis-everley/silverstripe-blog.git","ssh_url":"git@github.com:mlewis-everley/silverstripe-blog.git","clone_url":"https://github.com/mlewis-everley/silverstripe-blog.git","svn_url":"https://github.com/mlewis-everley/silverstripe-blog","homepage":"http://silverstripe.org/blog-module","size":1095,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"silverstripe:master","ref":"master","sha":"d64b418ff134777ae9d8356ff0a28b2456bddfb8","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":1236910,"name":"silverstripe-blog","full_name":"silverstripe/silverstripe-blog","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-blog","description":"Blog module for SilverStripe CMS","fork":false,"url":"https://api.github.com/repos/silverstripe/silverstripe-blog","forks_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/forks","keys_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/teams","hooks_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/hooks","issue_events_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/events","assignees_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/tags","blobs_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/languages","stargazers_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/stargazers","contributors_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/contributors","subscribers_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/subscribers","subscription_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/subscription","commits_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/merges","archive_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/downloads","issues_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe/silverstripe-blog/releases{/id}","created_at":"2011-01-10T04:19:54Z","updated_at":"2015-03-05T20:20:52Z","pushed_at":"2015-03-05T20:20:52Z","git_url":"git://github.com/silverstripe/silverstripe-blog.git","ssh_url":"git@github.com:silverstripe/silverstripe-blog.git","clone_url":"https://github.com/silverstripe/silverstripe-blog.git","svn_url":"https://github.com/silverstripe/silverstripe-blog","homepage":"http://silverstripe.org/blog-module","size":1569,"stargazers_count":83,"watchers_count":83,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":32,"forks":85,"open_issues":32,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/126"},"html":{"href":"https://github.com/silverstripe/silverstripe-blog/pull/126"},"issue":{"href":"https://api.github.com/repos/silverstripe/silverstripe-blog/issues/126"},"comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-blog/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silverstripe/silverstripe-blog/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/silverstripe/silverstripe-blog/statuses/6d7a1345c051d236abed9e36df1d21ba4cd099fd"}}}}