{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_75/pulls/comments/38617518","id":38617518,"diff_hunk":"@@ -16,13 +16,18 @@ class StaticPageController extends Controller\n     public function indexAction()\n     {\n         $user = $this->getUser();\n-        $em = $this->getDoctrine()->getManager();\n-        $followee  = $em->getRepository('ElearningBundle:Relationship')->getFolloweeIds($user);\n-        $activities  = $em->getRepository('ElearningBundle:Lesson')->getActivityForUser($user, $followee);\n-        $paginator  = $this->get('knp_paginator');\n-        $pagination = $paginator->paginate($activities, $this->get('request')->get('page', 1), $this->container->getParameter('activities_per_page'));\n+        if ($user) {\n+            $em = $this->getDoctrine()->getManager();\n+            $followee = $em->getRepository('ElearningBundle:Relationship')->getFolloweeIds($user);\n+            $activities = $em->getRepository('ElearningBundle:Lesson')->getActivityForUser($user, $followee);\n+            $paginator = $this->get('knp_paginator');\n+            $pagination = $paginator->paginate($activities, $this->get('request')->get('page', 1), $this->container->getParameter('activities_per_page'));\n \n-        return ['activities' => $pagination];\n+            return ['activities' => $pagination];\n+        } else {\n+","path":"src/ElearningBundle/Controller/StaticPageController.php","position":19,"original_position":19,"commit_id":"1d9ff6f3e15b73cd700534eb3cd0320bdd798544","original_commit_id":"1d9ff6f3e15b73cd700534eb3cd0320bdd798544","user":{"login":"dinhhoanglong91","id":1893820,"avatar_url":"https://avatars.githubusercontent.com/u/1893820?v=3","gravatar_id":"","url":"https://api.github.com/users/dinhhoanglong91","html_url":"https://github.com/dinhhoanglong91","followers_url":"https://api.github.com/users/dinhhoanglong91/followers","following_url":"https://api.github.com/users/dinhhoanglong91/following{/other_user}","gists_url":"https://api.github.com/users/dinhhoanglong91/gists{/gist_id}","starred_url":"https://api.github.com/users/dinhhoanglong91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinhhoanglong91/subscriptions","organizations_url":"https://api.github.com/users/dinhhoanglong91/orgs","repos_url":"https://api.github.com/users/dinhhoanglong91/repos","events_url":"https://api.github.com/users/dinhhoanglong91/events{/privacy}","received_events_url":"https://api.github.com/users/dinhhoanglong91/received_events","type":"User","site_admin":false},"body":"Remove it","created_at":"2015-09-03T06:55:26Z","updated_at":"2015-09-03T06:55:26Z","html_url":"https://github.com/framgia/fels_75/pull/12#discussion_r38617518","pull_request_url":"https://api.github.com/repos/framgia/fels_75/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_75/pulls/comments/38617518"},"html":{"href":"https://github.com/framgia/fels_75/pull/12#discussion_r38617518"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_75/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_75/pulls/12","id":44068092,"html_url":"https://github.com/framgia/fels_75/pull/12","diff_url":"https://github.com/framgia/fels_75/pull/12.diff","patch_url":"https://github.com/framgia/fels_75/pull/12.patch","issue_url":"https://api.github.com/repos/framgia/fels_75/issues/12","number":12,"state":"open","locked":false,"title":"Do lesson","user":{"login":"MichalPlachyFramgia","id":12692498,"avatar_url":"https://avatars.githubusercontent.com/u/12692498?v=3","gravatar_id":"","url":"https://api.github.com/users/MichalPlachyFramgia","html_url":"https://github.com/MichalPlachyFramgia","followers_url":"https://api.github.com/users/MichalPlachyFramgia/followers","following_url":"https://api.github.com/users/MichalPlachyFramgia/following{/other_user}","gists_url":"https://api.github.com/users/MichalPlachyFramgia/gists{/gist_id}","starred_url":"https://api.github.com/users/MichalPlachyFramgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichalPlachyFramgia/subscriptions","organizations_url":"https://api.github.com/users/MichalPlachyFramgia/orgs","repos_url":"https://api.github.com/users/MichalPlachyFramgia/repos","events_url":"https://api.github.com/users/MichalPlachyFramgia/events{/privacy}","received_events_url":"https://api.github.com/users/MichalPlachyFramgia/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-03T04:16:51Z","updated_at":"2015-09-03T06:55:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c142723dbcb83e0c78d9a5fc20685304cf64ed9d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_75/pulls/12/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_75/pulls/12/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_75/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_75/issues/12/comments","statuses_url":"https://api.github.com/repos/framgia/fels_75/statuses/1d9ff6f3e15b73cd700534eb3cd0320bdd798544","head":{"label":"MichalPlachyFramgia:word_filter","ref":"word_filter","sha":"1d9ff6f3e15b73cd700534eb3cd0320bdd798544","user":{"login":"MichalPlachyFramgia","id":12692498,"avatar_url":"https://avatars.githubusercontent.com/u/12692498?v=3","gravatar_id":"","url":"https://api.github.com/users/MichalPlachyFramgia","html_url":"https://github.com/MichalPlachyFramgia","followers_url":"https://api.github.com/users/MichalPlachyFramgia/followers","following_url":"https://api.github.com/users/MichalPlachyFramgia/following{/other_user}","gists_url":"https://api.github.com/users/MichalPlachyFramgia/gists{/gist_id}","starred_url":"https://api.github.com/users/MichalPlachyFramgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichalPlachyFramgia/subscriptions","organizations_url":"https://api.github.com/users/MichalPlachyFramgia/orgs","repos_url":"https://api.github.com/users/MichalPlachyFramgia/repos","events_url":"https://api.github.com/users/MichalPlachyFramgia/events{/privacy}","received_events_url":"https://api.github.com/users/MichalPlachyFramgia/received_events","type":"User","site_admin":false},"repo":{"id":40957574,"name":"fels_75","full_name":"MichalPlachyFramgia/fels_75","owner":{"login":"MichalPlachyFramgia","id":12692498,"avatar_url":"https://avatars.githubusercontent.com/u/12692498?v=3","gravatar_id":"","url":"https://api.github.com/users/MichalPlachyFramgia","html_url":"https://github.com/MichalPlachyFramgia","followers_url":"https://api.github.com/users/MichalPlachyFramgia/followers","following_url":"https://api.github.com/users/MichalPlachyFramgia/following{/other_user}","gists_url":"https://api.github.com/users/MichalPlachyFramgia/gists{/gist_id}","starred_url":"https://api.github.com/users/MichalPlachyFramgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichalPlachyFramgia/subscriptions","organizations_url":"https://api.github.com/users/MichalPlachyFramgia/orgs","repos_url":"https://api.github.com/users/MichalPlachyFramgia/repos","events_url":"https://api.github.com/users/MichalPlachyFramgia/events{/privacy}","received_events_url":"https://api.github.com/users/MichalPlachyFramgia/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MichalPlachyFramgia/fels_75","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75","forks_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/forks","keys_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/teams","hooks_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/hooks","issue_events_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/issues/events{/number}","events_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/events","assignees_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/assignees{/user}","branches_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/branches{/branch}","tags_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/tags","blobs_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/git/refs{/sha}","trees_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/statuses/{sha}","languages_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/languages","stargazers_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/stargazers","contributors_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/contributors","subscribers_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/subscribers","subscription_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/subscription","commits_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/commits{/sha}","git_commits_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/git/commits{/sha}","comments_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/comments{/number}","issue_comment_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/issues/comments{/number}","contents_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/contents/{+path}","compare_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/merges","archive_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/downloads","issues_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/issues{/number}","pulls_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/pulls{/number}","milestones_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/milestones{/number}","notifications_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/labels{/name}","releases_url":"https://api.github.com/repos/MichalPlachyFramgia/fels_75/releases{/id}","created_at":"2015-08-18T07:33:01Z","updated_at":"2015-08-18T07:30:40Z","pushed_at":"2015-09-03T06:40:43Z","git_url":"git://github.com/MichalPlachyFramgia/fels_75.git","ssh_url":"git@github.com:MichalPlachyFramgia/fels_75.git","clone_url":"https://github.com/MichalPlachyFramgia/fels_75.git","svn_url":"https://github.com/MichalPlachyFramgia/fels_75","homepage":null,"size":215,"stargazers_count":0,"watchers_count":0,"language":null,"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":"framgia:develop","ref":"develop","sha":"4e95a544fbe7804ba79144156163e82989b2a200","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":40957476,"name":"fels_75","full_name":"framgia/fels_75","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/fels_75","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_75","forks_url":"https://api.github.com/repos/framgia/fels_75/forks","keys_url":"https://api.github.com/repos/framgia/fels_75/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_75/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_75/teams","hooks_url":"https://api.github.com/repos/framgia/fels_75/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_75/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_75/events","assignees_url":"https://api.github.com/repos/framgia/fels_75/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_75/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_75/tags","blobs_url":"https://api.github.com/repos/framgia/fels_75/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_75/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_75/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_75/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_75/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_75/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_75/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_75/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_75/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_75/subscription","commits_url":"https://api.github.com/repos/framgia/fels_75/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_75/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_75/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_75/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_75/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_75/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_75/merges","archive_url":"https://api.github.com/repos/framgia/fels_75/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_75/downloads","issues_url":"https://api.github.com/repos/framgia/fels_75/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_75/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_75/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_75/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_75/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_75/releases{/id}","created_at":"2015-08-18T07:30:40Z","updated_at":"2015-08-18T07:30:40Z","pushed_at":"2015-09-03T06:40:44Z","git_url":"git://github.com/framgia/fels_75.git","ssh_url":"git@github.com:framgia/fels_75.git","clone_url":"https://github.com/framgia/fels_75.git","svn_url":"https://github.com/framgia/fels_75","homepage":null,"size":675,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_75/pulls/12"},"html":{"href":"https://github.com/framgia/fels_75/pull/12"},"issue":{"href":"https://api.github.com/repos/framgia/fels_75/issues/12"},"comments":{"href":"https://api.github.com/repos/framgia/fels_75/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_75/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_75/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_75/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_75/statuses/1d9ff6f3e15b73cd700534eb3cd0320bdd798544"}}}}