{"action":"created","comment":{"url":"https://api.github.com/repos/pkp/ojs/pulls/comments/89658224","pull_request_review_id":10203286,"id":89658224,"diff_hunk":"@@ -0,0 +1,147 @@\n+<?php \r\n+/**\r\n+ * @file controllers/grid/form/ExternalFeedForm.inc.php\r\n+ *\r\n+ * Copyright (c) 2014-2016 Simon Fraser University Library\r\n+ * Copyright (c) 2003-2016 John Willinsky\r\n+ * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.\r\n+ *\r\n+ * @class ExternalFeedForm\r\n+ * @ingroup controllers_grid_externalFeed\r\n+ *\r\n+ * Form to create and modify external feeds\r\n+ *\r\n+ */\r\n+\r\n+import('lib.pkp.classes.form.Form');\r\n+\r\n+class ExternalFeedForm extends Form {\r\n+\t/** @var int Context (press / journal) ID */\r\n+\tprotected $contextId;\r\n+\t\r\n+\t/** @var string Static page name */\r\n+\tprotected $feedId;\r\n+\t\r\n+\t/** @var ExternalFeedPlugin External feed plugin */\r\n+\tprotected $plugin;\r\n+\t\r\n+\t/**\r\n+\t * Constructor\r\n+\t * @param $externalFeedPlugin StaticPagesPlugin The static page plugin\r\n+\t * @param $contextId int Context ID\r\n+\t * @param $feedId int Static page ID (if any)\r\n+\t */\r\n+\tfunction __construct($externalFeedPlugin, $contextId, $feedId = null) {\r\n+\t\tparent::__construct($externalFeedPlugin->getTemplatePath() . '/editExternalFeedForm.tpl');\r\n+\t\t$this->contextId = $contextId;\r\n+\t\t$this->feedId = $feedId;\r\n+\t\t$this->plugin = $externalFeedPlugin;\r\n+\t\t\r\n+\t\t// Add form checks\r\n+\t\t$this->addCheck(new FormValidatorPost($this));\r\n+\t\t$this->addCheck(new FormValidatorCSRF($this));\r\n+\t\t$this->addCheck(new FormValidatorUrl($this, 'feedUrl', 'required', 'plugins.generic.externalFeed.form.feedUrlValid'));\r\n+\t\t$this->addCheck(new FormValidator($this, 'title', 'required', 'plugins.generic.externalFeed.form.titleRequired'));\r\n+\t}\r\n+\t\r\n+\t/**\r\n+\t * Initialize form data.\r\n+\t */\r\n+\tfunction initData() {\r\n+\t\tif ($this->feedId) {\r\n+\t\t\t$feedDao = DAORegistry::getDAO('ExternalFeedDAO');\r\n+\t\t\t$feed = $feedDao->getExternalFeed($this->feedId);\r\n+\t\t\t\r\n+\t\t\t$this->setData('feedUrl', $feed->getUrl());\r\n+\t\t\t$this->setData('title', $feed->getTitle(AppLocale::getLocale()));\r\n+\t\t\t$this->setData('displayHomepage', $feed->getDisplayHomepage());\r\n+\t\t\t$this->setData('displayBlock', $feed->getDisplayBlock());\r\n+\t\t\t$this->setData('limitItems', $feed->getLimitItems());\r\n+\t\t\t\r\n+\t\t\t$recentItems = (int) $feed->getRecentItems();\r\n+\t\t\tif ($recentItems > 0) {\r\n+\t\t\t\t$this->setData('recentItems', $feed->getRecentItems());\r\n+\t\t\t}\r\n+\t\t\telse {\r\n+\t\t\t\t$this->setData('recentItems', '');\r\n+\t\t\t}\r\n+\t\t}\r\n+\t}\r\n+\t\r\n+\t/**\r\n+\t * Assign form data to user-submitted data.\r\n+\t */\r\n+\tpublic function readInputData() {\r\n+\t\t$this->readUserVars(\r\n+\t\t\tarray(\r\n+\t\t\t\t'feedUrl',\r\n+\t\t\t\t'displayHomepage',\r\n+\t\t\t\t'displayBlock',\r\n+\t\t\t\t'limitItems',\r\n+\t\t\t\t'recentItems'\r\n+\t\t\t)\r\n+\t\t);\r\n+\t\t\r\n+\t\t$this->setData('title', Request::getUserVar('title')[AppLocale::getLocale()]);\r\n+\t\t\r\n+\t\t// Check that recent items value is a positive integer\r\n+\t\tif ((int) $this->getData('recentItems') <= 0) $this->setData('recentItems', '');\r\n+\t\t\r\n+\t\t// If recent items is selected, check that we have a value\r\n+\t\tif ($this->getData('limitItems')) {\r\n+\t\t\t$this->addCheck(new FormValidator($this, 'recentItems', 'required', 'plugins.generic.externalFeed.settings.recentItemsRequired'));\r\n+\t\t}\r\n+\t}\r\n+\t\r\n+\t/**\r\n+\t * @see Form::fetch\r","path":"plugins/generic/externalFeed/controllers/grid/form/ExternalFeedForm.inc.php","position":97,"original_position":97,"commit_id":"00b283cd82345e10514bb072443c00da4597fb4d","original_commit_id":"00b283cd82345e10514bb072443c00da4597fb4d","user":{"login":"asmecher","id":200411,"avatar_url":"https://avatars.githubusercontent.com/u/200411?v=3","gravatar_id":"","url":"https://api.github.com/users/asmecher","html_url":"https://github.com/asmecher","followers_url":"https://api.github.com/users/asmecher/followers","following_url":"https://api.github.com/users/asmecher/following{/other_user}","gists_url":"https://api.github.com/users/asmecher/gists{/gist_id}","starred_url":"https://api.github.com/users/asmecher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmecher/subscriptions","organizations_url":"https://api.github.com/users/asmecher/orgs","repos_url":"https://api.github.com/users/asmecher/repos","events_url":"https://api.github.com/users/asmecher/events{/privacy}","received_events_url":"https://api.github.com/users/asmecher/received_events","type":"User","site_admin":false},"body":"Doxygen doesn't \"import\" function parameter descriptions when you use `@see`, only with `@copydoc`. So you could either change this to `@copydoc` (if appropriate), or document all parameters and return type (if any) and stick with `@see`.","created_at":"2016-11-25T21:32:43Z","updated_at":"2016-11-25T21:32:43Z","html_url":"https://github.com/pkp/ojs/pull/1115#discussion_r89658224","pull_request_url":"https://api.github.com/repos/pkp/ojs/pulls/1115","_links":{"self":{"href":"https://api.github.com/repos/pkp/ojs/pulls/comments/89658224"},"html":{"href":"https://github.com/pkp/ojs/pull/1115#discussion_r89658224"},"pull_request":{"href":"https://api.github.com/repos/pkp/ojs/pulls/1115"}}},"pull_request":{"url":"https://api.github.com/repos/pkp/ojs/pulls/1115","id":95117206,"html_url":"https://github.com/pkp/ojs/pull/1115","diff_url":"https://github.com/pkp/ojs/pull/1115.diff","patch_url":"https://github.com/pkp/ojs/pull/1115.patch","issue_url":"https://api.github.com/repos/pkp/ojs/issues/1115","number":1115,"state":"open","locked":false,"title":"port external feed plugin to ojs3 #2027","user":{"login":"kaschioudi","id":4896270,"avatar_url":"https://avatars.githubusercontent.com/u/4896270?v=3","gravatar_id":"","url":"https://api.github.com/users/kaschioudi","html_url":"https://github.com/kaschioudi","followers_url":"https://api.github.com/users/kaschioudi/followers","following_url":"https://api.github.com/users/kaschioudi/following{/other_user}","gists_url":"https://api.github.com/users/kaschioudi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaschioudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaschioudi/subscriptions","organizations_url":"https://api.github.com/users/kaschioudi/orgs","repos_url":"https://api.github.com/users/kaschioudi/repos","events_url":"https://api.github.com/users/kaschioudi/events{/privacy}","received_events_url":"https://api.github.com/users/kaschioudi/received_events","type":"User","site_admin":false},"body":"https://github.com/pkp/pkp-lib/issues/2027\r\n\r\n@asmecher ","created_at":"2016-11-24T04:51:26Z","updated_at":"2016-11-25T21:32:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"006c70db151dca7f4452006f9e0097accce66fc2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pkp/ojs/pulls/1115/commits","review_comments_url":"https://api.github.com/repos/pkp/ojs/pulls/1115/comments","review_comment_url":"https://api.github.com/repos/pkp/ojs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pkp/ojs/issues/1115/comments","statuses_url":"https://api.github.com/repos/pkp/ojs/statuses/00b283cd82345e10514bb072443c00da4597fb4d","head":{"label":"kaschioudi:2027-fix","ref":"2027-fix","sha":"00b283cd82345e10514bb072443c00da4597fb4d","user":{"login":"kaschioudi","id":4896270,"avatar_url":"https://avatars.githubusercontent.com/u/4896270?v=3","gravatar_id":"","url":"https://api.github.com/users/kaschioudi","html_url":"https://github.com/kaschioudi","followers_url":"https://api.github.com/users/kaschioudi/followers","following_url":"https://api.github.com/users/kaschioudi/following{/other_user}","gists_url":"https://api.github.com/users/kaschioudi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaschioudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaschioudi/subscriptions","organizations_url":"https://api.github.com/users/kaschioudi/orgs","repos_url":"https://api.github.com/users/kaschioudi/repos","events_url":"https://api.github.com/users/kaschioudi/events{/privacy}","received_events_url":"https://api.github.com/users/kaschioudi/received_events","type":"User","site_admin":false},"repo":{"id":69818879,"name":"ojs","full_name":"kaschioudi/ojs","owner":{"login":"kaschioudi","id":4896270,"avatar_url":"https://avatars.githubusercontent.com/u/4896270?v=3","gravatar_id":"","url":"https://api.github.com/users/kaschioudi","html_url":"https://github.com/kaschioudi","followers_url":"https://api.github.com/users/kaschioudi/followers","following_url":"https://api.github.com/users/kaschioudi/following{/other_user}","gists_url":"https://api.github.com/users/kaschioudi/gists{/gist_id}","starred_url":"https://api.github.com/users/kaschioudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaschioudi/subscriptions","organizations_url":"https://api.github.com/users/kaschioudi/orgs","repos_url":"https://api.github.com/users/kaschioudi/repos","events_url":"https://api.github.com/users/kaschioudi/events{/privacy}","received_events_url":"https://api.github.com/users/kaschioudi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kaschioudi/ojs","description":"Open Journal Systems","fork":true,"url":"https://api.github.com/repos/kaschioudi/ojs","forks_url":"https://api.github.com/repos/kaschioudi/ojs/forks","keys_url":"https://api.github.com/repos/kaschioudi/ojs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaschioudi/ojs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaschioudi/ojs/teams","hooks_url":"https://api.github.com/repos/kaschioudi/ojs/hooks","issue_events_url":"https://api.github.com/repos/kaschioudi/ojs/issues/events{/number}","events_url":"https://api.github.com/repos/kaschioudi/ojs/events","assignees_url":"https://api.github.com/repos/kaschioudi/ojs/assignees{/user}","branches_url":"https://api.github.com/repos/kaschioudi/ojs/branches{/branch}","tags_url":"https://api.github.com/repos/kaschioudi/ojs/tags","blobs_url":"https://api.github.com/repos/kaschioudi/ojs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaschioudi/ojs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaschioudi/ojs/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaschioudi/ojs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaschioudi/ojs/statuses/{sha}","languages_url":"https://api.github.com/repos/kaschioudi/ojs/languages","stargazers_url":"https://api.github.com/repos/kaschioudi/ojs/stargazers","contributors_url":"https://api.github.com/repos/kaschioudi/ojs/contributors","subscribers_url":"https://api.github.com/repos/kaschioudi/ojs/subscribers","subscription_url":"https://api.github.com/repos/kaschioudi/ojs/subscription","commits_url":"https://api.github.com/repos/kaschioudi/ojs/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaschioudi/ojs/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaschioudi/ojs/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaschioudi/ojs/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaschioudi/ojs/contents/{+path}","compare_url":"https://api.github.com/repos/kaschioudi/ojs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaschioudi/ojs/merges","archive_url":"https://api.github.com/repos/kaschioudi/ojs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaschioudi/ojs/downloads","issues_url":"https://api.github.com/repos/kaschioudi/ojs/issues{/number}","pulls_url":"https://api.github.com/repos/kaschioudi/ojs/pulls{/number}","milestones_url":"https://api.github.com/repos/kaschioudi/ojs/milestones{/number}","notifications_url":"https://api.github.com/repos/kaschioudi/ojs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaschioudi/ojs/labels{/name}","releases_url":"https://api.github.com/repos/kaschioudi/ojs/releases{/id}","deployments_url":"https://api.github.com/repos/kaschioudi/ojs/deployments","created_at":"2016-10-02T20:02:04Z","updated_at":"2016-10-02T20:02:11Z","pushed_at":"2016-11-25T19:49:41Z","git_url":"git://github.com/kaschioudi/ojs.git","ssh_url":"git@github.com:kaschioudi/ojs.git","clone_url":"https://github.com/kaschioudi/ojs.git","svn_url":"https://github.com/kaschioudi/ojs","homepage":"http://pkp.sfu.ca/ojs","size":144625,"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":"master"}},"base":{"label":"pkp:master","ref":"master","sha":"67c29a053699a452fdacda9c8335992c8f32fd23","user":{"login":"pkp","id":130896,"avatar_url":"https://avatars.githubusercontent.com/u/130896?v=3","gravatar_id":"","url":"https://api.github.com/users/pkp","html_url":"https://github.com/pkp","followers_url":"https://api.github.com/users/pkp/followers","following_url":"https://api.github.com/users/pkp/following{/other_user}","gists_url":"https://api.github.com/users/pkp/gists{/gist_id}","starred_url":"https://api.github.com/users/pkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkp/subscriptions","organizations_url":"https://api.github.com/users/pkp/orgs","repos_url":"https://api.github.com/users/pkp/repos","events_url":"https://api.github.com/users/pkp/events{/privacy}","received_events_url":"https://api.github.com/users/pkp/received_events","type":"Organization","site_admin":false},"repo":{"id":375152,"name":"ojs","full_name":"pkp/ojs","owner":{"login":"pkp","id":130896,"avatar_url":"https://avatars.githubusercontent.com/u/130896?v=3","gravatar_id":"","url":"https://api.github.com/users/pkp","html_url":"https://github.com/pkp","followers_url":"https://api.github.com/users/pkp/followers","following_url":"https://api.github.com/users/pkp/following{/other_user}","gists_url":"https://api.github.com/users/pkp/gists{/gist_id}","starred_url":"https://api.github.com/users/pkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkp/subscriptions","organizations_url":"https://api.github.com/users/pkp/orgs","repos_url":"https://api.github.com/users/pkp/repos","events_url":"https://api.github.com/users/pkp/events{/privacy}","received_events_url":"https://api.github.com/users/pkp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pkp/ojs","description":"Open Journal Systems","fork":false,"url":"https://api.github.com/repos/pkp/ojs","forks_url":"https://api.github.com/repos/pkp/ojs/forks","keys_url":"https://api.github.com/repos/pkp/ojs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pkp/ojs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pkp/ojs/teams","hooks_url":"https://api.github.com/repos/pkp/ojs/hooks","issue_events_url":"https://api.github.com/repos/pkp/ojs/issues/events{/number}","events_url":"https://api.github.com/repos/pkp/ojs/events","assignees_url":"https://api.github.com/repos/pkp/ojs/assignees{/user}","branches_url":"https://api.github.com/repos/pkp/ojs/branches{/branch}","tags_url":"https://api.github.com/repos/pkp/ojs/tags","blobs_url":"https://api.github.com/repos/pkp/ojs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pkp/ojs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pkp/ojs/git/refs{/sha}","trees_url":"https://api.github.com/repos/pkp/ojs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pkp/ojs/statuses/{sha}","languages_url":"https://api.github.com/repos/pkp/ojs/languages","stargazers_url":"https://api.github.com/repos/pkp/ojs/stargazers","contributors_url":"https://api.github.com/repos/pkp/ojs/contributors","subscribers_url":"https://api.github.com/repos/pkp/ojs/subscribers","subscription_url":"https://api.github.com/repos/pkp/ojs/subscription","commits_url":"https://api.github.com/repos/pkp/ojs/commits{/sha}","git_commits_url":"https://api.github.com/repos/pkp/ojs/git/commits{/sha}","comments_url":"https://api.github.com/repos/pkp/ojs/comments{/number}","issue_comment_url":"https://api.github.com/repos/pkp/ojs/issues/comments{/number}","contents_url":"https://api.github.com/repos/pkp/ojs/contents/{+path}","compare_url":"https://api.github.com/repos/pkp/ojs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pkp/ojs/merges","archive_url":"https://api.github.com/repos/pkp/ojs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pkp/ojs/downloads","issues_url":"https://api.github.com/repos/pkp/ojs/issues{/number}","pulls_url":"https://api.github.com/repos/pkp/ojs/pulls{/number}","milestones_url":"https://api.github.com/repos/pkp/ojs/milestones{/number}","notifications_url":"https://api.github.com/repos/pkp/ojs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pkp/ojs/labels{/name}","releases_url":"https://api.github.com/repos/pkp/ojs/releases{/id}","deployments_url":"https://api.github.com/repos/pkp/ojs/deployments","created_at":"2009-11-16T21:19:14Z","updated_at":"2016-11-22T21:08:48Z","pushed_at":"2016-11-25T21:00:13Z","git_url":"git://github.com/pkp/ojs.git","ssh_url":"git@github.com:pkp/ojs.git","clone_url":"https://github.com/pkp/ojs.git","svn_url":"https://github.com/pkp/ojs","homepage":"http://pkp.sfu.ca/ojs","size":155778,"stargazers_count":277,"watchers_count":277,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":344,"mirror_url":null,"open_issues_count":34,"forks":344,"open_issues":34,"watchers":277,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pkp/ojs/pulls/1115"},"html":{"href":"https://github.com/pkp/ojs/pull/1115"},"issue":{"href":"https://api.github.com/repos/pkp/ojs/issues/1115"},"comments":{"href":"https://api.github.com/repos/pkp/ojs/issues/1115/comments"},"review_comments":{"href":"https://api.github.com/repos/pkp/ojs/pulls/1115/comments"},"review_comment":{"href":"https://api.github.com/repos/pkp/ojs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pkp/ojs/pulls/1115/commits"},"statuses":{"href":"https://api.github.com/repos/pkp/ojs/statuses/00b283cd82345e10514bb072443c00da4597fb4d"}}}}
{"actor":{"display_login":"asmecher"}}