GitHub PullRequestReviewCommentEvent at 2014-12-19 10:15:35
Repository: ezpublish-legacy
Actor: yannickroger
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/comments/22097760","id":22097760,"diff_hunk":"@@ -142,7 +141,7 @@ protected static function removePathPrefixIfNeeded( eZINI $saIni, &$url )\n             $pathPrefix = $saIni->variable( 'SiteAccessSettings', 'PathPrefix' );\n             if ( !empty( $pathPrefix ) )\n             {\n-                if ( strpos( $url, $pathPrefix . '/' ) === 0 )\n+                if ( (strpos( $url, $pathPrefix . '/' ) === 0) || ($pathPrefix === $url) )","path":"kernel/private/classes/ezplanguageswitcher.php","position":null,"original_position":13,"commit_id":"a01a1e1325b5ba93dfa013aeaa9d73c02ddf92d3","original_commit_id":"fad0ad3d7923927ffd5f9dbc053b733a41757509","user":{"login":"yannickroger","id":4035241,"avatar_url":"https://avatars.githubusercontent.com/u/4035241?v=3","gravatar_id":"","url":"https://api.github.com/users/yannickroger","html_url":"https://github.com/yannickroger","followers_url":"https://api.github.com/users/yannickroger/followers","following_url":"https://api.github.com/users/yannickroger/following{/other_user}","gists_url":"https://api.github.com/users/yannickroger/gists{/gist_id}","starred_url":"https://api.github.com/users/yannickroger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannickroger/subscriptions","organizations_url":"https://api.github.com/users/yannickroger/orgs","repos_url":"https://api.github.com/users/yannickroger/repos","events_url":"https://api.github.com/users/yannickroger/events{/privacy}","received_events_url":"https://api.github.com/users/yannickroger/received_events","type":"User","site_admin":false},"body":"We can leave it like that if it has been properly tested this way.","created_at":"2014-12-19T10:15:35Z","updated_at":"2014-12-19T10:15:35Z","html_url":"https://github.com/ezsystems/ezpublish-legacy/pull/1128#discussion_r22097760","pull_request_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1128","_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/comments/22097760"},"html":{"href":"https://github.com/ezsystems/ezpublish-legacy/pull/1128#discussion_r22097760"},"pull_request":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1128"}}},"pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1128","id":26305177,"html_url":"https://github.com/ezsystems/ezpublish-legacy/pull/1128","diff_url":"https://github.com/ezsystems/ezpublish-legacy/pull/1128.diff","patch_url":"https://github.com/ezsystems/ezpublish-legacy/pull/1128.patch","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/1128","number":1128,"state":"open","locked":false,"title":"Fix: pathPrefix in ezpLanguageSwitcher","user":{"login":"yannoz","id":3534129,"avatar_url":"https://avatars.githubusercontent.com/u/3534129?v=3","gravatar_id":"","url":"https://api.github.com/users/yannoz","html_url":"https://github.com/yannoz","followers_url":"https://api.github.com/users/yannoz/followers","following_url":"https://api.github.com/users/yannoz/following{/other_user}","gists_url":"https://api.github.com/users/yannoz/gists{/gist_id}","starred_url":"https://api.github.com/users/yannoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannoz/subscriptions","organizations_url":"https://api.github.com/users/yannoz/orgs","repos_url":"https://api.github.com/users/yannoz/repos","events_url":"https://api.github.com/users/yannoz/events{/privacy}","received_events_url":"https://api.github.com/users/yannoz/received_events","type":"User","site_admin":false},"body":"Problem:\r\nWhen checking wether pathPrefix sould be removed or not, it was assumed that you already were in a subfolder of the PathPrefix. The case where you want to go to the root of your pathPrefix folder wasn't handled.\r\n\r\nEx:\r\n- Home\r\n  - *MyPathPrefixFolder*\r\n    - News\r\n    - Contents\r\n    - ... \r\n  - MyOtherFolder\r\n\r\nLet's say \"MyPathprefixFolder\" is the home folder for a siteaccess, then you'll have in your site.ini \r\n```\r\nPathPrefix=MyPathPrefixFolder\r\n```\r\n\r\nWhen switching language directly from your homepage, the PathPrefix was added to the new language:\r\n`mywebsite.com/switchlanguage/to/fr/` redirects to `fr.mywebsite.com/MyPathPrefixFolder` instead of just `fr.mywebsite.com`.\r\n\r\nOh and I also removed unrelevant params.","created_at":"2014-12-18T14:52:59Z","updated_at":"2014-12-19T10:15:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00e46005872014f9842ab5365d6d1f6c94b090e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1128/commits","review_comments_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1128/comments","review_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/1128/comments","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/statuses/a01a1e1325b5ba93dfa013aeaa9d73c02ddf92d3","head":{"label":"yannoz:master","ref":"master","sha":"a01a1e1325b5ba93dfa013aeaa9d73c02ddf92d3","user":{"login":"yannoz","id":3534129,"avatar_url":"https://avatars.githubusercontent.com/u/3534129?v=3","gravatar_id":"","url":"https://api.github.com/users/yannoz","html_url":"https://github.com/yannoz","followers_url":"https://api.github.com/users/yannoz/followers","following_url":"https://api.github.com/users/yannoz/following{/other_user}","gists_url":"https://api.github.com/users/yannoz/gists{/gist_id}","starred_url":"https://api.github.com/users/yannoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannoz/subscriptions","organizations_url":"https://api.github.com/users/yannoz/orgs","repos_url":"https://api.github.com/users/yannoz/repos","events_url":"https://api.github.com/users/yannoz/events{/privacy}","received_events_url":"https://api.github.com/users/yannoz/received_events","type":"User","site_admin":false},"repo":{"id":28185836,"name":"ezpublish-legacy","full_name":"yannoz/ezpublish-legacy","owner":{"login":"yannoz","id":3534129,"avatar_url":"https://avatars.githubusercontent.com/u/3534129?v=3","gravatar_id":"","url":"https://api.github.com/users/yannoz","html_url":"https://github.com/yannoz","followers_url":"https://api.github.com/users/yannoz/followers","following_url":"https://api.github.com/users/yannoz/following{/other_user}","gists_url":"https://api.github.com/users/yannoz/gists{/gist_id}","starred_url":"https://api.github.com/users/yannoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannoz/subscriptions","organizations_url":"https://api.github.com/users/yannoz/orgs","repos_url":"https://api.github.com/users/yannoz/repos","events_url":"https://api.github.com/users/yannoz/events{/privacy}","received_events_url":"https://api.github.com/users/yannoz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yannoz/ezpublish-legacy","description":"eZ Publish","fork":true,"url":"https://api.github.com/repos/yannoz/ezpublish-legacy","forks_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/forks","keys_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/teams","hooks_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/hooks","issue_events_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/issues/events{/number}","events_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/events","assignees_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/assignees{/user}","branches_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/branches{/branch}","tags_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/tags","blobs_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/git/refs{/sha}","trees_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/statuses/{sha}","languages_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/languages","stargazers_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/stargazers","contributors_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/contributors","subscribers_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/subscribers","subscription_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/subscription","commits_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/commits{/sha}","git_commits_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/git/commits{/sha}","comments_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/comments{/number}","issue_comment_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/issues/comments/{number}","contents_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/contents/{+path}","compare_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/merges","archive_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/downloads","issues_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/issues{/number}","pulls_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/pulls{/number}","milestones_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/milestones{/number}","notifications_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/labels{/name}","releases_url":"https://api.github.com/repos/yannoz/ezpublish-legacy/releases{/id}","created_at":"2014-12-18T14:04:58Z","updated_at":"2014-12-19T09:56:38Z","pushed_at":"2014-12-19T09:56:22Z","git_url":"git://github.com/yannoz/ezpublish-legacy.git","ssh_url":"git@github.com:yannoz/ezpublish-legacy.git","clone_url":"https://github.com/yannoz/ezpublish-legacy.git","svn_url":"https://github.com/yannoz/ezpublish-legacy","homepage":"http://ez.no/Products/","size":307031,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"ezsystems:master","ref":"master","sha":"e2c040a80f83315d90e1444fdb004927fed6739e","user":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":715911,"name":"ezpublish-legacy","full_name":"ezsystems/ezpublish-legacy","owner":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/ezpublish-legacy","description":"eZ Publish","fork":false,"url":"https://api.github.com/repos/ezsystems/ezpublish-legacy","forks_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/forks","keys_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/teams","hooks_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/events","assignees_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/tags","blobs_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/languages","stargazers_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/subscription","commits_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/comments/{number}","contents_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/merges","archive_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/downloads","issues_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/releases{/id}","created_at":"2010-06-11T15:47:13Z","updated_at":"2014-12-19T09:21:07Z","pushed_at":"2014-12-19T09:20:55Z","git_url":"git://github.com/ezsystems/ezpublish-legacy.git","ssh_url":"git@github.com:ezsystems/ezpublish-legacy.git","clone_url":"https://github.com/ezsystems/ezpublish-legacy.git","svn_url":"https://github.com/ezsystems/ezpublish-legacy","homepage":"http://ez.no/Products/","size":307031,"stargazers_count":261,"watchers_count":261,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":223,"mirror_url":null,"open_issues_count":153,"forks":223,"open_issues":153,"watchers":261,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1128"},"html":{"href":"https://github.com/ezsystems/ezpublish-legacy/pull/1128"},"issue":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/1128"},"comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/1128/comments"},"review_comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1128/comments"},"review_comment":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1128/commits"},"statuses":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/statuses/a01a1e1325b5ba93dfa013aeaa9d73c02ddf92d3"}}}}