{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/app/pulls/comments/31421136","id":31421136,"diff_hunk":"@@ -23,46 +22,41 @@ public static function getIcon( $service ) {\n \n \t/**\n \t * Get language for Page Share service.\n-\t * For anon users use the browser language from client side, if empty default to EN.\n-\t * For logged in user use user's language.\n-\t * Both values can be overwritten by ?uselang parameter which is passed from the client side.\n+\t * Language code is sent from the client side. If it's empty, the default (en) is returned.\n \t *\n-\t * @param $browserLang\n-\t * @param $useLang\n+\t * @param $requestShareLang\n \t * @return String language\n \t */\n-\tpublic static function getLangForPageShare( $browserLang, $useLang ) {\n-\t\tglobal $wgLang, $wgUser;\n-\n-\t\tif ( !empty ( $useLang ) ) {\n-\t\t\treturn $useLang;\n-\t\t} else if ( $wgUser->isAnon() ) {\n-\t\t\tif ( !empty( $browserLang ) ) {\n-\t\t\t\treturn $browserLang;\n-\t\t\t} else {\n-\t\t\t\treturn self::SHARE_DEFAULT_LANGUAGE;\n-\t\t\t}\n-\t\t} else {\n-\t\t\treturn $wgLang->getCode();\n-\t\t}\n+\tpublic static function getLangForPageShare( $requestShareLang ) {\n+\t\treturn empty( $requestShareLang ) ? self::SHARE_DEFAULT_LANGUAGE : $requestShareLang;\n \t}\n \n \tpublic static function isValidShareService( $service, $lang, $isTouchScreen ) {\n-\t\t// Don't display LINE social network (because it's a mobile app) on desktops\n-\t\tif ( !$isTouchScreen && $service['name'] === self::LINE_NAME ) {\n+\t\t// Don't display LINE social network or any other mobile app on desktops\n+\t\tif (\n+\t\t\t!$isTouchScreen\n+\t\t\t&& array_key_exists( 'displayOnlyOnTouchDevices', $service )\n+\t\t\t&& $service['displayOnlyOnTouchDevices']","path":"extensions/wikia/PageShare/PageShareHelper.class.php","position":null,"original_position":47,"commit_id":"ae9389e00de2969ee3b0f59d2a9858c6e6378eb3","original_commit_id":"df4b86e8774a75d81e349b70161b29fec31e69e8","user":{"login":"Warkot","id":7061001,"avatar_url":"https://avatars.githubusercontent.com/u/7061001?v=3","gravatar_id":"","url":"https://api.github.com/users/Warkot","html_url":"https://github.com/Warkot","followers_url":"https://api.github.com/users/Warkot/followers","following_url":"https://api.github.com/users/Warkot/following{/other_user}","gists_url":"https://api.github.com/users/Warkot/gists{/gist_id}","starred_url":"https://api.github.com/users/Warkot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Warkot/subscriptions","organizations_url":"https://api.github.com/users/Warkot/orgs","repos_url":"https://api.github.com/users/Warkot/repos","events_url":"https://api.github.com/users/Warkot/events{/privacy}","received_events_url":"https://api.github.com/users/Warkot/received_events","type":"User","site_admin":false},"body":"Great idea, I was thinking too much JavaScript where you can't even check if anything is out of index.","created_at":"2015-06-01T12:38:47Z","updated_at":"2015-06-01T12:38:47Z","html_url":"https://github.com/Wikia/app/pull/7130#discussion_r31421136","pull_request_url":"https://api.github.com/repos/Wikia/app/pulls/7130","_links":{"self":{"href":"https://api.github.com/repos/Wikia/app/pulls/comments/31421136"},"html":{"href":"https://github.com/Wikia/app/pull/7130#discussion_r31421136"},"pull_request":{"href":"https://api.github.com/repos/Wikia/app/pulls/7130"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/app/pulls/7130","id":34846695,"html_url":"https://github.com/Wikia/app/pull/7130","diff_url":"https://github.com/Wikia/app/pull/7130.diff","patch_url":"https://github.com/Wikia/app/pull/7130.patch","issue_url":"https://api.github.com/repos/Wikia/app/issues/7130","number":7130,"state":"open","locked":false,"title":"CONCF-511 | fix social media sharing icons","user":{"login":"Warkot","id":7061001,"avatar_url":"https://avatars.githubusercontent.com/u/7061001?v=3","gravatar_id":"","url":"https://api.github.com/users/Warkot","html_url":"https://github.com/Warkot","followers_url":"https://api.github.com/users/Warkot/followers","following_url":"https://api.github.com/users/Warkot/following{/other_user}","gists_url":"https://api.github.com/users/Warkot/gists{/gist_id}","starred_url":"https://api.github.com/users/Warkot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Warkot/subscriptions","organizations_url":"https://api.github.com/users/Warkot/orgs","repos_url":"https://api.github.com/users/Warkot/repos","events_url":"https://api.github.com/users/Warkot/events{/privacy}","received_events_url":"https://api.github.com/users/Warkot/received_events","type":"User","site_admin":false},"body":":information_source: https://github.com/Wikia/config/pull/1090 is complementary to this PR.\r\n\r\nping for CR → @vforge @bognix @dianafa ","created_at":"2015-05-06T18:41:00Z","updated_at":"2015-06-01T12:38:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0ecdfaf5a845fabd29e9e9f769b8627958ede6f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/app/pulls/7130/commits","review_comments_url":"https://api.github.com/repos/Wikia/app/pulls/7130/comments","review_comment_url":"https://api.github.com/repos/Wikia/app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/app/issues/7130/comments","statuses_url":"https://api.github.com/repos/Wikia/app/statuses/ae9389e00de2969ee3b0f59d2a9858c6e6378eb3","head":{"label":"Wikia:CONCF-511","ref":"CONCF-511","sha":"ae9389e00de2969ee3b0f59d2a9858c6e6378eb3","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":5532313,"name":"app","full_name":"Wikia/app","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/app","description":"Wikia Application Code","fork":false,"url":"https://api.github.com/repos/Wikia/app","forks_url":"https://api.github.com/repos/Wikia/app/forks","keys_url":"https://api.github.com/repos/Wikia/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/app/teams","hooks_url":"https://api.github.com/repos/Wikia/app/hooks","issue_events_url":"https://api.github.com/repos/Wikia/app/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/app/events","assignees_url":"https://api.github.com/repos/Wikia/app/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/app/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/app/tags","blobs_url":"https://api.github.com/repos/Wikia/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/app/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/app/languages","stargazers_url":"https://api.github.com/repos/Wikia/app/stargazers","contributors_url":"https://api.github.com/repos/Wikia/app/contributors","subscribers_url":"https://api.github.com/repos/Wikia/app/subscribers","subscription_url":"https://api.github.com/repos/Wikia/app/subscription","commits_url":"https://api.github.com/repos/Wikia/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/app/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/app/merges","archive_url":"https://api.github.com/repos/Wikia/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/app/downloads","issues_url":"https://api.github.com/repos/Wikia/app/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/app/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/app/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/app/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/app/releases{/id}","created_at":"2012-08-23T20:55:58Z","updated_at":"2015-06-01T12:38:38Z","pushed_at":"2015-06-01T12:37:27Z","git_url":"git://github.com/Wikia/app.git","ssh_url":"git@github.com:Wikia/app.git","clone_url":"https://github.com/Wikia/app.git","svn_url":"https://github.com/Wikia/app","homepage":"http://dev.wikia.com","size":1413189,"stargazers_count":79,"watchers_count":79,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":68,"forks":56,"open_issues":68,"watchers":79,"default_branch":"dev"}},"base":{"label":"Wikia:dev","ref":"dev","sha":"7026fe56f3be5cd8df8cd7e847bfcb5f9732631f","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":5532313,"name":"app","full_name":"Wikia/app","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/app","description":"Wikia Application Code","fork":false,"url":"https://api.github.com/repos/Wikia/app","forks_url":"https://api.github.com/repos/Wikia/app/forks","keys_url":"https://api.github.com/repos/Wikia/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/app/teams","hooks_url":"https://api.github.com/repos/Wikia/app/hooks","issue_events_url":"https://api.github.com/repos/Wikia/app/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/app/events","assignees_url":"https://api.github.com/repos/Wikia/app/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/app/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/app/tags","blobs_url":"https://api.github.com/repos/Wikia/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/app/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/app/languages","stargazers_url":"https://api.github.com/repos/Wikia/app/stargazers","contributors_url":"https://api.github.com/repos/Wikia/app/contributors","subscribers_url":"https://api.github.com/repos/Wikia/app/subscribers","subscription_url":"https://api.github.com/repos/Wikia/app/subscription","commits_url":"https://api.github.com/repos/Wikia/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/app/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/app/merges","archive_url":"https://api.github.com/repos/Wikia/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/app/downloads","issues_url":"https://api.github.com/repos/Wikia/app/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/app/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/app/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/app/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/app/releases{/id}","created_at":"2012-08-23T20:55:58Z","updated_at":"2015-06-01T12:38:38Z","pushed_at":"2015-06-01T12:37:27Z","git_url":"git://github.com/Wikia/app.git","ssh_url":"git@github.com:Wikia/app.git","clone_url":"https://github.com/Wikia/app.git","svn_url":"https://github.com/Wikia/app","homepage":"http://dev.wikia.com","size":1413189,"stargazers_count":79,"watchers_count":79,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":68,"forks":56,"open_issues":68,"watchers":79,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/app/pulls/7130"},"html":{"href":"https://github.com/Wikia/app/pull/7130"},"issue":{"href":"https://api.github.com/repos/Wikia/app/issues/7130"},"comments":{"href":"https://api.github.com/repos/Wikia/app/issues/7130/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/app/pulls/7130/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/app/pulls/7130/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/app/statuses/ae9389e00de2969ee3b0f59d2a9858c6e6378eb3"}}}}