{"action":"created","comment":{"url":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/comments/42383876","id":42383876,"diff_hunk":"@@ -0,0 +1,185 @@\n+<?php\n+/**\n+ *\n+ * Ideas extension for the phpBB Forum Software package.\n+ *\n+ * @copyright (c) phpBB Limited <https://www.phpbb.com>\n+ * @license GNU General Public License, version 2 (GPL-2.0)\n+ *\n+ */\n+\n+namespace phpbb\\ideas\\acp;\n+\n+class phpbb_ideas_module\n+{\n+\t/** @var \\phpbb\\config\\config */\n+\tprotected $config;\n+\n+\t/** @var \\phpbb\\db\\driver\\driver_interface */\n+\tprotected $db;\n+\n+\t/** @var \\phpbb\\log\\log */\n+\tprotected $log;\n+\n+\t/** @var \\phpbb\\request\\request */\n+\tprotected $request;\n+\n+\t/** @var \\phpbb\\template\\template */\n+\tprotected $template;\n+\n+\t/** @var \\phpbb\\user */\n+\tprotected $user;\n+\n+\t/** @var string */\n+\tpublic $u_action;\n+\n+\tpublic function main($id, $mode)\n+\t{\n+\t\tglobal $config, $db, $phpbb_log, $request, $template, $user;\n+\n+\t\t$this->config = $config;\n+\t\t$this->db = $db;\n+\t\t$this->log = $phpbb_log;\n+\t\t$this->request = $request;\n+\t\t$this->template = $template;\n+\t\t$this->user = $user;\n+\n+\t\t// Add the board rules ACP lang file\n+\t\t$this->user->add_lang_ext('phpbb/ideas', 'phpbb_ideas_acp');\n+\n+\t\t// Load a template from adm/style for our ACP page\n+\t\t$this->tpl_name = 'acp_phpbb_ideas';\n+\n+\t\t// Set the page title for our ACP page\n+\t\t$this->page_title = 'ACP_PHPBB_IDEAS_SETTINGS';\n+\n+\t\t// Define the name of the form for use as a form key\n+\t\t$form_name = 'acp_phpbb_ideas_settings';\n+\t\tadd_form_key($form_name);\n+\n+\t\t// Set an empty errors array\n+\t\t$errors = array();\n+\n+\t\t$display_vars = array(\n+\t\t\t'ideas_forum_id'\t=> array('lang' => 'ACP_IDEAS_FORUM_ID',\t'validate' => 'string',\t'type' => 'custom', 'method' => 'select_ideas_forum', 'explain' => true),\n+\t\t\t'ideas_poster_id'\t=> array('lang' => 'ACP_IDEAS_POSTER_ID',\t'validate' => 'string',\t'type' => 'custom', 'method' => 'select_ideas_topics_poster', 'explain' => true),\n+\t\t);\n+\n+\t\t$this->new_config = $config;\n+\t\t$cfg_array = ($request->is_set('config')) ? $request->variable('config', array('' => ''), true) : $this->new_config;\n+\t\t$submit = (isset($_POST['submit'])) ? true : false;","path":"acp/phpbb_ideas_module.php","position":70,"original_position":70,"commit_id":"c213c3d6a6dc8c18b510e28150af12f613b2c821","original_commit_id":"c213c3d6a6dc8c18b510e28150af12f613b2c821","user":{"login":"VSEphpbb","id":303711,"avatar_url":"https://avatars.githubusercontent.com/u/303711?v=3","gravatar_id":"","url":"https://api.github.com/users/VSEphpbb","html_url":"https://github.com/VSEphpbb","followers_url":"https://api.github.com/users/VSEphpbb/followers","following_url":"https://api.github.com/users/VSEphpbb/following{/other_user}","gists_url":"https://api.github.com/users/VSEphpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/VSEphpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VSEphpbb/subscriptions","organizations_url":"https://api.github.com/users/VSEphpbb/orgs","repos_url":"https://api.github.com/users/VSEphpbb/repos","events_url":"https://api.github.com/users/VSEphpbb/events{/privacy}","received_events_url":"https://api.github.com/users/VSEphpbb/received_events","type":"User","site_admin":false},"body":"use `$submit = $this->request->is_set('submit');` and since it returns a boolean, don't need the conditional true or false part.","created_at":"2015-10-19T15:19:08Z","updated_at":"2015-10-19T15:19:08Z","html_url":"https://github.com/phpbb/phpbb-ideas/pull/6#discussion_r42383876","pull_request_url":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/comments/42383876"},"html":{"href":"https://github.com/phpbb/phpbb-ideas/pull/6#discussion_r42383876"},"pull_request":{"href":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/6","id":48012606,"html_url":"https://github.com/phpbb/phpbb-ideas/pull/6","diff_url":"https://github.com/phpbb/phpbb-ideas/pull/6.diff","patch_url":"https://github.com/phpbb/phpbb-ideas/pull/6.patch","issue_url":"https://api.github.com/repos/phpbb/phpbb-ideas/issues/6","number":6,"state":"open","locked":false,"title":"Add Ideas ACP module.","user":{"login":"rxu","id":212322,"avatar_url":"https://avatars.githubusercontent.com/u/212322?v=3","gravatar_id":"","url":"https://api.github.com/users/rxu","html_url":"https://github.com/rxu","followers_url":"https://api.github.com/users/rxu/followers","following_url":"https://api.github.com/users/rxu/following{/other_user}","gists_url":"https://api.github.com/users/rxu/gists{/gist_id}","starred_url":"https://api.github.com/users/rxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxu/subscriptions","organizations_url":"https://api.github.com/users/rxu/orgs","repos_url":"https://api.github.com/users/rxu/repos","events_url":"https://api.github.com/users/rxu/events{/privacy}","received_events_url":"https://api.github.com/users/rxu/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-18T17:08:38Z","updated_at":"2015-10-19T15:19:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0f03368d5c657a35e6de4c6a6d198cfcc3abbc9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/6/commits","review_comments_url":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/6/comments","review_comment_url":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpbb/phpbb-ideas/issues/6/comments","statuses_url":"https://api.github.com/repos/phpbb/phpbb-ideas/statuses/c213c3d6a6dc8c18b510e28150af12f613b2c821","head":{"label":"rxu:add-acp-module","ref":"add-acp-module","sha":"c213c3d6a6dc8c18b510e28150af12f613b2c821","user":{"login":"rxu","id":212322,"avatar_url":"https://avatars.githubusercontent.com/u/212322?v=3","gravatar_id":"","url":"https://api.github.com/users/rxu","html_url":"https://github.com/rxu","followers_url":"https://api.github.com/users/rxu/followers","following_url":"https://api.github.com/users/rxu/following{/other_user}","gists_url":"https://api.github.com/users/rxu/gists{/gist_id}","starred_url":"https://api.github.com/users/rxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxu/subscriptions","organizations_url":"https://api.github.com/users/rxu/orgs","repos_url":"https://api.github.com/users/rxu/repos","events_url":"https://api.github.com/users/rxu/events{/privacy}","received_events_url":"https://api.github.com/users/rxu/received_events","type":"User","site_admin":false},"repo":{"id":44487576,"name":"phpbb-ideas","full_name":"rxu/phpbb-ideas","owner":{"login":"rxu","id":212322,"avatar_url":"https://avatars.githubusercontent.com/u/212322?v=3","gravatar_id":"","url":"https://api.github.com/users/rxu","html_url":"https://github.com/rxu","followers_url":"https://api.github.com/users/rxu/followers","following_url":"https://api.github.com/users/rxu/following{/other_user}","gists_url":"https://api.github.com/users/rxu/gists{/gist_id}","starred_url":"https://api.github.com/users/rxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxu/subscriptions","organizations_url":"https://api.github.com/users/rxu/orgs","repos_url":"https://api.github.com/users/rxu/repos","events_url":"https://api.github.com/users/rxu/events{/privacy}","received_events_url":"https://api.github.com/users/rxu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rxu/phpbb-ideas","description":"An idea center for phpBB/phpBB.com (based on WordPress idea center).","fork":true,"url":"https://api.github.com/repos/rxu/phpbb-ideas","forks_url":"https://api.github.com/repos/rxu/phpbb-ideas/forks","keys_url":"https://api.github.com/repos/rxu/phpbb-ideas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rxu/phpbb-ideas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rxu/phpbb-ideas/teams","hooks_url":"https://api.github.com/repos/rxu/phpbb-ideas/hooks","issue_events_url":"https://api.github.com/repos/rxu/phpbb-ideas/issues/events{/number}","events_url":"https://api.github.com/repos/rxu/phpbb-ideas/events","assignees_url":"https://api.github.com/repos/rxu/phpbb-ideas/assignees{/user}","branches_url":"https://api.github.com/repos/rxu/phpbb-ideas/branches{/branch}","tags_url":"https://api.github.com/repos/rxu/phpbb-ideas/tags","blobs_url":"https://api.github.com/repos/rxu/phpbb-ideas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rxu/phpbb-ideas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rxu/phpbb-ideas/git/refs{/sha}","trees_url":"https://api.github.com/repos/rxu/phpbb-ideas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rxu/phpbb-ideas/statuses/{sha}","languages_url":"https://api.github.com/repos/rxu/phpbb-ideas/languages","stargazers_url":"https://api.github.com/repos/rxu/phpbb-ideas/stargazers","contributors_url":"https://api.github.com/repos/rxu/phpbb-ideas/contributors","subscribers_url":"https://api.github.com/repos/rxu/phpbb-ideas/subscribers","subscription_url":"https://api.github.com/repos/rxu/phpbb-ideas/subscription","commits_url":"https://api.github.com/repos/rxu/phpbb-ideas/commits{/sha}","git_commits_url":"https://api.github.com/repos/rxu/phpbb-ideas/git/commits{/sha}","comments_url":"https://api.github.com/repos/rxu/phpbb-ideas/comments{/number}","issue_comment_url":"https://api.github.com/repos/rxu/phpbb-ideas/issues/comments{/number}","contents_url":"https://api.github.com/repos/rxu/phpbb-ideas/contents/{+path}","compare_url":"https://api.github.com/repos/rxu/phpbb-ideas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rxu/phpbb-ideas/merges","archive_url":"https://api.github.com/repos/rxu/phpbb-ideas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rxu/phpbb-ideas/downloads","issues_url":"https://api.github.com/repos/rxu/phpbb-ideas/issues{/number}","pulls_url":"https://api.github.com/repos/rxu/phpbb-ideas/pulls{/number}","milestones_url":"https://api.github.com/repos/rxu/phpbb-ideas/milestones{/number}","notifications_url":"https://api.github.com/repos/rxu/phpbb-ideas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rxu/phpbb-ideas/labels{/name}","releases_url":"https://api.github.com/repos/rxu/phpbb-ideas/releases{/id}","created_at":"2015-10-18T17:06:25Z","updated_at":"2015-10-18T17:06:26Z","pushed_at":"2015-10-19T14:54:43Z","git_url":"git://github.com/rxu/phpbb-ideas.git","ssh_url":"git@github.com:rxu/phpbb-ideas.git","clone_url":"https://github.com/rxu/phpbb-ideas.git","svn_url":"https://github.com/rxu/phpbb-ideas","homepage":null,"size":780,"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":"31x"}},"base":{"label":"phpbb:31x","ref":"31x","sha":"ff7840fd2973a9525cff66fe2405a11800db6e2b","user":{"login":"phpbb","id":176697,"avatar_url":"https://avatars.githubusercontent.com/u/176697?v=3","gravatar_id":"","url":"https://api.github.com/users/phpbb","html_url":"https://github.com/phpbb","followers_url":"https://api.github.com/users/phpbb/followers","following_url":"https://api.github.com/users/phpbb/following{/other_user}","gists_url":"https://api.github.com/users/phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpbb/subscriptions","organizations_url":"https://api.github.com/users/phpbb/orgs","repos_url":"https://api.github.com/users/phpbb/repos","events_url":"https://api.github.com/users/phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/phpbb/received_events","type":"Organization","site_admin":false},"repo":{"id":11393427,"name":"phpbb-ideas","full_name":"phpbb/phpbb-ideas","owner":{"login":"phpbb","id":176697,"avatar_url":"https://avatars.githubusercontent.com/u/176697?v=3","gravatar_id":"","url":"https://api.github.com/users/phpbb","html_url":"https://github.com/phpbb","followers_url":"https://api.github.com/users/phpbb/followers","following_url":"https://api.github.com/users/phpbb/following{/other_user}","gists_url":"https://api.github.com/users/phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpbb/subscriptions","organizations_url":"https://api.github.com/users/phpbb/orgs","repos_url":"https://api.github.com/users/phpbb/repos","events_url":"https://api.github.com/users/phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/phpbb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpbb/phpbb-ideas","description":"An idea center for phpBB/phpBB.com (based on WordPress idea center).","fork":false,"url":"https://api.github.com/repos/phpbb/phpbb-ideas","forks_url":"https://api.github.com/repos/phpbb/phpbb-ideas/forks","keys_url":"https://api.github.com/repos/phpbb/phpbb-ideas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpbb/phpbb-ideas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpbb/phpbb-ideas/teams","hooks_url":"https://api.github.com/repos/phpbb/phpbb-ideas/hooks","issue_events_url":"https://api.github.com/repos/phpbb/phpbb-ideas/issues/events{/number}","events_url":"https://api.github.com/repos/phpbb/phpbb-ideas/events","assignees_url":"https://api.github.com/repos/phpbb/phpbb-ideas/assignees{/user}","branches_url":"https://api.github.com/repos/phpbb/phpbb-ideas/branches{/branch}","tags_url":"https://api.github.com/repos/phpbb/phpbb-ideas/tags","blobs_url":"https://api.github.com/repos/phpbb/phpbb-ideas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpbb/phpbb-ideas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpbb/phpbb-ideas/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpbb/phpbb-ideas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpbb/phpbb-ideas/statuses/{sha}","languages_url":"https://api.github.com/repos/phpbb/phpbb-ideas/languages","stargazers_url":"https://api.github.com/repos/phpbb/phpbb-ideas/stargazers","contributors_url":"https://api.github.com/repos/phpbb/phpbb-ideas/contributors","subscribers_url":"https://api.github.com/repos/phpbb/phpbb-ideas/subscribers","subscription_url":"https://api.github.com/repos/phpbb/phpbb-ideas/subscription","commits_url":"https://api.github.com/repos/phpbb/phpbb-ideas/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpbb/phpbb-ideas/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpbb/phpbb-ideas/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpbb/phpbb-ideas/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpbb/phpbb-ideas/contents/{+path}","compare_url":"https://api.github.com/repos/phpbb/phpbb-ideas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpbb/phpbb-ideas/merges","archive_url":"https://api.github.com/repos/phpbb/phpbb-ideas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpbb/phpbb-ideas/downloads","issues_url":"https://api.github.com/repos/phpbb/phpbb-ideas/issues{/number}","pulls_url":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls{/number}","milestones_url":"https://api.github.com/repos/phpbb/phpbb-ideas/milestones{/number}","notifications_url":"https://api.github.com/repos/phpbb/phpbb-ideas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpbb/phpbb-ideas/labels{/name}","releases_url":"https://api.github.com/repos/phpbb/phpbb-ideas/releases{/id}","created_at":"2013-07-13T19:59:47Z","updated_at":"2014-09-22T13:20:43Z","pushed_at":"2015-10-19T14:54:43Z","git_url":"git://github.com/phpbb/phpbb-ideas.git","ssh_url":"git@github.com:phpbb/phpbb-ideas.git","clone_url":"https://github.com/phpbb/phpbb-ideas.git","svn_url":"https://github.com/phpbb/phpbb-ideas","homepage":null,"size":1081,"stargazers_count":9,"watchers_count":9,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":9,"default_branch":"31x"}},"_links":{"self":{"href":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/6"},"html":{"href":"https://github.com/phpbb/phpbb-ideas/pull/6"},"issue":{"href":"https://api.github.com/repos/phpbb/phpbb-ideas/issues/6"},"comments":{"href":"https://api.github.com/repos/phpbb/phpbb-ideas/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpbb/phpbb-ideas/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/phpbb/phpbb-ideas/statuses/c213c3d6a6dc8c18b510e28150af12f613b2c821"}}}}