{"action":"created","comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/86686750","pull_request_review_id":7332729,"id":86686750,"diff_hunk":"@@ -0,0 +1,71 @@\n+<?php\n+/**\n+ * @package     Joomla.Administrator\n+ * @subpackage  com_content\n+ *\n+ * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.\n+ * @license     GNU General Public License version 2 or later; see LICENSE.txt\n+ */\n+\n+defined('_JEXEC') or die;\n+\n+/**\n+ * The article controller\n+ *\n+ * @package     Joomla.Administrator\n+ * @subpackage  com_content\n+ * @since       __DEPLOY_VERSION__\n+ */\n+class ContentControllerArticle extends JControllerLegacy\n+{\n+\t/**\n+\t * Method to generate and store share token.\n+\t *\n+\t * @return  boolean   True if token successfully stored, false otherwise and internal error is set.","path":"components/com_content/controllers/article.json.php","position":24,"original_position":24,"commit_id":"8f383c63de76d9571079af192a522b04d66b5de0","original_commit_id":"45e5901ddfb25fe6f262dbfebccffa83fffb3f23","user":{"login":"zero-24","id":2596554,"avatar_url":"https://avatars.githubusercontent.com/u/2596554?v=3","gravatar_id":"","url":"https://api.github.com/users/zero-24","html_url":"https://github.com/zero-24","followers_url":"https://api.github.com/users/zero-24/followers","following_url":"https://api.github.com/users/zero-24/following{/other_user}","gists_url":"https://api.github.com/users/zero-24/gists{/gist_id}","starred_url":"https://api.github.com/users/zero-24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zero-24/subscriptions","organizations_url":"https://api.github.com/users/zero-24/orgs","repos_url":"https://api.github.com/users/zero-24/repos","events_url":"https://api.github.com/users/zero-24/events{/privacy}","received_events_url":"https://api.github.com/users/zero-24/received_events","type":"User","site_admin":false},"body":"there is no bool that got returned it is a JSON","created_at":"2016-11-06T13:48:47Z","updated_at":"2016-11-06T13:51:28Z","html_url":"https://github.com/joomla/joomla-cms/pull/12009#discussion_r86686750","pull_request_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/12009","_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/86686750"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/12009#discussion_r86686750"},"pull_request":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/12009"}}},"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/12009","id":84785581,"html_url":"https://github.com/joomla/joomla-cms/pull/12009","diff_url":"https://github.com/joomla/joomla-cms/pull/12009.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/12009.patch","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/12009","number":12009,"state":"open","locked":false,"title":"Shareable draft content feature","user":{"login":"roland-d","id":359377,"avatar_url":"https://avatars.githubusercontent.com/u/359377?v=3","gravatar_id":"","url":"https://api.github.com/users/roland-d","html_url":"https://github.com/roland-d","followers_url":"https://api.github.com/users/roland-d/followers","following_url":"https://api.github.com/users/roland-d/following{/other_user}","gists_url":"https://api.github.com/users/roland-d/gists{/gist_id}","starred_url":"https://api.github.com/users/roland-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roland-d/subscriptions","organizations_url":"https://api.github.com/users/roland-d/orgs","repos_url":"https://api.github.com/users/roland-d/repos","events_url":"https://api.github.com/users/roland-d/events{/privacy}","received_events_url":"https://api.github.com/users/roland-d/received_events","type":"User","site_admin":false},"body":"## Shareable draft content\n\nThis pull request adds a new feature called shareable draft content to Joomla. The goal \nof this feature is to provide the functionality of generating links that can be shared \nso users with this link can preview articles that have not yet been published.\n### Implementation\n\nThe shareable links are implemented in several views of the content area:\n- Articles list\n- Article editing in the back-end\n- Shared drafts view\n- Article editing in the front-end\n#### Articles list\n\nThe articles list has a new button called **Share draft**. This button generates one link per selected article.\n#### Article editing in the back-end\n\nThe article editing page has a new button called **Share draft**. This button generates a link for the current article and\nshows the generated link on the screen.\n#### Shared drafts view\n\nThe shared drafts list lists all the created shared links. Here the shared links can be managed. The article titles link\nto the article editing page if the user has permission to edit the given article.\n#### Article editing in the front-end\n\nThe article editing page has a new button called **Share draft**. This button generates a link for the current article and\nshows the generated link on the screen.\n### Link generation\n\nWhen a link is generated for the first time, a 16-character token will be created for that specific article. This token\nis unique for each article and allows the user with the URL and token to access an unpublished article.\n\nA token cannot be directly regenerated for an article as an existing token will always be returned. To create a new\ntoken, the existing shared link needs to be deleted first from the Shared Drafts view.\n#### Regular URL\n\nBy default a regular URL will be created.\n#### SEF and Redirect Manager enabled\n\nIn case both SEF and the Redirect Manager are enabled, a SEF URL will be created so an easier to read URL can be used. The \nlink is generated based on the alias of the article. Once a SEF URL is generated, this will be added to the Redirect\nManager table so it can be used to redirect the user to the correct article.\n### Test instructions\n\nThe following instructions are based on regular URLs, make sure SEF is turned off.\n#### Test single article link creation in back-end\n1. Apply patch\n2. Go to Content -> Articles\n3. Create a new article\n4. Notice there is **no** share draft button\n5. Add a title and some content\n6. Make sure the article is unpublished\n7. Save the article\n8. Notice **there is a** share draft button\n9. Click on the Share draft button\n10. A green box appears with the shareable link\n11. Open the link and check that you can view the article\n12. Close the article\n#### Test multiple articles link creation\n1. Select one or more articles\n2. Click on the Share draft button\n3. Notice there is a message saying that x links have been generated\n4. Go to the Shared Drafts view en check that the articles and links are there\n#### Check deletion of shareable links\n1. Go to the Shared Drafts view\n2. Select one or more links\n3. Click the Delete button\n4. Notice the message that one or more drafts have been deleted\n#### Test single article link creation in front-end\n1. Login to the front-end\n2. Create a new article\n3. Notice there is **no** share draft button\n4. Login to the front-end\n5. Edit an existing article\n6. Notice **there is a** share draft button\n7. Click on the Share draft button\n8. A green box appears with the shareable link\n9. Open the link and check that you can view the article\n10. Close the article\n#### SEF URLs\n1. Login to the back-end\n2. Go to System -> Global Configuration\n3. Enable SEF URLs\n4. Go to Components -> Redirects\n5. Make sure that the Redirects plugin is enabled\n6. Repeat the tests above and check that the generated URL is a SEF URL\n\nFinally tagging @puneet0191 @chrisdavenport \n","created_at":"2016-09-11T12:51:32Z","updated_at":"2016-11-06T13:51:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d63238286b97c4165ac1d96b6d8af00c7d6008b9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/12009/commits","review_comments_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/12009/comments","review_comment_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/12009/comments","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/8f383c63de76d9571079af192a522b04d66b5de0","head":{"label":"roland-d:shareable-draft-content-feature","ref":"shareable-draft-content-feature","sha":"8f383c63de76d9571079af192a522b04d66b5de0","user":{"login":"roland-d","id":359377,"avatar_url":"https://avatars.githubusercontent.com/u/359377?v=3","gravatar_id":"","url":"https://api.github.com/users/roland-d","html_url":"https://github.com/roland-d","followers_url":"https://api.github.com/users/roland-d/followers","following_url":"https://api.github.com/users/roland-d/following{/other_user}","gists_url":"https://api.github.com/users/roland-d/gists{/gist_id}","starred_url":"https://api.github.com/users/roland-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roland-d/subscriptions","organizations_url":"https://api.github.com/users/roland-d/orgs","repos_url":"https://api.github.com/users/roland-d/repos","events_url":"https://api.github.com/users/roland-d/events{/privacy}","received_events_url":"https://api.github.com/users/roland-d/received_events","type":"User","site_admin":false},"repo":{"id":19659596,"name":"joomla-cms","full_name":"roland-d/joomla-cms","owner":{"login":"roland-d","id":359377,"avatar_url":"https://avatars.githubusercontent.com/u/359377?v=3","gravatar_id":"","url":"https://api.github.com/users/roland-d","html_url":"https://github.com/roland-d","followers_url":"https://api.github.com/users/roland-d/followers","following_url":"https://api.github.com/users/roland-d/following{/other_user}","gists_url":"https://api.github.com/users/roland-d/gists{/gist_id}","starred_url":"https://api.github.com/users/roland-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roland-d/subscriptions","organizations_url":"https://api.github.com/users/roland-d/orgs","repos_url":"https://api.github.com/users/roland-d/repos","events_url":"https://api.github.com/users/roland-d/events{/privacy}","received_events_url":"https://api.github.com/users/roland-d/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/roland-d/joomla-cms","description":"Home of the Joomla! Content Management System","fork":true,"url":"https://api.github.com/repos/roland-d/joomla-cms","forks_url":"https://api.github.com/repos/roland-d/joomla-cms/forks","keys_url":"https://api.github.com/repos/roland-d/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/roland-d/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/roland-d/joomla-cms/teams","hooks_url":"https://api.github.com/repos/roland-d/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/roland-d/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/roland-d/joomla-cms/events","assignees_url":"https://api.github.com/repos/roland-d/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/roland-d/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/roland-d/joomla-cms/tags","blobs_url":"https://api.github.com/repos/roland-d/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/roland-d/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/roland-d/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/roland-d/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/roland-d/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/roland-d/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/roland-d/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/roland-d/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/roland-d/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/roland-d/joomla-cms/subscription","commits_url":"https://api.github.com/repos/roland-d/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/roland-d/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/roland-d/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/roland-d/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/roland-d/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/roland-d/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/roland-d/joomla-cms/merges","archive_url":"https://api.github.com/repos/roland-d/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/roland-d/joomla-cms/downloads","issues_url":"https://api.github.com/repos/roland-d/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/roland-d/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/roland-d/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/roland-d/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/roland-d/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/roland-d/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/roland-d/joomla-cms/deployments","created_at":"2014-05-11T05:52:36Z","updated_at":"2016-01-15T22:35:17Z","pushed_at":"2016-11-06T13:33:46Z","git_url":"git://github.com/roland-d/joomla-cms.git","ssh_url":"git@github.com:roland-d/joomla-cms.git","clone_url":"https://github.com/roland-d/joomla-cms.git","svn_url":"https://github.com/roland-d/joomla-cms","homepage":"http://joomla.org","size":163226,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"staging"}},"base":{"label":"joomla:staging","ref":"staging","sha":"4e7e05bdafdc1bb488fbac5e20d5578bca084a77","user":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"repo":{"id":2464908,"name":"joomla-cms","full_name":"joomla/joomla-cms","owner":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joomla/joomla-cms","description":"Home of the Joomla! Content Management System","fork":false,"url":"https://api.github.com/repos/joomla/joomla-cms","forks_url":"https://api.github.com/repos/joomla/joomla-cms/forks","keys_url":"https://api.github.com/repos/joomla/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joomla/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joomla/joomla-cms/teams","hooks_url":"https://api.github.com/repos/joomla/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/joomla/joomla-cms/events","assignees_url":"https://api.github.com/repos/joomla/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/joomla/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/joomla/joomla-cms/tags","blobs_url":"https://api.github.com/repos/joomla/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joomla/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joomla/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/joomla/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/joomla/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/joomla/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/joomla/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/joomla/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/joomla/joomla-cms/subscription","commits_url":"https://api.github.com/repos/joomla/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/joomla/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/joomla/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/joomla/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joomla/joomla-cms/merges","archive_url":"https://api.github.com/repos/joomla/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joomla/joomla-cms/downloads","issues_url":"https://api.github.com/repos/joomla/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/joomla/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/joomla/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/joomla/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joomla/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/joomla/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/joomla/joomla-cms/deployments","created_at":"2011-09-27T02:07:38Z","updated_at":"2016-11-06T09:50:38Z","pushed_at":"2016-11-06T13:33:49Z","git_url":"git://github.com/joomla/joomla-cms.git","ssh_url":"git@github.com:joomla/joomla-cms.git","clone_url":"https://github.com/joomla/joomla-cms.git","svn_url":"https://github.com/joomla/joomla-cms","homepage":"https://www.joomla.org","size":308702,"stargazers_count":2176,"watchers_count":2176,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2327,"mirror_url":null,"open_issues_count":546,"forks":2327,"open_issues":546,"watchers":2176,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/12009"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/12009"},"issue":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/12009"},"comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/12009/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/12009/comments"},"review_comment":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/12009/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/joomla-cms/statuses/8f383c63de76d9571079af192a522b04d66b5de0"}}}}
{"actor":{"display_login":"zero-24"}}