{"action":"created","comment":{"url":"https://api.github.com/repos/kalamuna/playbox/pulls/comments/41090926","id":41090926,"diff_hunk":"@@ -424,3 +438,180 @@ function _get_field($field, $options = array()){\n \treturn $return;\n }\n \n+/**\n+ * Playbox Battle Management form\n+ * Renders the reset button and list of \n+ * existing battles in a form\n+ */ \n+function playbox_battle_management_form($form, &$form_state) {    \n+  // Be extra safe! Only add the reset button if the user can create content\n+  if(user_access('create playbox_battle content')){","path":"sites/all/modules/playbox_admin/playbox_admin.module","position":45,"original_position":45,"commit_id":"e64d181e70efd936343894108527e14e9777e8c4","original_commit_id":"e64d181e70efd936343894108527e14e9777e8c4","user":{"login":"RobLoach","id":25086,"avatar_url":"https://avatars.githubusercontent.com/u/25086?v=3","gravatar_id":"","url":"https://api.github.com/users/RobLoach","html_url":"https://github.com/RobLoach","followers_url":"https://api.github.com/users/RobLoach/followers","following_url":"https://api.github.com/users/RobLoach/following{/other_user}","gists_url":"https://api.github.com/users/RobLoach/gists{/gist_id}","starred_url":"https://api.github.com/users/RobLoach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobLoach/subscriptions","organizations_url":"https://api.github.com/users/RobLoach/orgs","repos_url":"https://api.github.com/users/RobLoach/repos","events_url":"https://api.github.com/users/RobLoach/events{/privacy}","received_events_url":"https://api.github.com/users/RobLoach/received_events","type":"User","site_admin":false},"body":"Rather than checking `user_access`, and injecting form api elements, taking advantage of [`#access`](https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7#access), will save you from having to check if manually.","created_at":"2015-10-03T19:45:57Z","updated_at":"2015-10-03T19:45:57Z","html_url":"https://github.com/kalamuna/playbox/pull/120#discussion_r41090926","pull_request_url":"https://api.github.com/repos/kalamuna/playbox/pulls/120","_links":{"self":{"href":"https://api.github.com/repos/kalamuna/playbox/pulls/comments/41090926"},"html":{"href":"https://github.com/kalamuna/playbox/pull/120#discussion_r41090926"},"pull_request":{"href":"https://api.github.com/repos/kalamuna/playbox/pulls/120"}}},"pull_request":{"url":"https://api.github.com/repos/kalamuna/playbox/pulls/120","id":46710292,"html_url":"https://github.com/kalamuna/playbox/pull/120","diff_url":"https://github.com/kalamuna/playbox/pull/120.diff","patch_url":"https://github.com/kalamuna/playbox/pull/120.patch","issue_url":"https://api.github.com/repos/kalamuna/playbox/issues/120","number":120,"state":"open","locked":false,"title":"51 reset random","user":{"login":"pirog","id":713424,"avatar_url":"https://avatars.githubusercontent.com/u/713424?v=3","gravatar_id":"","url":"https://api.github.com/users/pirog","html_url":"https://github.com/pirog","followers_url":"https://api.github.com/users/pirog/followers","following_url":"https://api.github.com/users/pirog/following{/other_user}","gists_url":"https://api.github.com/users/pirog/gists{/gist_id}","starred_url":"https://api.github.com/users/pirog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pirog/subscriptions","organizations_url":"https://api.github.com/users/pirog/orgs","repos_url":"https://api.github.com/users/pirog/repos","events_url":"https://api.github.com/users/pirog/events{/privacy}","received_events_url":"https://api.github.com/users/pirog/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-03T18:17:38Z","updated_at":"2015-10-03T19:45:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08362ea25d72a2363429926287bcf29f12df32cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kalamuna/playbox/pulls/120/commits","review_comments_url":"https://api.github.com/repos/kalamuna/playbox/pulls/120/comments","review_comment_url":"https://api.github.com/repos/kalamuna/playbox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kalamuna/playbox/issues/120/comments","statuses_url":"https://api.github.com/repos/kalamuna/playbox/statuses/e64d181e70efd936343894108527e14e9777e8c4","head":{"label":"oneorangecat:51-reset-random","ref":"51-reset-random","sha":"e64d181e70efd936343894108527e14e9777e8c4","user":{"login":"oneorangecat","id":14300216,"avatar_url":"https://avatars.githubusercontent.com/u/14300216?v=3","gravatar_id":"","url":"https://api.github.com/users/oneorangecat","html_url":"https://github.com/oneorangecat","followers_url":"https://api.github.com/users/oneorangecat/followers","following_url":"https://api.github.com/users/oneorangecat/following{/other_user}","gists_url":"https://api.github.com/users/oneorangecat/gists{/gist_id}","starred_url":"https://api.github.com/users/oneorangecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oneorangecat/subscriptions","organizations_url":"https://api.github.com/users/oneorangecat/orgs","repos_url":"https://api.github.com/users/oneorangecat/repos","events_url":"https://api.github.com/users/oneorangecat/events{/privacy}","received_events_url":"https://api.github.com/users/oneorangecat/received_events","type":"User","site_admin":false},"repo":{"id":42686303,"name":"playbox","full_name":"oneorangecat/playbox","owner":{"login":"oneorangecat","id":14300216,"avatar_url":"https://avatars.githubusercontent.com/u/14300216?v=3","gravatar_id":"","url":"https://api.github.com/users/oneorangecat","html_url":"https://github.com/oneorangecat","followers_url":"https://api.github.com/users/oneorangecat/followers","following_url":"https://api.github.com/users/oneorangecat/following{/other_user}","gists_url":"https://api.github.com/users/oneorangecat/gists{/gist_id}","starred_url":"https://api.github.com/users/oneorangecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oneorangecat/subscriptions","organizations_url":"https://api.github.com/users/oneorangecat/orgs","repos_url":"https://api.github.com/users/oneorangecat/repos","events_url":"https://api.github.com/users/oneorangecat/events{/privacy}","received_events_url":"https://api.github.com/users/oneorangecat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oneorangecat/playbox","description":"A playground for ambitious would-be code artists.","fork":true,"url":"https://api.github.com/repos/oneorangecat/playbox","forks_url":"https://api.github.com/repos/oneorangecat/playbox/forks","keys_url":"https://api.github.com/repos/oneorangecat/playbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oneorangecat/playbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oneorangecat/playbox/teams","hooks_url":"https://api.github.com/repos/oneorangecat/playbox/hooks","issue_events_url":"https://api.github.com/repos/oneorangecat/playbox/issues/events{/number}","events_url":"https://api.github.com/repos/oneorangecat/playbox/events","assignees_url":"https://api.github.com/repos/oneorangecat/playbox/assignees{/user}","branches_url":"https://api.github.com/repos/oneorangecat/playbox/branches{/branch}","tags_url":"https://api.github.com/repos/oneorangecat/playbox/tags","blobs_url":"https://api.github.com/repos/oneorangecat/playbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oneorangecat/playbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oneorangecat/playbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/oneorangecat/playbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oneorangecat/playbox/statuses/{sha}","languages_url":"https://api.github.com/repos/oneorangecat/playbox/languages","stargazers_url":"https://api.github.com/repos/oneorangecat/playbox/stargazers","contributors_url":"https://api.github.com/repos/oneorangecat/playbox/contributors","subscribers_url":"https://api.github.com/repos/oneorangecat/playbox/subscribers","subscription_url":"https://api.github.com/repos/oneorangecat/playbox/subscription","commits_url":"https://api.github.com/repos/oneorangecat/playbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/oneorangecat/playbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/oneorangecat/playbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/oneorangecat/playbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/oneorangecat/playbox/contents/{+path}","compare_url":"https://api.github.com/repos/oneorangecat/playbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oneorangecat/playbox/merges","archive_url":"https://api.github.com/repos/oneorangecat/playbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oneorangecat/playbox/downloads","issues_url":"https://api.github.com/repos/oneorangecat/playbox/issues{/number}","pulls_url":"https://api.github.com/repos/oneorangecat/playbox/pulls{/number}","milestones_url":"https://api.github.com/repos/oneorangecat/playbox/milestones{/number}","notifications_url":"https://api.github.com/repos/oneorangecat/playbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oneorangecat/playbox/labels{/name}","releases_url":"https://api.github.com/repos/oneorangecat/playbox/releases{/id}","created_at":"2015-09-17T22:55:52Z","updated_at":"2015-09-17T22:56:17Z","pushed_at":"2015-10-02T17:54:50Z","git_url":"git://github.com/oneorangecat/playbox.git","ssh_url":"git@github.com:oneorangecat/playbox.git","clone_url":"https://github.com/oneorangecat/playbox.git","svn_url":"https://github.com/oneorangecat/playbox","homepage":"http://playbox.kalamuna.com","size":62416,"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":"kalamuna:master","ref":"master","sha":"ff869be0a1369860f7db0244f26de629f3eae739","user":{"login":"kalamuna","id":2373705,"avatar_url":"https://avatars.githubusercontent.com/u/2373705?v=3","gravatar_id":"","url":"https://api.github.com/users/kalamuna","html_url":"https://github.com/kalamuna","followers_url":"https://api.github.com/users/kalamuna/followers","following_url":"https://api.github.com/users/kalamuna/following{/other_user}","gists_url":"https://api.github.com/users/kalamuna/gists{/gist_id}","starred_url":"https://api.github.com/users/kalamuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalamuna/subscriptions","organizations_url":"https://api.github.com/users/kalamuna/orgs","repos_url":"https://api.github.com/users/kalamuna/repos","events_url":"https://api.github.com/users/kalamuna/events{/privacy}","received_events_url":"https://api.github.com/users/kalamuna/received_events","type":"Organization","site_admin":false},"repo":{"id":24117989,"name":"playbox","full_name":"kalamuna/playbox","owner":{"login":"kalamuna","id":2373705,"avatar_url":"https://avatars.githubusercontent.com/u/2373705?v=3","gravatar_id":"","url":"https://api.github.com/users/kalamuna","html_url":"https://github.com/kalamuna","followers_url":"https://api.github.com/users/kalamuna/followers","following_url":"https://api.github.com/users/kalamuna/following{/other_user}","gists_url":"https://api.github.com/users/kalamuna/gists{/gist_id}","starred_url":"https://api.github.com/users/kalamuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalamuna/subscriptions","organizations_url":"https://api.github.com/users/kalamuna/orgs","repos_url":"https://api.github.com/users/kalamuna/repos","events_url":"https://api.github.com/users/kalamuna/events{/privacy}","received_events_url":"https://api.github.com/users/kalamuna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kalamuna/playbox","description":"A playground for ambitious would-be code artists.","fork":false,"url":"https://api.github.com/repos/kalamuna/playbox","forks_url":"https://api.github.com/repos/kalamuna/playbox/forks","keys_url":"https://api.github.com/repos/kalamuna/playbox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kalamuna/playbox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kalamuna/playbox/teams","hooks_url":"https://api.github.com/repos/kalamuna/playbox/hooks","issue_events_url":"https://api.github.com/repos/kalamuna/playbox/issues/events{/number}","events_url":"https://api.github.com/repos/kalamuna/playbox/events","assignees_url":"https://api.github.com/repos/kalamuna/playbox/assignees{/user}","branches_url":"https://api.github.com/repos/kalamuna/playbox/branches{/branch}","tags_url":"https://api.github.com/repos/kalamuna/playbox/tags","blobs_url":"https://api.github.com/repos/kalamuna/playbox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kalamuna/playbox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kalamuna/playbox/git/refs{/sha}","trees_url":"https://api.github.com/repos/kalamuna/playbox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kalamuna/playbox/statuses/{sha}","languages_url":"https://api.github.com/repos/kalamuna/playbox/languages","stargazers_url":"https://api.github.com/repos/kalamuna/playbox/stargazers","contributors_url":"https://api.github.com/repos/kalamuna/playbox/contributors","subscribers_url":"https://api.github.com/repos/kalamuna/playbox/subscribers","subscription_url":"https://api.github.com/repos/kalamuna/playbox/subscription","commits_url":"https://api.github.com/repos/kalamuna/playbox/commits{/sha}","git_commits_url":"https://api.github.com/repos/kalamuna/playbox/git/commits{/sha}","comments_url":"https://api.github.com/repos/kalamuna/playbox/comments{/number}","issue_comment_url":"https://api.github.com/repos/kalamuna/playbox/issues/comments{/number}","contents_url":"https://api.github.com/repos/kalamuna/playbox/contents/{+path}","compare_url":"https://api.github.com/repos/kalamuna/playbox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kalamuna/playbox/merges","archive_url":"https://api.github.com/repos/kalamuna/playbox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kalamuna/playbox/downloads","issues_url":"https://api.github.com/repos/kalamuna/playbox/issues{/number}","pulls_url":"https://api.github.com/repos/kalamuna/playbox/pulls{/number}","milestones_url":"https://api.github.com/repos/kalamuna/playbox/milestones{/number}","notifications_url":"https://api.github.com/repos/kalamuna/playbox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kalamuna/playbox/labels{/name}","releases_url":"https://api.github.com/repos/kalamuna/playbox/releases{/id}","created_at":"2014-09-16T21:14:37Z","updated_at":"2015-09-29T03:49:34Z","pushed_at":"2015-10-03T18:17:39Z","git_url":"git://github.com/kalamuna/playbox.git","ssh_url":"git@github.com:kalamuna/playbox.git","clone_url":"https://github.com/kalamuna/playbox.git","svn_url":"https://github.com/kalamuna/playbox","homepage":"http://playbox.kalamuna.com","size":62964,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":34,"forks":20,"open_issues":34,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kalamuna/playbox/pulls/120"},"html":{"href":"https://github.com/kalamuna/playbox/pull/120"},"issue":{"href":"https://api.github.com/repos/kalamuna/playbox/issues/120"},"comments":{"href":"https://api.github.com/repos/kalamuna/playbox/issues/120/comments"},"review_comments":{"href":"https://api.github.com/repos/kalamuna/playbox/pulls/120/comments"},"review_comment":{"href":"https://api.github.com/repos/kalamuna/playbox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kalamuna/playbox/pulls/120/commits"},"statuses":{"href":"https://api.github.com/repos/kalamuna/playbox/statuses/e64d181e70efd936343894108527e14e9777e8c4"}}}}