{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/comments/23932778","id":23932778,"diff_hunk":"@@ -0,0 +1,92 @@\n+<?php\n+namespace Langchecker;\n+\n+use \\Bugzilla\\Bugzilla;\n+\n+$htmloutput = '<p id=\"back\"><a href=\"http://l10n.mozilla-community.org/webdashboard/\">Back to Web Dashboard</a></p>';\n+\n+// This view works only for mozilla.org (website ID 0)\n+$current_website = $sites[0];\n+$current_locale = $locale;\n+\n+if (! Project::isSupportedLocale($current_website, $current_locale)) {\n+    $htmloutput .= \"<p>This locale is not supported on mozilla.org</p>\";\n+    echo $htmloutput;\n+    exit;\n+}\n+\n+// Create a list of opt-in pages\n+$optin_pages = [];\n+foreach (Project::getWebsiteFiles($current_website) as $current_filename) {\n+    if (in_array('opt-in', Project::getFileFlags($current_website, $current_filename, $current_locale))) {\n+        $optin_pages[$current_filename] = Project::getSupportedLocales($current_website, $current_filename, $langfiles_subsets);\n+    }\n+}\n+\n+if (count($optin_pages) == 0) {\n+    $htmloutput .= \"<p>There are no optional pages available at the moment.</p>\";\n+    echo $htmloutput;\n+    exit;","path":"views/optin.inc.php","position":29,"original_position":29,"commit_id":"792ed832d20db7cc565e76f4eb3b4378ef44b3b9","original_commit_id":"792ed832d20db7cc565e76f4eb3b4378ef44b3b9","user":{"login":"pascalchevrel","id":454375,"avatar_url":"https://avatars.githubusercontent.com/u/454375?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalchevrel","html_url":"https://github.com/pascalchevrel","followers_url":"https://api.github.com/users/pascalchevrel/followers","following_url":"https://api.github.com/users/pascalchevrel/following{/other_user}","gists_url":"https://api.github.com/users/pascalchevrel/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalchevrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalchevrel/subscriptions","organizations_url":"https://api.github.com/users/pascalchevrel/orgs","repos_url":"https://api.github.com/users/pascalchevrel/repos","events_url":"https://api.github.com/users/pascalchevrel/events{/privacy}","received_events_url":"https://api.github.com/users/pascalchevrel/received_events","type":"User","site_admin":false},"body":"same comment as line #15","created_at":"2015-02-02T15:48:11Z","updated_at":"2015-02-02T15:48:11Z","html_url":"https://github.com/mozilla-l10n/langchecker/pull/273#discussion_r23932778","pull_request_url":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/273","_links":{"self":{"href":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/comments/23932778"},"html":{"href":"https://github.com/mozilla-l10n/langchecker/pull/273#discussion_r23932778"},"pull_request":{"href":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/273"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/273","id":28463158,"html_url":"https://github.com/mozilla-l10n/langchecker/pull/273","diff_url":"https://github.com/mozilla-l10n/langchecker/pull/273.diff","patch_url":"https://github.com/mozilla-l10n/langchecker/pull/273.patch","issue_url":"https://api.github.com/repos/mozilla-l10n/langchecker/issues/273","number":273,"state":"open","locked":false,"title":"Create a view to display opt-in pages for a locale","user":{"login":"flodolo","id":3644868,"avatar_url":"https://avatars.githubusercontent.com/u/3644868?v=3","gravatar_id":"","url":"https://api.github.com/users/flodolo","html_url":"https://github.com/flodolo","followers_url":"https://api.github.com/users/flodolo/followers","following_url":"https://api.github.com/users/flodolo/following{/other_user}","gists_url":"https://api.github.com/users/flodolo/gists{/gist_id}","starred_url":"https://api.github.com/users/flodolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flodolo/subscriptions","organizations_url":"https://api.github.com/users/flodolo/orgs","repos_url":"https://api.github.com/users/flodolo/repos","events_url":"https://api.github.com/users/flodolo/events{/privacy}","received_events_url":"https://api.github.com/users/flodolo/received_events","type":"User","site_admin":false},"body":"Opt-in status is determined by a `opt-in` flag associated with the file.","created_at":"2015-02-02T12:05:01Z","updated_at":"2015-02-02T15:48:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e867043e4eb2e2fb4190c5a8671cee4bad968b4c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/273/commits","review_comments_url":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/273/comments","review_comment_url":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-l10n/langchecker/issues/273/comments","statuses_url":"https://api.github.com/repos/mozilla-l10n/langchecker/statuses/792ed832d20db7cc565e76f4eb3b4378ef44b3b9","head":{"label":"flodolo:optin_pages","ref":"optin_pages","sha":"792ed832d20db7cc565e76f4eb3b4378ef44b3b9","user":{"login":"flodolo","id":3644868,"avatar_url":"https://avatars.githubusercontent.com/u/3644868?v=3","gravatar_id":"","url":"https://api.github.com/users/flodolo","html_url":"https://github.com/flodolo","followers_url":"https://api.github.com/users/flodolo/followers","following_url":"https://api.github.com/users/flodolo/following{/other_user}","gists_url":"https://api.github.com/users/flodolo/gists{/gist_id}","starred_url":"https://api.github.com/users/flodolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flodolo/subscriptions","organizations_url":"https://api.github.com/users/flodolo/orgs","repos_url":"https://api.github.com/users/flodolo/repos","events_url":"https://api.github.com/users/flodolo/events{/privacy}","received_events_url":"https://api.github.com/users/flodolo/received_events","type":"User","site_admin":false},"repo":{"id":21729759,"name":"langchecker","full_name":"flodolo/langchecker","owner":{"login":"flodolo","id":3644868,"avatar_url":"https://avatars.githubusercontent.com/u/3644868?v=3","gravatar_id":"","url":"https://api.github.com/users/flodolo","html_url":"https://github.com/flodolo","followers_url":"https://api.github.com/users/flodolo/followers","following_url":"https://api.github.com/users/flodolo/following{/other_user}","gists_url":"https://api.github.com/users/flodolo/gists{/gist_id}","starred_url":"https://api.github.com/users/flodolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flodolo/subscriptions","organizations_url":"https://api.github.com/users/flodolo/orgs","repos_url":"https://api.github.com/users/flodolo/repos","events_url":"https://api.github.com/users/flodolo/events{/privacy}","received_events_url":"https://api.github.com/users/flodolo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flodolo/langchecker","description":"code to replicate the langchecker feature on my webdashboard","fork":true,"url":"https://api.github.com/repos/flodolo/langchecker","forks_url":"https://api.github.com/repos/flodolo/langchecker/forks","keys_url":"https://api.github.com/repos/flodolo/langchecker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flodolo/langchecker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flodolo/langchecker/teams","hooks_url":"https://api.github.com/repos/flodolo/langchecker/hooks","issue_events_url":"https://api.github.com/repos/flodolo/langchecker/issues/events{/number}","events_url":"https://api.github.com/repos/flodolo/langchecker/events","assignees_url":"https://api.github.com/repos/flodolo/langchecker/assignees{/user}","branches_url":"https://api.github.com/repos/flodolo/langchecker/branches{/branch}","tags_url":"https://api.github.com/repos/flodolo/langchecker/tags","blobs_url":"https://api.github.com/repos/flodolo/langchecker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flodolo/langchecker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flodolo/langchecker/git/refs{/sha}","trees_url":"https://api.github.com/repos/flodolo/langchecker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flodolo/langchecker/statuses/{sha}","languages_url":"https://api.github.com/repos/flodolo/langchecker/languages","stargazers_url":"https://api.github.com/repos/flodolo/langchecker/stargazers","contributors_url":"https://api.github.com/repos/flodolo/langchecker/contributors","subscribers_url":"https://api.github.com/repos/flodolo/langchecker/subscribers","subscription_url":"https://api.github.com/repos/flodolo/langchecker/subscription","commits_url":"https://api.github.com/repos/flodolo/langchecker/commits{/sha}","git_commits_url":"https://api.github.com/repos/flodolo/langchecker/git/commits{/sha}","comments_url":"https://api.github.com/repos/flodolo/langchecker/comments{/number}","issue_comment_url":"https://api.github.com/repos/flodolo/langchecker/issues/comments/{number}","contents_url":"https://api.github.com/repos/flodolo/langchecker/contents/{+path}","compare_url":"https://api.github.com/repos/flodolo/langchecker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flodolo/langchecker/merges","archive_url":"https://api.github.com/repos/flodolo/langchecker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flodolo/langchecker/downloads","issues_url":"https://api.github.com/repos/flodolo/langchecker/issues{/number}","pulls_url":"https://api.github.com/repos/flodolo/langchecker/pulls{/number}","milestones_url":"https://api.github.com/repos/flodolo/langchecker/milestones{/number}","notifications_url":"https://api.github.com/repos/flodolo/langchecker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flodolo/langchecker/labels{/name}","releases_url":"https://api.github.com/repos/flodolo/langchecker/releases{/id}","created_at":"2014-07-11T09:11:37Z","updated_at":"2015-02-02T09:14:37Z","pushed_at":"2015-02-02T11:56:18Z","git_url":"git://github.com/flodolo/langchecker.git","ssh_url":"git@github.com:flodolo/langchecker.git","clone_url":"https://github.com/flodolo/langchecker.git","svn_url":"https://github.com/flodolo/langchecker","homepage":null,"size":2102,"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":"mozilla-l10n:master","ref":"master","sha":"0a4ab3c80506cad408f4087b878fb14471b3a262","user":{"login":"mozilla-l10n","id":8619669,"avatar_url":"https://avatars.githubusercontent.com/u/8619669?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-l10n","html_url":"https://github.com/mozilla-l10n","followers_url":"https://api.github.com/users/mozilla-l10n/followers","following_url":"https://api.github.com/users/mozilla-l10n/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-l10n/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-l10n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-l10n/subscriptions","organizations_url":"https://api.github.com/users/mozilla-l10n/orgs","repos_url":"https://api.github.com/users/mozilla-l10n/repos","events_url":"https://api.github.com/users/mozilla-l10n/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-l10n/received_events","type":"Organization","site_admin":false},"repo":{"id":11282767,"name":"langchecker","full_name":"mozilla-l10n/langchecker","owner":{"login":"mozilla-l10n","id":8619669,"avatar_url":"https://avatars.githubusercontent.com/u/8619669?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-l10n","html_url":"https://github.com/mozilla-l10n","followers_url":"https://api.github.com/users/mozilla-l10n/followers","following_url":"https://api.github.com/users/mozilla-l10n/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-l10n/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-l10n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-l10n/subscriptions","organizations_url":"https://api.github.com/users/mozilla-l10n/orgs","repos_url":"https://api.github.com/users/mozilla-l10n/repos","events_url":"https://api.github.com/users/mozilla-l10n/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-l10n/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-l10n/langchecker","description":"code to replicate the langchecker feature on my webdashboard","fork":false,"url":"https://api.github.com/repos/mozilla-l10n/langchecker","forks_url":"https://api.github.com/repos/mozilla-l10n/langchecker/forks","keys_url":"https://api.github.com/repos/mozilla-l10n/langchecker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-l10n/langchecker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-l10n/langchecker/teams","hooks_url":"https://api.github.com/repos/mozilla-l10n/langchecker/hooks","issue_events_url":"https://api.github.com/repos/mozilla-l10n/langchecker/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-l10n/langchecker/events","assignees_url":"https://api.github.com/repos/mozilla-l10n/langchecker/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-l10n/langchecker/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-l10n/langchecker/tags","blobs_url":"https://api.github.com/repos/mozilla-l10n/langchecker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-l10n/langchecker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-l10n/langchecker/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-l10n/langchecker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-l10n/langchecker/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-l10n/langchecker/languages","stargazers_url":"https://api.github.com/repos/mozilla-l10n/langchecker/stargazers","contributors_url":"https://api.github.com/repos/mozilla-l10n/langchecker/contributors","subscribers_url":"https://api.github.com/repos/mozilla-l10n/langchecker/subscribers","subscription_url":"https://api.github.com/repos/mozilla-l10n/langchecker/subscription","commits_url":"https://api.github.com/repos/mozilla-l10n/langchecker/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-l10n/langchecker/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-l10n/langchecker/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-l10n/langchecker/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-l10n/langchecker/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-l10n/langchecker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-l10n/langchecker/merges","archive_url":"https://api.github.com/repos/mozilla-l10n/langchecker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-l10n/langchecker/downloads","issues_url":"https://api.github.com/repos/mozilla-l10n/langchecker/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-l10n/langchecker/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-l10n/langchecker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-l10n/langchecker/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-l10n/langchecker/releases{/id}","created_at":"2013-07-09T13:18:12Z","updated_at":"2015-02-02T09:14:14Z","pushed_at":"2015-02-02T09:14:13Z","git_url":"git://github.com/mozilla-l10n/langchecker.git","ssh_url":"git@github.com:mozilla-l10n/langchecker.git","clone_url":"https://github.com/mozilla-l10n/langchecker.git","svn_url":"https://github.com/mozilla-l10n/langchecker","homepage":null,"size":2999,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/273"},"html":{"href":"https://github.com/mozilla-l10n/langchecker/pull/273"},"issue":{"href":"https://api.github.com/repos/mozilla-l10n/langchecker/issues/273"},"comments":{"href":"https://api.github.com/repos/mozilla-l10n/langchecker/issues/273/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/273/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-l10n/langchecker/pulls/273/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-l10n/langchecker/statuses/792ed832d20db7cc565e76f4eb3b4378ef44b3b9"}}}}