GitHub PullRequestReviewCommentEvent at 2014-09-25 03:43:12
Repository: dietcake
Actor: jcoconut
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jcoconut/dietcake/pulls/comments/18013677","id":18013677,"diff_hunk":"@@ -0,0 +1,228 @@\n+<?php\n+class AdminController extends AppController\n+{\n+    /**\n+    * admin home page\n+    */\n+    public function index()\n+    {\n+        redirect_not_admin();\n+        $klubs = Klub::getKlubs();\n+        $this->set(get_defined_vars());    \n+    }\n+\n+    /**\n+    * add klub\n+    */\n+    public function add_klub()\n+    {\n+        redirect_not_admin();\n+        $klub = new Klub();\n+        $page = Param::get('page_next', 'add_klub');\n+        switch ($page) {\n+\n+            case 'add_klub':\n+\n+                break;\n+\n+            case 'klub_ok': \n+                $klub->klub_name = Param::get('klub_name');\n+                $klub->klub_details = Param::get('klub_details');\n+                try {\n+    \n+                    $klub->addKlub();\n+                    flash_message('message', 'Klub has been Added!');\n+                    flash_message('positive_message', true);\n+                    redirect('index');\n+                   \n+                } catch (ValidationException $e) {\n+                    $page = 'add_klub';\n+                }\n+                break;\n+            default:\n+                throw new NotFoundException(\"{$page} is not found\");\n+                break;\n+        }\n+        $this->set(get_defined_vars());\n+        $this->render($page);    \n+    }\n+\n+    /**\n+    * edit klub\n+    */\n+    public function edit_klub()\n+    {\n+        redirect_not_admin();\n+        $klub = new Klub();\n+        $selected_klub = Klub::getKlub(Param::get('klub_id'));\n+        $page = Param::get('page_next', 'edit_klub');\n+        switch ($page) {\n+\n+            case 'edit_klub':\n+\n+                break;\n+\n+            case 'klub_ok': \n+                $klub->klub_id = Param::get('klub_id');\n+                $klub->klub_name = Param::get('klub_name');\n+                $klub->klub_details = Param::get('klub_details');\n+                $klub->current_name = $selected_klub['klub_name'];\n+                try {\n+                    $klub->editKlub();\n+                    flash_message('message', 'Klub has been Edited!');\n+                    flash_message('positive_message', 1);\n+                    redirect('index');   \n+                } catch (ValidationException $e) {\n+                    $page = 'edit_klub';\n+                }\n+                break;\n+            default:\n+                throw new NotFoundException(\"{$page} is not found\");\n+                break;\n+        }\n+        $this->set(get_defined_vars());\n+        $this->render($page);    \n+    }\n+\n+    /**\n+    * delete klub\n+    */\n+    public function delete_klub()\n+    {\n+        redirect_not_admin();\n+        $klub = new Klub();    \n+        $klub->klub_id = Param::get('klub_id');\n+        $deleted = $klub->deleteKlub();","path":"app/controllers/admin_controller.php","position":null,"original_position":95,"commit_id":"59d289de4d90c9bf212129fc9b6f82a44dfa8c61","original_commit_id":"732399b60718c4fe9fc3285ae96b16a914e968ca","user":{"login":"jcoconut","id":8285923,"avatar_url":"https://avatars.githubusercontent.com/u/8285923?v=2","gravatar_id":"","url":"https://api.github.com/users/jcoconut","html_url":"https://github.com/jcoconut","followers_url":"https://api.github.com/users/jcoconut/followers","following_url":"https://api.github.com/users/jcoconut/following{/other_user}","gists_url":"https://api.github.com/users/jcoconut/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoconut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoconut/subscriptions","organizations_url":"https://api.github.com/users/jcoconut/orgs","repos_url":"https://api.github.com/users/jcoconut/repos","events_url":"https://api.github.com/users/jcoconut/events{/privacy}","received_events_url":"https://api.github.com/users/jcoconut/received_events","type":"User","site_admin":false},"body":":+1: ","created_at":"2014-09-25T03:43:12Z","updated_at":"2014-09-25T03:43:12Z","html_url":"https://github.com/jcoconut/dietcake/pull/2#discussion_r18013677","pull_request_url":"https://api.github.com/repos/jcoconut/dietcake/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/jcoconut/dietcake/pulls/comments/18013677"},"html":{"href":"https://github.com/jcoconut/dietcake/pull/2#discussion_r18013677"},"pull_request":{"href":"https://api.github.com/repos/jcoconut/dietcake/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/jcoconut/dietcake/pulls/2","id":21351856,"html_url":"https://github.com/jcoconut/dietcake/pull/2","diff_url":"https://github.com/jcoconut/dietcake/pull/2.diff","patch_url":"https://github.com/jcoconut/dietcake/pull/2.patch","issue_url":"https://api.github.com/repos/jcoconut/dietcake/issues/2","number":2,"state":"open","locked":false,"title":"Project PR","user":{"login":"jcoconut","id":8285923,"avatar_url":"https://avatars.githubusercontent.com/u/8285923?v=2","gravatar_id":"","url":"https://api.github.com/users/jcoconut","html_url":"https://github.com/jcoconut","followers_url":"https://api.github.com/users/jcoconut/followers","following_url":"https://api.github.com/users/jcoconut/following{/other_user}","gists_url":"https://api.github.com/users/jcoconut/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoconut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoconut/subscriptions","organizations_url":"https://api.github.com/users/jcoconut/orgs","repos_url":"https://api.github.com/users/jcoconut/repos","events_url":"https://api.github.com/users/jcoconut/events{/privacy}","received_events_url":"https://api.github.com/users/jcoconut/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-17T08:38:02Z","updated_at":"2014-09-25T03:43:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40d4bb55c32efb53524356c1c4123bafe091707d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jcoconut/dietcake/pulls/2/commits","review_comments_url":"https://api.github.com/repos/jcoconut/dietcake/pulls/2/comments","review_comment_url":"https://api.github.com/repos/jcoconut/dietcake/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jcoconut/dietcake/issues/2/comments","statuses_url":"https://api.github.com/repos/jcoconut/dietcake/statuses/59d289de4d90c9bf212129fc9b6f82a44dfa8c61","head":{"label":"jcoconut:dev_1.1","ref":"dev_1.1","sha":"59d289de4d90c9bf212129fc9b6f82a44dfa8c61","user":{"login":"jcoconut","id":8285923,"avatar_url":"https://avatars.githubusercontent.com/u/8285923?v=2","gravatar_id":"","url":"https://api.github.com/users/jcoconut","html_url":"https://github.com/jcoconut","followers_url":"https://api.github.com/users/jcoconut/followers","following_url":"https://api.github.com/users/jcoconut/following{/other_user}","gists_url":"https://api.github.com/users/jcoconut/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoconut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoconut/subscriptions","organizations_url":"https://api.github.com/users/jcoconut/orgs","repos_url":"https://api.github.com/users/jcoconut/repos","events_url":"https://api.github.com/users/jcoconut/events{/privacy}","received_events_url":"https://api.github.com/users/jcoconut/received_events","type":"User","site_admin":false},"repo":{"id":23338266,"name":"dietcake","full_name":"jcoconut/dietcake","owner":{"login":"jcoconut","id":8285923,"avatar_url":"https://avatars.githubusercontent.com/u/8285923?v=2","gravatar_id":"","url":"https://api.github.com/users/jcoconut","html_url":"https://github.com/jcoconut","followers_url":"https://api.github.com/users/jcoconut/followers","following_url":"https://api.github.com/users/jcoconut/following{/other_user}","gists_url":"https://api.github.com/users/jcoconut/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoconut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoconut/subscriptions","organizations_url":"https://api.github.com/users/jcoconut/orgs","repos_url":"https://api.github.com/users/jcoconut/repos","events_url":"https://api.github.com/users/jcoconut/events{/privacy}","received_events_url":"https://api.github.com/users/jcoconut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jcoconut/dietcake","description":"","fork":false,"url":"https://api.github.com/repos/jcoconut/dietcake","forks_url":"https://api.github.com/repos/jcoconut/dietcake/forks","keys_url":"https://api.github.com/repos/jcoconut/dietcake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcoconut/dietcake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcoconut/dietcake/teams","hooks_url":"https://api.github.com/repos/jcoconut/dietcake/hooks","issue_events_url":"https://api.github.com/repos/jcoconut/dietcake/issues/events{/number}","events_url":"https://api.github.com/repos/jcoconut/dietcake/events","assignees_url":"https://api.github.com/repos/jcoconut/dietcake/assignees{/user}","branches_url":"https://api.github.com/repos/jcoconut/dietcake/branches{/branch}","tags_url":"https://api.github.com/repos/jcoconut/dietcake/tags","blobs_url":"https://api.github.com/repos/jcoconut/dietcake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcoconut/dietcake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcoconut/dietcake/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcoconut/dietcake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcoconut/dietcake/statuses/{sha}","languages_url":"https://api.github.com/repos/jcoconut/dietcake/languages","stargazers_url":"https://api.github.com/repos/jcoconut/dietcake/stargazers","contributors_url":"https://api.github.com/repos/jcoconut/dietcake/contributors","subscribers_url":"https://api.github.com/repos/jcoconut/dietcake/subscribers","subscription_url":"https://api.github.com/repos/jcoconut/dietcake/subscription","commits_url":"https://api.github.com/repos/jcoconut/dietcake/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcoconut/dietcake/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcoconut/dietcake/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcoconut/dietcake/issues/comments/{number}","contents_url":"https://api.github.com/repos/jcoconut/dietcake/contents/{+path}","compare_url":"https://api.github.com/repos/jcoconut/dietcake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcoconut/dietcake/merges","archive_url":"https://api.github.com/repos/jcoconut/dietcake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcoconut/dietcake/downloads","issues_url":"https://api.github.com/repos/jcoconut/dietcake/issues{/number}","pulls_url":"https://api.github.com/repos/jcoconut/dietcake/pulls{/number}","milestones_url":"https://api.github.com/repos/jcoconut/dietcake/milestones{/number}","notifications_url":"https://api.github.com/repos/jcoconut/dietcake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcoconut/dietcake/labels{/name}","releases_url":"https://api.github.com/repos/jcoconut/dietcake/releases{/id}","created_at":"2014-08-26T04:04:42Z","updated_at":"2014-09-04T07:07:13Z","pushed_at":"2014-09-25T03:43:06Z","git_url":"git://github.com/jcoconut/dietcake.git","ssh_url":"git@github.com:jcoconut/dietcake.git","clone_url":"https://github.com/jcoconut/dietcake.git","svn_url":"https://github.com/jcoconut/dietcake","homepage":null,"size":1996,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev_1.1"}},"base":{"label":"jcoconut:master","ref":"master","sha":"3462b73323769bb8f28ff96abe562f3f23effa84","user":{"login":"jcoconut","id":8285923,"avatar_url":"https://avatars.githubusercontent.com/u/8285923?v=2","gravatar_id":"","url":"https://api.github.com/users/jcoconut","html_url":"https://github.com/jcoconut","followers_url":"https://api.github.com/users/jcoconut/followers","following_url":"https://api.github.com/users/jcoconut/following{/other_user}","gists_url":"https://api.github.com/users/jcoconut/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoconut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoconut/subscriptions","organizations_url":"https://api.github.com/users/jcoconut/orgs","repos_url":"https://api.github.com/users/jcoconut/repos","events_url":"https://api.github.com/users/jcoconut/events{/privacy}","received_events_url":"https://api.github.com/users/jcoconut/received_events","type":"User","site_admin":false},"repo":{"id":23338266,"name":"dietcake","full_name":"jcoconut/dietcake","owner":{"login":"jcoconut","id":8285923,"avatar_url":"https://avatars.githubusercontent.com/u/8285923?v=2","gravatar_id":"","url":"https://api.github.com/users/jcoconut","html_url":"https://github.com/jcoconut","followers_url":"https://api.github.com/users/jcoconut/followers","following_url":"https://api.github.com/users/jcoconut/following{/other_user}","gists_url":"https://api.github.com/users/jcoconut/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoconut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoconut/subscriptions","organizations_url":"https://api.github.com/users/jcoconut/orgs","repos_url":"https://api.github.com/users/jcoconut/repos","events_url":"https://api.github.com/users/jcoconut/events{/privacy}","received_events_url":"https://api.github.com/users/jcoconut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jcoconut/dietcake","description":"","fork":false,"url":"https://api.github.com/repos/jcoconut/dietcake","forks_url":"https://api.github.com/repos/jcoconut/dietcake/forks","keys_url":"https://api.github.com/repos/jcoconut/dietcake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcoconut/dietcake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcoconut/dietcake/teams","hooks_url":"https://api.github.com/repos/jcoconut/dietcake/hooks","issue_events_url":"https://api.github.com/repos/jcoconut/dietcake/issues/events{/number}","events_url":"https://api.github.com/repos/jcoconut/dietcake/events","assignees_url":"https://api.github.com/repos/jcoconut/dietcake/assignees{/user}","branches_url":"https://api.github.com/repos/jcoconut/dietcake/branches{/branch}","tags_url":"https://api.github.com/repos/jcoconut/dietcake/tags","blobs_url":"https://api.github.com/repos/jcoconut/dietcake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcoconut/dietcake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcoconut/dietcake/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcoconut/dietcake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcoconut/dietcake/statuses/{sha}","languages_url":"https://api.github.com/repos/jcoconut/dietcake/languages","stargazers_url":"https://api.github.com/repos/jcoconut/dietcake/stargazers","contributors_url":"https://api.github.com/repos/jcoconut/dietcake/contributors","subscribers_url":"https://api.github.com/repos/jcoconut/dietcake/subscribers","subscription_url":"https://api.github.com/repos/jcoconut/dietcake/subscription","commits_url":"https://api.github.com/repos/jcoconut/dietcake/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcoconut/dietcake/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcoconut/dietcake/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcoconut/dietcake/issues/comments/{number}","contents_url":"https://api.github.com/repos/jcoconut/dietcake/contents/{+path}","compare_url":"https://api.github.com/repos/jcoconut/dietcake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcoconut/dietcake/merges","archive_url":"https://api.github.com/repos/jcoconut/dietcake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcoconut/dietcake/downloads","issues_url":"https://api.github.com/repos/jcoconut/dietcake/issues{/number}","pulls_url":"https://api.github.com/repos/jcoconut/dietcake/pulls{/number}","milestones_url":"https://api.github.com/repos/jcoconut/dietcake/milestones{/number}","notifications_url":"https://api.github.com/repos/jcoconut/dietcake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcoconut/dietcake/labels{/name}","releases_url":"https://api.github.com/repos/jcoconut/dietcake/releases{/id}","created_at":"2014-08-26T04:04:42Z","updated_at":"2014-09-04T07:07:13Z","pushed_at":"2014-09-25T03:43:06Z","git_url":"git://github.com/jcoconut/dietcake.git","ssh_url":"git@github.com:jcoconut/dietcake.git","clone_url":"https://github.com/jcoconut/dietcake.git","svn_url":"https://github.com/jcoconut/dietcake","homepage":null,"size":1996,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"dev_1.1"}},"_links":{"self":{"href":"https://api.github.com/repos/jcoconut/dietcake/pulls/2"},"html":{"href":"https://github.com/jcoconut/dietcake/pull/2"},"issue":{"href":"https://api.github.com/repos/jcoconut/dietcake/issues/2"},"comments":{"href":"https://api.github.com/repos/jcoconut/dietcake/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/jcoconut/dietcake/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/jcoconut/dietcake/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jcoconut/dietcake/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/jcoconut/dietcake/statuses/59d289de4d90c9bf212129fc9b6f82a44dfa8c61"}}}}