{"action":"created","comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/76294923","id":76294923,"diff_hunk":"@@ -0,0 +1,87 @@\n+<?php\n+/**\n+ * @package     Joomla.Plugin\n+ * @subpackage  Content.createmenulink\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('JPATH_BASE') or die;\n+\n+JFormHelper::loadFieldClass('list');\n+\n+/**\n+ * Form Field class for the Joomla Framework.\n+ *\n+ * @since  __DEPLOY_VERSION__\n+ */\n+class JFormFieldMenuParent extends JFormFieldList\n+{\n+\t/**\n+\t * The form field type.\n+\t *\n+\t * @var        string\n+\t * @since   __DEPLOY_VERSION__\n+\t */\n+\tprotected $type = 'MenuParent';\n+\n+\t/**\n+\t * Method to get the field options.\n+\t *\n+\t * @return  array  The field option objects.\n+\t *\n+\t * @since   __DEPLOY_VERSION__\n+\t */\n+\tprotected function getOptions()\n+\t{\n+\t\t$options = array();\n+\n+\t\t$db = JFactory::getDbo();\n+\t\t$query = $db->getQuery(true)\n+\t\t\t->select('a.id AS value, a.title AS text, a.level')\n+\t\t\t->from('#__menu AS a')\n+\t\t\t->join('LEFT', $db->quoteName('#__menu') . ' AS b ON a.lft > b.lft AND a.rgt < b.rgt');\n+\n+\t\tif ($menuType = $this->form->getValue('menutype'))\n+\t\t{\n+\t\t\t$query->where('a.menutype = ' . $db->quote($menuType));\n+\t\t}\n+\t\telse\n+\t\t{\n+\t\t\t$query->where('a.menutype != ' . $db->quote(''));\n+\t\t}\n+\n+\t\t// Prevent parenting to children of this item.\n+\t\tif ($id = $this->form->getValue('id'))\n+\t\t{\n+\t\t\t$query->join('LEFT', $db->quoteName('#__menu') . ' AS p ON p.id = ' . (int) $id)\n+\t\t\t\t->where('NOT(a.lft >= p.lft AND a.rgt <= p.rgt)');\n+\t\t}\n+\n+\t\t$query->where('a.published != -2')\n+\t\t\t->group('a.id, a.title, a.level, a.lft, a.rgt, a.menutype, a.parent_id, a.published')\n+\t\t\t->order('a.lft ASC');","path":"plugins/content/createmenulink/fields/menuparent.php","position":64,"original_position":64,"commit_id":"144c1d4f0456d2cd37f3df5ef3cd01e1ec7bb51a","original_commit_id":"98c0cfefd7e3e635ba3b4e834d0d1398703994fe","user":{"login":"andrepereiradasilva","id":9630530,"avatar_url":"https://avatars.githubusercontent.com/u/9630530?v=3","gravatar_id":"","url":"https://api.github.com/users/andrepereiradasilva","html_url":"https://github.com/andrepereiradasilva","followers_url":"https://api.github.com/users/andrepereiradasilva/followers","following_url":"https://api.github.com/users/andrepereiradasilva/following{/other_user}","gists_url":"https://api.github.com/users/andrepereiradasilva/gists{/gist_id}","starred_url":"https://api.github.com/users/andrepereiradasilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrepereiradasilva/subscriptions","organizations_url":"https://api.github.com/users/andrepereiradasilva/orgs","repos_url":"https://api.github.com/users/andrepereiradasilva/repos","events_url":"https://api.github.com/users/andrepereiradasilva/events{/privacy}","received_events_url":"https://api.github.com/users/andrepereiradasilva/received_events","type":"User","site_admin":false},"body":"@shubhamnba2009 This is required now\r\n\r\n> #### decide whether or not we are going to enforce the use of quoteName() and quote() in database queries. (Roland)\r\n> The PLT has decided that it will enforce the use of quoteName() and quote() methods on any new pull requests involving database queries. This to have consistent database queries that will work best across SQL platforms and with maximum security over time.\r\n\r\nSee https://volunteers.joomla.org/leadership/production-leadership-team/reports/296-plt-meeting-july-26-2016\r\n","created_at":"2016-08-25T18:05:32Z","updated_at":"2016-08-25T18:05:32Z","html_url":"https://github.com/joomla/joomla-cms/pull/11766#discussion_r76294923","pull_request_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11766","_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/76294923"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/11766#discussion_r76294923"},"pull_request":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/11766"}}},"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11766","id":82430252,"html_url":"https://github.com/joomla/joomla-cms/pull/11766","diff_url":"https://github.com/joomla/joomla-cms/pull/11766.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/11766.patch","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11766","number":11766,"state":"open","locked":false,"title":"Improving menu item workflow in Joomla[GSoC 16_menu_for_article_project]","user":{"login":"shubhamnba2009","id":12000068,"avatar_url":"https://avatars.githubusercontent.com/u/12000068?v=3","gravatar_id":"","url":"https://api.github.com/users/shubhamnba2009","html_url":"https://github.com/shubhamnba2009","followers_url":"https://api.github.com/users/shubhamnba2009/followers","following_url":"https://api.github.com/users/shubhamnba2009/following{/other_user}","gists_url":"https://api.github.com/users/shubhamnba2009/gists{/gist_id}","starred_url":"https://api.github.com/users/shubhamnba2009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubhamnba2009/subscriptions","organizations_url":"https://api.github.com/users/shubhamnba2009/orgs","repos_url":"https://api.github.com/users/shubhamnba2009/repos","events_url":"https://api.github.com/users/shubhamnba2009/events{/privacy}","received_events_url":"https://api.github.com/users/shubhamnba2009/received_events","type":"User","site_admin":false},"body":"### Summary of Changes\r\nIn Joomla 1.0 it was possible to create a menu link to an article from the article edit view in the administrator back-end. Joomla is missing this feature since 1.5 and it has a long time since then. Content-Createmenulink plugin recreates the old memories of creating menu item directly from the component view.\r\n\r\n### Testing Instructions\r\n1. Install the patch/PR.\r\n2. Go to Extensions > Plugins.\r\n3. Enable Content-Createmenulink Plugin if it is disabled.\r\n4. Click on Content-Createmenulink plugin.\r\n5. Parameter dialogue view will appear.\r\n![firstpr1](https://cloud.githubusercontent.com/assets/12000068/17907191/53158230-6998-11e6-9907-bfaede689cba.png)\r\n\r\n6. Enter component+view in the form [com_content.article], just like in the given image below.\r\nType two component view to enable component in both component view.\r\n[Note: Remember to press enter before typing second component+view name]\r\n\r\n![firstpr2](https://cloud.githubusercontent.com/assets/12000068/17907253/b1230d48-6998-11e6-9e8a-71d0a310c8d7.png)\r\n\r\n7. Navigate to content > article >create new article.\r\n8. A new tab named as \"Menu link options\" will appear.\r\n![firstpr3](https://cloud.githubusercontent.com/assets/12000068/17907351/2eb066d4-6999-11e6-84a7-55d1c1fea31f.png)\r\n\r\n9. Fill all the details.\r\n10. Check fornt end.\r\n11. Also try to make a new menu item for contact or other 3rd party component using this PR.\r\n![firstpr4](https://cloud.githubusercontent.com/assets/12000068/17907406/82d224b4-6999-11e6-95ce-89b8a3003eaf.png)\r\n\r\n\r\n###Expected outcome\r\nNew menu item for the article/contact/3rd party component will get created in the frontend.","created_at":"2016-08-23T19:56:18Z","updated_at":"2016-08-25T18:05:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ec36b648564edc083c6d85b16d7473eb46169f1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11766/commits","review_comments_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11766/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/11766/comments","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/144c1d4f0456d2cd37f3df5ef3cd01e1ec7bb51a","head":{"label":"shubhamnba2009:menupluginpr","ref":"menupluginpr","sha":"144c1d4f0456d2cd37f3df5ef3cd01e1ec7bb51a","user":{"login":"shubhamnba2009","id":12000068,"avatar_url":"https://avatars.githubusercontent.com/u/12000068?v=3","gravatar_id":"","url":"https://api.github.com/users/shubhamnba2009","html_url":"https://github.com/shubhamnba2009","followers_url":"https://api.github.com/users/shubhamnba2009/followers","following_url":"https://api.github.com/users/shubhamnba2009/following{/other_user}","gists_url":"https://api.github.com/users/shubhamnba2009/gists{/gist_id}","starred_url":"https://api.github.com/users/shubhamnba2009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubhamnba2009/subscriptions","organizations_url":"https://api.github.com/users/shubhamnba2009/orgs","repos_url":"https://api.github.com/users/shubhamnba2009/repos","events_url":"https://api.github.com/users/shubhamnba2009/events{/privacy}","received_events_url":"https://api.github.com/users/shubhamnba2009/received_events","type":"User","site_admin":false},"repo":{"id":55728705,"name":"joomla-cms","full_name":"shubhamnba2009/joomla-cms","owner":{"login":"shubhamnba2009","id":12000068,"avatar_url":"https://avatars.githubusercontent.com/u/12000068?v=3","gravatar_id":"","url":"https://api.github.com/users/shubhamnba2009","html_url":"https://github.com/shubhamnba2009","followers_url":"https://api.github.com/users/shubhamnba2009/followers","following_url":"https://api.github.com/users/shubhamnba2009/following{/other_user}","gists_url":"https://api.github.com/users/shubhamnba2009/gists{/gist_id}","starred_url":"https://api.github.com/users/shubhamnba2009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shubhamnba2009/subscriptions","organizations_url":"https://api.github.com/users/shubhamnba2009/orgs","repos_url":"https://api.github.com/users/shubhamnba2009/repos","events_url":"https://api.github.com/users/shubhamnba2009/events{/privacy}","received_events_url":"https://api.github.com/users/shubhamnba2009/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shubhamnba2009/joomla-cms","description":"Home of the Joomla! Content Management System","fork":true,"url":"https://api.github.com/repos/shubhamnba2009/joomla-cms","forks_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/forks","keys_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/teams","hooks_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/events","assignees_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/tags","blobs_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/subscription","commits_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/merges","archive_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/downloads","issues_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/shubhamnba2009/joomla-cms/deployments","created_at":"2016-04-07T21:16:48Z","updated_at":"2016-04-07T21:17:01Z","pushed_at":"2016-08-25T17:52:27Z","git_url":"git://github.com/shubhamnba2009/joomla-cms.git","ssh_url":"git@github.com:shubhamnba2009/joomla-cms.git","clone_url":"https://github.com/shubhamnba2009/joomla-cms.git","svn_url":"https://github.com/shubhamnba2009/joomla-cms","homepage":"https://www.joomla.org","size":155177,"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":"staging"}},"base":{"label":"joomla:staging","ref":"staging","sha":"016fab5bb3d81152d6e92c724b5548dbf787ac71","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-08-24T23:24:48Z","pushed_at":"2016-08-25T18:02:45Z","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":291990,"stargazers_count":2121,"watchers_count":2121,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2278,"mirror_url":null,"open_issues_count":486,"forks":2278,"open_issues":486,"watchers":2121,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/11766"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/11766"},"issue":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/11766"},"comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/11766/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/11766/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/11766/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/joomla-cms/statuses/144c1d4f0456d2cd37f3df5ef3cd01e1ec7bb51a"}}}}
{"actor":{"display_login":"andrepereiradasilva"}}