{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments/45373816","id":45373816,"diff_hunk":"@@ -651,6 +651,24 @@ function dosomething_global_url($path, $options = NULL) {\n }\n \n /**\n+ * Build a global node URL that adds the prefix and a fragment\n+ *\n+ * @param string $nid\n+ *    The nid of the node\n+ * @param string $language\n+ *    The language of the URL\n+ * @param string $fragment\n+ *    Optional fragment to append\n+ */\n+function dosomething_global_node_url($nid, $language, $fragment = NULL) {\n+  $raw_url = 'node/' . $nid;\n+  if (isset($fragment)) {\n+    $raw_url .= '#' . $fragment;","path":"lib/modules/dosomething/dosomething_global/dosomething_global.module","position":16,"original_position":16,"commit_id":"3748832bb1fc0c842052c2452ca61f1d2614d24f","original_commit_id":"3748832bb1fc0c842052c2452ca61f1d2614d24f","user":{"login":"angaither","id":645205,"avatar_url":"https://avatars.githubusercontent.com/u/645205?v=3","gravatar_id":"","url":"https://api.github.com/users/angaither","html_url":"https://github.com/angaither","followers_url":"https://api.github.com/users/angaither/followers","following_url":"https://api.github.com/users/angaither/following{/other_user}","gists_url":"https://api.github.com/users/angaither/gists{/gist_id}","starred_url":"https://api.github.com/users/angaither/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angaither/subscriptions","organizations_url":"https://api.github.com/users/angaither/orgs","repos_url":"https://api.github.com/users/angaither/repos","events_url":"https://api.github.com/users/angaither/events{/privacy}","received_events_url":"https://api.github.com/users/angaither/received_events","type":"User","site_admin":false},"body":"i know we've seen issue with manually concating the url like this before, it's best to pass this into url() with fragment as an option.\r\nthat will also allow for other types of urls to use this. (with a query string etc)","created_at":"2015-11-19T17:42:05Z","updated_at":"2015-11-19T17:42:05Z","html_url":"https://github.com/DoSomething/phoenix/pull/5808#discussion_r45373816","pull_request_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/5808","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments/45373816"},"html":{"href":"https://github.com/DoSomething/phoenix/pull/5808#discussion_r45373816"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/5808"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/phoenix/pulls/5808","id":51242730,"html_url":"https://github.com/DoSomething/phoenix/pull/5808","diff_url":"https://github.com/DoSomething/phoenix/pull/5808.diff","patch_url":"https://github.com/DoSomething/phoenix/pull/5808.patch","issue_url":"https://api.github.com/repos/DoSomething/phoenix/issues/5808","number":5808,"state":"open","locked":false,"title":"Fixes user profile campaign links","user":{"login":"deadlybutter","id":897368,"avatar_url":"https://avatars.githubusercontent.com/u/897368?v=3","gravatar_id":"","url":"https://api.github.com/users/deadlybutter","html_url":"https://github.com/deadlybutter","followers_url":"https://api.github.com/users/deadlybutter/followers","following_url":"https://api.github.com/users/deadlybutter/following{/other_user}","gists_url":"https://api.github.com/users/deadlybutter/gists{/gist_id}","starred_url":"https://api.github.com/users/deadlybutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deadlybutter/subscriptions","organizations_url":"https://api.github.com/users/deadlybutter/orgs","repos_url":"https://api.github.com/users/deadlybutter/repos","events_url":"https://api.github.com/users/deadlybutter/events{/privacy}","received_events_url":"https://api.github.com/users/deadlybutter/received_events","type":"User","site_admin":false},"body":"#### What's this PR do?\r\nFixes the campaign links on the user profile page\r\n\r\n#### How should this be manually tested?\r\nDo the links work now?\r\n\r\n#### Any background context you want to provide?\r\nSomething is funky with dosomething_global_url() and drupal path prefixes, this method will always work \r\n\r\n#### What are the relevant tickets?\r\nFixes #5805 ","created_at":"2015-11-19T16:09:41Z","updated_at":"2015-11-19T17:42:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35d75bc50fdac1993566ea74a2e796e150413cdc","assignee":{"login":"sergii-tkachenko","id":672669,"avatar_url":"https://avatars.githubusercontent.com/u/672669?v=3","gravatar_id":"","url":"https://api.github.com/users/sergii-tkachenko","html_url":"https://github.com/sergii-tkachenko","followers_url":"https://api.github.com/users/sergii-tkachenko/followers","following_url":"https://api.github.com/users/sergii-tkachenko/following{/other_user}","gists_url":"https://api.github.com/users/sergii-tkachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sergii-tkachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergii-tkachenko/subscriptions","organizations_url":"https://api.github.com/users/sergii-tkachenko/orgs","repos_url":"https://api.github.com/users/sergii-tkachenko/repos","events_url":"https://api.github.com/users/sergii-tkachenko/events{/privacy}","received_events_url":"https://api.github.com/users/sergii-tkachenko/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/5808/commits","review_comments_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/5808/comments","review_comment_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/phoenix/issues/5808/comments","statuses_url":"https://api.github.com/repos/DoSomething/phoenix/statuses/3748832bb1fc0c842052c2452ca61f1d2614d24f","head":{"label":"deadlybutter:5805","ref":"5805","sha":"3748832bb1fc0c842052c2452ca61f1d2614d24f","user":{"login":"deadlybutter","id":897368,"avatar_url":"https://avatars.githubusercontent.com/u/897368?v=3","gravatar_id":"","url":"https://api.github.com/users/deadlybutter","html_url":"https://github.com/deadlybutter","followers_url":"https://api.github.com/users/deadlybutter/followers","following_url":"https://api.github.com/users/deadlybutter/following{/other_user}","gists_url":"https://api.github.com/users/deadlybutter/gists{/gist_id}","starred_url":"https://api.github.com/users/deadlybutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deadlybutter/subscriptions","organizations_url":"https://api.github.com/users/deadlybutter/orgs","repos_url":"https://api.github.com/users/deadlybutter/repos","events_url":"https://api.github.com/users/deadlybutter/events{/privacy}","received_events_url":"https://api.github.com/users/deadlybutter/received_events","type":"User","site_admin":false},"repo":{"id":43687372,"name":"phoenix","full_name":"deadlybutter/phoenix","owner":{"login":"deadlybutter","id":897368,"avatar_url":"https://avatars.githubusercontent.com/u/897368?v=3","gravatar_id":"","url":"https://api.github.com/users/deadlybutter","html_url":"https://github.com/deadlybutter","followers_url":"https://api.github.com/users/deadlybutter/followers","following_url":"https://api.github.com/users/deadlybutter/following{/other_user}","gists_url":"https://api.github.com/users/deadlybutter/gists{/gist_id}","starred_url":"https://api.github.com/users/deadlybutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deadlybutter/subscriptions","organizations_url":"https://api.github.com/users/deadlybutter/orgs","repos_url":"https://api.github.com/users/deadlybutter/repos","events_url":"https://api.github.com/users/deadlybutter/events{/privacy}","received_events_url":"https://api.github.com/users/deadlybutter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deadlybutter/phoenix","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":true,"url":"https://api.github.com/repos/deadlybutter/phoenix","forks_url":"https://api.github.com/repos/deadlybutter/phoenix/forks","keys_url":"https://api.github.com/repos/deadlybutter/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deadlybutter/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deadlybutter/phoenix/teams","hooks_url":"https://api.github.com/repos/deadlybutter/phoenix/hooks","issue_events_url":"https://api.github.com/repos/deadlybutter/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/deadlybutter/phoenix/events","assignees_url":"https://api.github.com/repos/deadlybutter/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/deadlybutter/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/deadlybutter/phoenix/tags","blobs_url":"https://api.github.com/repos/deadlybutter/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deadlybutter/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deadlybutter/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/deadlybutter/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deadlybutter/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/deadlybutter/phoenix/languages","stargazers_url":"https://api.github.com/repos/deadlybutter/phoenix/stargazers","contributors_url":"https://api.github.com/repos/deadlybutter/phoenix/contributors","subscribers_url":"https://api.github.com/repos/deadlybutter/phoenix/subscribers","subscription_url":"https://api.github.com/repos/deadlybutter/phoenix/subscription","commits_url":"https://api.github.com/repos/deadlybutter/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/deadlybutter/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/deadlybutter/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/deadlybutter/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/deadlybutter/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/deadlybutter/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deadlybutter/phoenix/merges","archive_url":"https://api.github.com/repos/deadlybutter/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deadlybutter/phoenix/downloads","issues_url":"https://api.github.com/repos/deadlybutter/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/deadlybutter/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/deadlybutter/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/deadlybutter/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deadlybutter/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/deadlybutter/phoenix/releases{/id}","created_at":"2015-10-05T13:56:21Z","updated_at":"2015-10-05T13:56:26Z","pushed_at":"2015-11-19T17:38:30Z","git_url":"git://github.com/deadlybutter/phoenix.git","ssh_url":"git@github.com:deadlybutter/phoenix.git","clone_url":"https://github.com/deadlybutter/phoenix.git","svn_url":"https://github.com/deadlybutter/phoenix","homepage":"http://www.dosomething.org/","size":15316,"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":"dev"}},"base":{"label":"DoSomething:dev","ref":"dev","sha":"c505847b7ad7fe6bc26986b7976e3047c08de1a0","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":13592927,"name":"phoenix","full_name":"DoSomething/phoenix","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/phoenix","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":false,"url":"https://api.github.com/repos/DoSomething/phoenix","forks_url":"https://api.github.com/repos/DoSomething/phoenix/forks","keys_url":"https://api.github.com/repos/DoSomething/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/phoenix/teams","hooks_url":"https://api.github.com/repos/DoSomething/phoenix/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/phoenix/events","assignees_url":"https://api.github.com/repos/DoSomething/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/phoenix/tags","blobs_url":"https://api.github.com/repos/DoSomething/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/phoenix/languages","stargazers_url":"https://api.github.com/repos/DoSomething/phoenix/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/phoenix/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/phoenix/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/phoenix/subscription","commits_url":"https://api.github.com/repos/DoSomething/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/phoenix/merges","archive_url":"https://api.github.com/repos/DoSomething/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/phoenix/downloads","issues_url":"https://api.github.com/repos/DoSomething/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/phoenix/releases{/id}","created_at":"2013-10-15T14:50:48Z","updated_at":"2015-07-23T19:32:25Z","pushed_at":"2015-11-19T17:38:30Z","git_url":"git://github.com/DoSomething/phoenix.git","ssh_url":"git@github.com:DoSomething/phoenix.git","clone_url":"https://github.com/DoSomething/phoenix.git","svn_url":"https://github.com/DoSomething/phoenix","homepage":"http://www.dosomething.org/","size":15934,"stargazers_count":25,"watchers_count":25,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":279,"forks":19,"open_issues":279,"watchers":25,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/5808"},"html":{"href":"https://github.com/DoSomething/phoenix/pull/5808"},"issue":{"href":"https://api.github.com/repos/DoSomething/phoenix/issues/5808"},"comments":{"href":"https://api.github.com/repos/DoSomething/phoenix/issues/5808/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/5808/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/5808/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/phoenix/statuses/3748832bb1fc0c842052c2452ca61f1d2614d24f"}}}}