{"action":"created","comment":{"url":"https://api.github.com/repos/codex-team/codex.edu/pulls/comments/107344081","pull_request_review_id":28306532,"id":107344081,"diff_hunk":"@@ -0,0 +1,65 @@\n+<?php\n+\n+class Controller_Page_Index extends Controller_Base_preDispatch\n+{\n+\n+    public function action_show() {\n+\n+        $id  = $this->request->param('id');\n+        $uri = $this->request->param('uri');\n+\n+        $page = new Model_Page($id);\n+\n+        if (!$page->id || $page->status == Model_Page::STATUS_REMOVED_PAGE) {\n+\n+            throw new HTTP_Exception_404();\n+            //self::error_page('Запрашиваемая страница не найдена');\n+            //return FALSE;\n+        }\n+\n+        if ($uri != $page->uri) {\n+            $this->redirect('/p/' . $page->id . '/' . $page->uri);\n+        }\n+\n+        $this->view['can_modify_this_page'] = $this->user->id == $page->author->id;\n+        $this->view['page']                 = $page;","path":"application/classes/Controller/Page/Index.php","position":25,"original_position":25,"commit_id":"22ec46233de26a0120940a028cbf9b5b936cf4f2","original_commit_id":"22ec46233de26a0120940a028cbf9b5b936cf4f2","user":{"login":"neSpecc","id":3684889,"avatar_url":"https://avatars3.githubusercontent.com/u/3684889?v=3","gravatar_id":"","url":"https://api.github.com/users/neSpecc","html_url":"https://github.com/neSpecc","followers_url":"https://api.github.com/users/neSpecc/followers","following_url":"https://api.github.com/users/neSpecc/following{/other_user}","gists_url":"https://api.github.com/users/neSpecc/gists{/gist_id}","starred_url":"https://api.github.com/users/neSpecc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neSpecc/subscriptions","organizations_url":"https://api.github.com/users/neSpecc/orgs","repos_url":"https://api.github.com/users/neSpecc/repos","events_url":"https://api.github.com/users/neSpecc/events{/privacy}","received_events_url":"https://api.github.com/users/neSpecc/received_events","type":"User","site_admin":false},"body":"там в модели больше нету $this->blocks, теперь его надо вызывать снаружи\r\n```php\r\n$page->blocks = $page->getBlocks( TRUE ); // $escapeHTML = true\r\n```\r\nЭто сделано для входного параметра `$escapeHTML`; Вынесли из модели чтобы не передавать в конструктор, а оттуда гонять по всем функциям, но это обсуждаемо.\r\n\r\n`$escapeHTML` — флаг, который сообщает бэкенду редактора что надо прогонять поля плагинов через htmlspecialchars(), чтобы их можно было использовать на выводе. По умолчанию он `false`, для режима редактирования. Сейчас используется только в плагине Attaches — например, если ввести в тайтл файла строку `File <b>title</b>`, то она так и выведется пользователю, а не станет жирной. В других плагинах пока такая проблема есть.\r\n\r\n","created_at":"2017-03-22T07:09:28Z","updated_at":"2017-03-22T07:23:06Z","html_url":"https://github.com/codex-team/codex.edu/pull/216#discussion_r107344081","pull_request_url":"https://api.github.com/repos/codex-team/codex.edu/pulls/216","_links":{"self":{"href":"https://api.github.com/repos/codex-team/codex.edu/pulls/comments/107344081"},"html":{"href":"https://github.com/codex-team/codex.edu/pull/216#discussion_r107344081"},"pull_request":{"href":"https://api.github.com/repos/codex-team/codex.edu/pulls/216"}}},"pull_request":{"url":"https://api.github.com/repos/codex-team/codex.edu/pulls/216","id":111909737,"html_url":"https://github.com/codex-team/codex.edu/pull/216","diff_url":"https://github.com/codex-team/codex.edu/pull/216.diff","patch_url":"https://github.com/codex-team/codex.edu/pull/216.patch","issue_url":"https://api.github.com/repos/codex-team/codex.edu/issues/216","number":216,"state":"open","locked":false,"title":"Pages","user":{"login":"gohabereg","id":23050529,"avatar_url":"https://avatars3.githubusercontent.com/u/23050529?v=3","gravatar_id":"","url":"https://api.github.com/users/gohabereg","html_url":"https://github.com/gohabereg","followers_url":"https://api.github.com/users/gohabereg/followers","following_url":"https://api.github.com/users/gohabereg/following{/other_user}","gists_url":"https://api.github.com/users/gohabereg/gists{/gist_id}","starred_url":"https://api.github.com/users/gohabereg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gohabereg/subscriptions","organizations_url":"https://api.github.com/users/gohabereg/orgs","repos_url":"https://api.github.com/users/gohabereg/repos","events_url":"https://api.github.com/users/gohabereg/events{/privacy}","received_events_url":"https://api.github.com/users/gohabereg/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-03-22T00:33:28Z","updated_at":"2017-03-22T07:23:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eeb90ab9b159c24e9a182918830a5bf79db9b822","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codex-team/codex.edu/pulls/216/commits","review_comments_url":"https://api.github.com/repos/codex-team/codex.edu/pulls/216/comments","review_comment_url":"https://api.github.com/repos/codex-team/codex.edu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codex-team/codex.edu/issues/216/comments","statuses_url":"https://api.github.com/repos/codex-team/codex.edu/statuses/22ec46233de26a0120940a028cbf9b5b936cf4f2","head":{"label":"codex-team:pages","ref":"pages","sha":"22ec46233de26a0120940a028cbf9b5b936cf4f2","user":{"login":"codex-team","id":16060815,"avatar_url":"https://avatars3.githubusercontent.com/u/16060815?v=3","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"repo":{"id":46662693,"name":"codex.edu","full_name":"codex-team/codex.edu","owner":{"login":"codex-team","id":16060815,"avatar_url":"https://avatars3.githubusercontent.com/u/16060815?v=3","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codex-team/codex.edu","description":"Project «Codex Education»","fork":false,"url":"https://api.github.com/repos/codex-team/codex.edu","forks_url":"https://api.github.com/repos/codex-team/codex.edu/forks","keys_url":"https://api.github.com/repos/codex-team/codex.edu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codex-team/codex.edu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codex-team/codex.edu/teams","hooks_url":"https://api.github.com/repos/codex-team/codex.edu/hooks","issue_events_url":"https://api.github.com/repos/codex-team/codex.edu/issues/events{/number}","events_url":"https://api.github.com/repos/codex-team/codex.edu/events","assignees_url":"https://api.github.com/repos/codex-team/codex.edu/assignees{/user}","branches_url":"https://api.github.com/repos/codex-team/codex.edu/branches{/branch}","tags_url":"https://api.github.com/repos/codex-team/codex.edu/tags","blobs_url":"https://api.github.com/repos/codex-team/codex.edu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codex-team/codex.edu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codex-team/codex.edu/git/refs{/sha}","trees_url":"https://api.github.com/repos/codex-team/codex.edu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codex-team/codex.edu/statuses/{sha}","languages_url":"https://api.github.com/repos/codex-team/codex.edu/languages","stargazers_url":"https://api.github.com/repos/codex-team/codex.edu/stargazers","contributors_url":"https://api.github.com/repos/codex-team/codex.edu/contributors","subscribers_url":"https://api.github.com/repos/codex-team/codex.edu/subscribers","subscription_url":"https://api.github.com/repos/codex-team/codex.edu/subscription","commits_url":"https://api.github.com/repos/codex-team/codex.edu/commits{/sha}","git_commits_url":"https://api.github.com/repos/codex-team/codex.edu/git/commits{/sha}","comments_url":"https://api.github.com/repos/codex-team/codex.edu/comments{/number}","issue_comment_url":"https://api.github.com/repos/codex-team/codex.edu/issues/comments{/number}","contents_url":"https://api.github.com/repos/codex-team/codex.edu/contents/{+path}","compare_url":"https://api.github.com/repos/codex-team/codex.edu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codex-team/codex.edu/merges","archive_url":"https://api.github.com/repos/codex-team/codex.edu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codex-team/codex.edu/downloads","issues_url":"https://api.github.com/repos/codex-team/codex.edu/issues{/number}","pulls_url":"https://api.github.com/repos/codex-team/codex.edu/pulls{/number}","milestones_url":"https://api.github.com/repos/codex-team/codex.edu/milestones{/number}","notifications_url":"https://api.github.com/repos/codex-team/codex.edu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codex-team/codex.edu/labels{/name}","releases_url":"https://api.github.com/repos/codex-team/codex.edu/releases{/id}","deployments_url":"https://api.github.com/repos/codex-team/codex.edu/deployments","created_at":"2015-11-22T13:51:50Z","updated_at":"2016-11-22T13:40:37Z","pushed_at":"2017-03-22T06:42:05Z","git_url":"git://github.com/codex-team/codex.edu.git","ssh_url":"git@github.com:codex-team/codex.edu.git","clone_url":"https://github.com/codex-team/codex.edu.git","svn_url":"https://github.com/codex-team/codex.edu","homepage":null,"size":6932,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":24,"forks":0,"open_issues":24,"watchers":2,"default_branch":"master"}},"base":{"label":"codex-team:master","ref":"master","sha":"fe1f26ce64c006d3829c158fcd6d9c7022739787","user":{"login":"codex-team","id":16060815,"avatar_url":"https://avatars3.githubusercontent.com/u/16060815?v=3","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"repo":{"id":46662693,"name":"codex.edu","full_name":"codex-team/codex.edu","owner":{"login":"codex-team","id":16060815,"avatar_url":"https://avatars3.githubusercontent.com/u/16060815?v=3","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codex-team/codex.edu","description":"Project «Codex Education»","fork":false,"url":"https://api.github.com/repos/codex-team/codex.edu","forks_url":"https://api.github.com/repos/codex-team/codex.edu/forks","keys_url":"https://api.github.com/repos/codex-team/codex.edu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codex-team/codex.edu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codex-team/codex.edu/teams","hooks_url":"https://api.github.com/repos/codex-team/codex.edu/hooks","issue_events_url":"https://api.github.com/repos/codex-team/codex.edu/issues/events{/number}","events_url":"https://api.github.com/repos/codex-team/codex.edu/events","assignees_url":"https://api.github.com/repos/codex-team/codex.edu/assignees{/user}","branches_url":"https://api.github.com/repos/codex-team/codex.edu/branches{/branch}","tags_url":"https://api.github.com/repos/codex-team/codex.edu/tags","blobs_url":"https://api.github.com/repos/codex-team/codex.edu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codex-team/codex.edu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codex-team/codex.edu/git/refs{/sha}","trees_url":"https://api.github.com/repos/codex-team/codex.edu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codex-team/codex.edu/statuses/{sha}","languages_url":"https://api.github.com/repos/codex-team/codex.edu/languages","stargazers_url":"https://api.github.com/repos/codex-team/codex.edu/stargazers","contributors_url":"https://api.github.com/repos/codex-team/codex.edu/contributors","subscribers_url":"https://api.github.com/repos/codex-team/codex.edu/subscribers","subscription_url":"https://api.github.com/repos/codex-team/codex.edu/subscription","commits_url":"https://api.github.com/repos/codex-team/codex.edu/commits{/sha}","git_commits_url":"https://api.github.com/repos/codex-team/codex.edu/git/commits{/sha}","comments_url":"https://api.github.com/repos/codex-team/codex.edu/comments{/number}","issue_comment_url":"https://api.github.com/repos/codex-team/codex.edu/issues/comments{/number}","contents_url":"https://api.github.com/repos/codex-team/codex.edu/contents/{+path}","compare_url":"https://api.github.com/repos/codex-team/codex.edu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codex-team/codex.edu/merges","archive_url":"https://api.github.com/repos/codex-team/codex.edu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codex-team/codex.edu/downloads","issues_url":"https://api.github.com/repos/codex-team/codex.edu/issues{/number}","pulls_url":"https://api.github.com/repos/codex-team/codex.edu/pulls{/number}","milestones_url":"https://api.github.com/repos/codex-team/codex.edu/milestones{/number}","notifications_url":"https://api.github.com/repos/codex-team/codex.edu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codex-team/codex.edu/labels{/name}","releases_url":"https://api.github.com/repos/codex-team/codex.edu/releases{/id}","deployments_url":"https://api.github.com/repos/codex-team/codex.edu/deployments","created_at":"2015-11-22T13:51:50Z","updated_at":"2016-11-22T13:40:37Z","pushed_at":"2017-03-22T06:42:05Z","git_url":"git://github.com/codex-team/codex.edu.git","ssh_url":"git@github.com:codex-team/codex.edu.git","clone_url":"https://github.com/codex-team/codex.edu.git","svn_url":"https://github.com/codex-team/codex.edu","homepage":null,"size":6932,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":24,"forks":0,"open_issues":24,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codex-team/codex.edu/pulls/216"},"html":{"href":"https://github.com/codex-team/codex.edu/pull/216"},"issue":{"href":"https://api.github.com/repos/codex-team/codex.edu/issues/216"},"comments":{"href":"https://api.github.com/repos/codex-team/codex.edu/issues/216/comments"},"review_comments":{"href":"https://api.github.com/repos/codex-team/codex.edu/pulls/216/comments"},"review_comment":{"href":"https://api.github.com/repos/codex-team/codex.edu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codex-team/codex.edu/pulls/216/commits"},"statuses":{"href":"https://api.github.com/repos/codex-team/codex.edu/statuses/22ec46233de26a0120940a028cbf9b5b936cf4f2"}}}}
{"actor":{"display_login":"neSpecc"}}