{"action":"created","comment":{"url":"https://api.github.com/repos/piwik/piwik/pulls/comments/58938944","id":58938944,"diff_hunk":"@@ -163,6 +163,16 @@ protected static function rewritePath($path)\n         return SettingsPiwik::rewriteMiscUserPathWithInstanceId($path);\n     }\n \n+    public static function hasUserLogo()\n+    {\n+        return file_exists(Filesystem::getPathToPiwikRoot() . '/' . CustomLogo::getPathUserLogo());","path":"plugins/CoreAdminHome/CustomLogo.php","position":6,"original_position":6,"commit_id":"42c0edf4beb25d336feb201624bded2c60b70eb0","original_commit_id":"d36c3208f27ddaa9c3bd785778735c0bb795df5a","user":{"login":"tsteur","id":273120,"avatar_url":"https://avatars.githubusercontent.com/u/273120?v=3","gravatar_id":"","url":"https://api.github.com/users/tsteur","html_url":"https://github.com/tsteur","followers_url":"https://api.github.com/users/tsteur/followers","following_url":"https://api.github.com/users/tsteur/following{/other_user}","gists_url":"https://api.github.com/users/tsteur/gists{/gist_id}","starred_url":"https://api.github.com/users/tsteur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsteur/subscriptions","organizations_url":"https://api.github.com/users/tsteur/orgs","repos_url":"https://api.github.com/users/tsteur/repos","events_url":"https://api.github.com/users/tsteur/events{/privacy}","received_events_url":"https://api.github.com/users/tsteur/received_events","type":"User","site_admin":false},"body":"Somehow I would prefer not to have it in Filesystem but would be also ok there. Having a look at this again in the code there is often `file_exists($pathToPiwikRoot . '/' . $customLogo)` etc, finding several `file_exists`. The code seems quite confusing in there in general and needs to be refactored at some point. Maybe there could me instead a method\r\n```php\r\nprivate function logoExists($reference)\r\n{\r\n    return file_exists(Filesystem::getPathToPiwikRoot() . '/' . $reference);\r\n}\r\n```\r\nOf course this could be as well in Filesystem but might be as well fine in CustomLogo for now","created_at":"2016-04-07T20:27:21Z","updated_at":"2016-04-07T20:27:21Z","html_url":"https://github.com/piwik/piwik/pull/10000#discussion_r58938944","pull_request_url":"https://api.github.com/repos/piwik/piwik/pulls/10000","_links":{"self":{"href":"https://api.github.com/repos/piwik/piwik/pulls/comments/58938944"},"html":{"href":"https://github.com/piwik/piwik/pull/10000#discussion_r58938944"},"pull_request":{"href":"https://api.github.com/repos/piwik/piwik/pulls/10000"}}},"pull_request":{"url":"https://api.github.com/repos/piwik/piwik/pulls/10000","id":65202042,"html_url":"https://github.com/piwik/piwik/pull/10000","diff_url":"https://github.com/piwik/piwik/pull/10000.diff","patch_url":"https://github.com/piwik/piwik/pull/10000.patch","issue_url":"https://api.github.com/repos/piwik/piwik/issues/10000","number":10000,"state":"open","locked":false,"title":"Don't try to display a custom logo or favicon if they don't exist","user":{"login":"ksubileau","id":3837104,"avatar_url":"https://avatars.githubusercontent.com/u/3837104?v=3","gravatar_id":"","url":"https://api.github.com/users/ksubileau","html_url":"https://github.com/ksubileau","followers_url":"https://api.github.com/users/ksubileau/followers","following_url":"https://api.github.com/users/ksubileau/following{/other_user}","gists_url":"https://api.github.com/users/ksubileau/gists{/gist_id}","starred_url":"https://api.github.com/users/ksubileau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksubileau/subscriptions","organizations_url":"https://api.github.com/users/ksubileau/orgs","repos_url":"https://api.github.com/users/ksubileau/repos","events_url":"https://api.github.com/users/ksubileau/events{/privacy}","received_events_url":"https://api.github.com/users/ksubileau/received_events","type":"User","site_admin":false},"body":"A possible fix for #9966","created_at":"2016-04-04T19:49:05Z","updated_at":"2016-04-07T20:27:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1171ba60163775ebf2c5c82741e8a9ba97c872ff","assignee":null,"milestone":{"url":"https://api.github.com/repos/piwik/piwik/milestones/94","html_url":"https://github.com/piwik/piwik/milestones/2.16.2","labels_url":"https://api.github.com/repos/piwik/piwik/milestones/94/labels","id":1673222,"number":94,"title":"2.16.2","description":"","creator":{"login":"mattab","id":466765,"avatar_url":"https://avatars.githubusercontent.com/u/466765?v=3","gravatar_id":"","url":"https://api.github.com/users/mattab","html_url":"https://github.com/mattab","followers_url":"https://api.github.com/users/mattab/followers","following_url":"https://api.github.com/users/mattab/following{/other_user}","gists_url":"https://api.github.com/users/mattab/gists{/gist_id}","starred_url":"https://api.github.com/users/mattab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattab/subscriptions","organizations_url":"https://api.github.com/users/mattab/orgs","repos_url":"https://api.github.com/users/mattab/repos","events_url":"https://api.github.com/users/mattab/events{/privacy}","received_events_url":"https://api.github.com/users/mattab/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":1,"state":"open","created_at":"2016-03-30T03:36:40Z","updated_at":"2016-04-07T00:45:53Z","due_on":"2016-04-20T12:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/piwik/piwik/pulls/10000/commits","review_comments_url":"https://api.github.com/repos/piwik/piwik/pulls/10000/comments","review_comment_url":"https://api.github.com/repos/piwik/piwik/pulls/comments{/number}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/10000/comments","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/42c0edf4beb25d336feb201624bded2c60b70eb0","head":{"label":"ksubileau:9966","ref":"9966","sha":"42c0edf4beb25d336feb201624bded2c60b70eb0","user":{"login":"ksubileau","id":3837104,"avatar_url":"https://avatars.githubusercontent.com/u/3837104?v=3","gravatar_id":"","url":"https://api.github.com/users/ksubileau","html_url":"https://github.com/ksubileau","followers_url":"https://api.github.com/users/ksubileau/followers","following_url":"https://api.github.com/users/ksubileau/following{/other_user}","gists_url":"https://api.github.com/users/ksubileau/gists{/gist_id}","starred_url":"https://api.github.com/users/ksubileau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksubileau/subscriptions","organizations_url":"https://api.github.com/users/ksubileau/orgs","repos_url":"https://api.github.com/users/ksubileau/repos","events_url":"https://api.github.com/users/ksubileau/events{/privacy}","received_events_url":"https://api.github.com/users/ksubileau/received_events","type":"User","site_admin":false},"repo":{"id":8828113,"name":"piwik","full_name":"ksubileau/piwik","owner":{"login":"ksubileau","id":3837104,"avatar_url":"https://avatars.githubusercontent.com/u/3837104?v=3","gravatar_id":"","url":"https://api.github.com/users/ksubileau","html_url":"https://github.com/ksubileau","followers_url":"https://api.github.com/users/ksubileau/followers","following_url":"https://api.github.com/users/ksubileau/following{/other_user}","gists_url":"https://api.github.com/users/ksubileau/gists{/gist_id}","starred_url":"https://api.github.com/users/ksubileau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ksubileau/subscriptions","organizations_url":"https://api.github.com/users/ksubileau/orgs","repos_url":"https://api.github.com/users/ksubileau/repos","events_url":"https://api.github.com/users/ksubileau/events{/privacy}","received_events_url":"https://api.github.com/users/ksubileau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ksubileau/piwik","description":"Piwik is now on GitHub!! Please \"Star\" the project, and we welcome Pull Requests. Piwik aims to be the ultimate open source alternative to Google Analytics. Liberating Web Analytics!","fork":true,"url":"https://api.github.com/repos/ksubileau/piwik","forks_url":"https://api.github.com/repos/ksubileau/piwik/forks","keys_url":"https://api.github.com/repos/ksubileau/piwik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ksubileau/piwik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ksubileau/piwik/teams","hooks_url":"https://api.github.com/repos/ksubileau/piwik/hooks","issue_events_url":"https://api.github.com/repos/ksubileau/piwik/issues/events{/number}","events_url":"https://api.github.com/repos/ksubileau/piwik/events","assignees_url":"https://api.github.com/repos/ksubileau/piwik/assignees{/user}","branches_url":"https://api.github.com/repos/ksubileau/piwik/branches{/branch}","tags_url":"https://api.github.com/repos/ksubileau/piwik/tags","blobs_url":"https://api.github.com/repos/ksubileau/piwik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ksubileau/piwik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ksubileau/piwik/git/refs{/sha}","trees_url":"https://api.github.com/repos/ksubileau/piwik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ksubileau/piwik/statuses/{sha}","languages_url":"https://api.github.com/repos/ksubileau/piwik/languages","stargazers_url":"https://api.github.com/repos/ksubileau/piwik/stargazers","contributors_url":"https://api.github.com/repos/ksubileau/piwik/contributors","subscribers_url":"https://api.github.com/repos/ksubileau/piwik/subscribers","subscription_url":"https://api.github.com/repos/ksubileau/piwik/subscription","commits_url":"https://api.github.com/repos/ksubileau/piwik/commits{/sha}","git_commits_url":"https://api.github.com/repos/ksubileau/piwik/git/commits{/sha}","comments_url":"https://api.github.com/repos/ksubileau/piwik/comments{/number}","issue_comment_url":"https://api.github.com/repos/ksubileau/piwik/issues/comments{/number}","contents_url":"https://api.github.com/repos/ksubileau/piwik/contents/{+path}","compare_url":"https://api.github.com/repos/ksubileau/piwik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ksubileau/piwik/merges","archive_url":"https://api.github.com/repos/ksubileau/piwik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ksubileau/piwik/downloads","issues_url":"https://api.github.com/repos/ksubileau/piwik/issues{/number}","pulls_url":"https://api.github.com/repos/ksubileau/piwik/pulls{/number}","milestones_url":"https://api.github.com/repos/ksubileau/piwik/milestones{/number}","notifications_url":"https://api.github.com/repos/ksubileau/piwik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ksubileau/piwik/labels{/name}","releases_url":"https://api.github.com/repos/ksubileau/piwik/releases{/id}","deployments_url":"https://api.github.com/repos/ksubileau/piwik/deployments","created_at":"2013-03-17T01:18:12Z","updated_at":"2014-07-19T10:41:04Z","pushed_at":"2016-04-05T22:51:28Z","git_url":"git://github.com/ksubileau/piwik.git","ssh_url":"git@github.com:ksubileau/piwik.git","clone_url":"https://github.com/ksubileau/piwik.git","svn_url":"https://github.com/ksubileau/piwik","homepage":"http://piwik.org/","size":143702,"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":"piwik:master","ref":"master","sha":"d9031717cb25d9ae943cbe6e7c64215a8851189d","user":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"piwik","full_name":"piwik/piwik","owner":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/piwik/piwik","description":"Liberating Web Analytics. Star us on Github? +1. Piwik is the leading open alternative to Google Analytics that gives you full control over your data. Piwik lets you easily collect data from websites, apps & the IoT and visualise this data and extract insights. Privacy is built-in. We love Pull Requests! ","fork":false,"url":"https://api.github.com/repos/piwik/piwik","forks_url":"https://api.github.com/repos/piwik/piwik/forks","keys_url":"https://api.github.com/repos/piwik/piwik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piwik/piwik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piwik/piwik/teams","hooks_url":"https://api.github.com/repos/piwik/piwik/hooks","issue_events_url":"https://api.github.com/repos/piwik/piwik/issues/events{/number}","events_url":"https://api.github.com/repos/piwik/piwik/events","assignees_url":"https://api.github.com/repos/piwik/piwik/assignees{/user}","branches_url":"https://api.github.com/repos/piwik/piwik/branches{/branch}","tags_url":"https://api.github.com/repos/piwik/piwik/tags","blobs_url":"https://api.github.com/repos/piwik/piwik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piwik/piwik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piwik/piwik/git/refs{/sha}","trees_url":"https://api.github.com/repos/piwik/piwik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/{sha}","languages_url":"https://api.github.com/repos/piwik/piwik/languages","stargazers_url":"https://api.github.com/repos/piwik/piwik/stargazers","contributors_url":"https://api.github.com/repos/piwik/piwik/contributors","subscribers_url":"https://api.github.com/repos/piwik/piwik/subscribers","subscription_url":"https://api.github.com/repos/piwik/piwik/subscription","commits_url":"https://api.github.com/repos/piwik/piwik/commits{/sha}","git_commits_url":"https://api.github.com/repos/piwik/piwik/git/commits{/sha}","comments_url":"https://api.github.com/repos/piwik/piwik/comments{/number}","issue_comment_url":"https://api.github.com/repos/piwik/piwik/issues/comments{/number}","contents_url":"https://api.github.com/repos/piwik/piwik/contents/{+path}","compare_url":"https://api.github.com/repos/piwik/piwik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piwik/piwik/merges","archive_url":"https://api.github.com/repos/piwik/piwik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piwik/piwik/downloads","issues_url":"https://api.github.com/repos/piwik/piwik/issues{/number}","pulls_url":"https://api.github.com/repos/piwik/piwik/pulls{/number}","milestones_url":"https://api.github.com/repos/piwik/piwik/milestones{/number}","notifications_url":"https://api.github.com/repos/piwik/piwik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piwik/piwik/labels{/name}","releases_url":"https://api.github.com/repos/piwik/piwik/releases{/id}","deployments_url":"https://api.github.com/repos/piwik/piwik/deployments","created_at":"2011-03-30T21:18:17Z","updated_at":"2016-04-07T12:55:52Z","pushed_at":"2016-04-07T13:12:14Z","git_url":"git://github.com/piwik/piwik.git","ssh_url":"git@github.com:piwik/piwik.git","clone_url":"https://github.com/piwik/piwik.git","svn_url":"https://github.com/piwik/piwik","homepage":"http://piwik.org/","size":219479,"stargazers_count":5301,"watchers_count":5301,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":937,"mirror_url":null,"open_issues_count":1328,"forks":937,"open_issues":1328,"watchers":5301,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/piwik/piwik/pulls/10000"},"html":{"href":"https://github.com/piwik/piwik/pull/10000"},"issue":{"href":"https://api.github.com/repos/piwik/piwik/issues/10000"},"comments":{"href":"https://api.github.com/repos/piwik/piwik/issues/10000/comments"},"review_comments":{"href":"https://api.github.com/repos/piwik/piwik/pulls/10000/comments"},"review_comment":{"href":"https://api.github.com/repos/piwik/piwik/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/piwik/piwik/pulls/10000/commits"},"statuses":{"href":"https://api.github.com/repos/piwik/piwik/statuses/42c0edf4beb25d336feb201624bded2c60b70eb0"}}}}