{"action":"created","comment":{"url":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/comments/62523569","id":62523569,"diff_hunk":"@@ -0,0 +1,80 @@\n+<?php\n+\n+/*********************************************************************************\n+ * Tidbit is a data generation tool for the SugarCRM application developed by\n+ * SugarCRM, Inc. Copyright (C) 2004-2016 SugarCRM Inc.\n+ *\n+ * This program is free software; you can redistribute it and/or modify it under\n+ * the terms of the GNU Affero General Public License version 3 as published by the\n+ * Free Software Foundation with the addition of the following permission added\n+ * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK\n+ * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY\n+ * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.\n+ *\n+ * This program is distributed in the hope that it will be useful, but WITHOUT\n+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n+ * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more\n+ * details.\n+ *\n+ * You should have received a copy of the GNU Affero General Public License along with\n+ * this program; if not, see http://www.gnu.org/licenses or write to the Free\n+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\n+ * 02110-1301 USA.\n+ *\n+ * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,\n+ * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.\n+ *\n+ * The interactive user interfaces in modified source and object code versions\n+ * of this program must display Appropriate Legal Notices, as required under\n+ * Section 5 of the GNU Affero General Public License version 3.\n+ *\n+ * In accordance with Section 7(b) of the GNU Affero General Public License version 3,\n+ * these Appropriate Legal Notices must retain the display of the \"Powered by\n+ * SugarCRM\" logo. If the display of the logo is not reasonably feasible for\n+ * technical reasons, the Appropriate Legal Notices must display the words\n+ * \"Powered by SugarCRM\".\n+ ********************************************************************************/\n+\n+namespace Sugarcrm\\Tidbit\\Helper;\n+\n+/**\n+ * Class ModuleTabs\n+ *\n+ * Generate or Update Sugar Modules Visible tabs on top menu\n+ *\n+ * @package Sugarcrm\\Tidbit\\Helper\n+ */\n+class ModuleTabs\n+{\n+    /**\n+     * Update enabled modules in top menu.\n+     * Add modules that were generated by Tidbit to enabled list\n+     *\n+     * @param \\DBManager $db\n+     * @param array $modules\n+     */\n+    public static function updateEnabledTabs(\\DBManager $db, $modules)\n+    {\n+        global $moduleList;","path":"src/Helper/ModuleTabs.php","position":58,"original_position":58,"commit_id":"95f89535b36109c28c66e371dc77ecfe95e312da","original_commit_id":"95f89535b36109c28c66e371dc77ecfe95e312da","user":{"login":"asorokin-sugar","id":14986164,"avatar_url":"https://avatars.githubusercontent.com/u/14986164?v=3","gravatar_id":"","url":"https://api.github.com/users/asorokin-sugar","html_url":"https://github.com/asorokin-sugar","followers_url":"https://api.github.com/users/asorokin-sugar/followers","following_url":"https://api.github.com/users/asorokin-sugar/following{/other_user}","gists_url":"https://api.github.com/users/asorokin-sugar/gists{/gist_id}","starred_url":"https://api.github.com/users/asorokin-sugar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asorokin-sugar/subscriptions","organizations_url":"https://api.github.com/users/asorokin-sugar/orgs","repos_url":"https://api.github.com/users/asorokin-sugar/repos","events_url":"https://api.github.com/users/asorokin-sugar/events{/privacy}","received_events_url":"https://api.github.com/users/asorokin-sugar/received_events","type":"User","site_admin":false},"body":"True, but we should try to prepare external data for process by Tidbit in one place (install_cli.php)\r\nWhat if Core team make great refactoring in Sugar and remove global?","created_at":"2016-05-09T15:53:32Z","updated_at":"2016-05-09T15:53:32Z","html_url":"https://github.com/sugarcrm/Tidbit/pull/37#discussion_r62523569","pull_request_url":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/comments/62523569"},"html":{"href":"https://github.com/sugarcrm/Tidbit/pull/37#discussion_r62523569"},"pull_request":{"href":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/37","id":69362012,"html_url":"https://github.com/sugarcrm/Tidbit/pull/37","diff_url":"https://github.com/sugarcrm/Tidbit/pull/37.diff","patch_url":"https://github.com/sugarcrm/Tidbit/pull/37.patch","issue_url":"https://api.github.com/repos/sugarcrm/Tidbit/issues/37","number":37,"state":"open","locked":false,"title":"ABS-867 - Update EnabledModuleTabs with Tidbit modules","user":{"login":"izhutaev-sugarcrm","id":2294363,"avatar_url":"https://avatars.githubusercontent.com/u/2294363?v=3","gravatar_id":"","url":"https://api.github.com/users/izhutaev-sugarcrm","html_url":"https://github.com/izhutaev-sugarcrm","followers_url":"https://api.github.com/users/izhutaev-sugarcrm/followers","following_url":"https://api.github.com/users/izhutaev-sugarcrm/following{/other_user}","gists_url":"https://api.github.com/users/izhutaev-sugarcrm/gists{/gist_id}","starred_url":"https://api.github.com/users/izhutaev-sugarcrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izhutaev-sugarcrm/subscriptions","organizations_url":"https://api.github.com/users/izhutaev-sugarcrm/orgs","repos_url":"https://api.github.com/users/izhutaev-sugarcrm/repos","events_url":"https://api.github.com/users/izhutaev-sugarcrm/events{/privacy}","received_events_url":"https://api.github.com/users/izhutaev-sugarcrm/received_events","type":"User","site_admin":false},"body":"ABS-867 - Update EnabledModuleTabs with Tidbit modules\r\n\r\nUpdate enabled tabs setting for Sugar to include generated by Tidbit modules\r\nPlease note that for 7.x QRR need to be performed in order to refresh modules tabs list in UI","created_at":"2016-05-09T15:17:04Z","updated_at":"2016-05-09T15:53:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4685af96f7dc548f9011d94cc4a519dc7902eb0e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/37/commits","review_comments_url":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/37/comments","review_comment_url":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sugarcrm/Tidbit/issues/37/comments","statuses_url":"https://api.github.com/repos/sugarcrm/Tidbit/statuses/95f89535b36109c28c66e371dc77ecfe95e312da","head":{"label":"izhutaev-sugarcrm:ABS-867","ref":"ABS-867","sha":"95f89535b36109c28c66e371dc77ecfe95e312da","user":{"login":"izhutaev-sugarcrm","id":2294363,"avatar_url":"https://avatars.githubusercontent.com/u/2294363?v=3","gravatar_id":"","url":"https://api.github.com/users/izhutaev-sugarcrm","html_url":"https://github.com/izhutaev-sugarcrm","followers_url":"https://api.github.com/users/izhutaev-sugarcrm/followers","following_url":"https://api.github.com/users/izhutaev-sugarcrm/following{/other_user}","gists_url":"https://api.github.com/users/izhutaev-sugarcrm/gists{/gist_id}","starred_url":"https://api.github.com/users/izhutaev-sugarcrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izhutaev-sugarcrm/subscriptions","organizations_url":"https://api.github.com/users/izhutaev-sugarcrm/orgs","repos_url":"https://api.github.com/users/izhutaev-sugarcrm/repos","events_url":"https://api.github.com/users/izhutaev-sugarcrm/events{/privacy}","received_events_url":"https://api.github.com/users/izhutaev-sugarcrm/received_events","type":"User","site_admin":false},"repo":{"id":8006210,"name":"Tidbit","full_name":"izhutaev-sugarcrm/Tidbit","owner":{"login":"izhutaev-sugarcrm","id":2294363,"avatar_url":"https://avatars.githubusercontent.com/u/2294363?v=3","gravatar_id":"","url":"https://api.github.com/users/izhutaev-sugarcrm","html_url":"https://github.com/izhutaev-sugarcrm","followers_url":"https://api.github.com/users/izhutaev-sugarcrm/followers","following_url":"https://api.github.com/users/izhutaev-sugarcrm/following{/other_user}","gists_url":"https://api.github.com/users/izhutaev-sugarcrm/gists{/gist_id}","starred_url":"https://api.github.com/users/izhutaev-sugarcrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izhutaev-sugarcrm/subscriptions","organizations_url":"https://api.github.com/users/izhutaev-sugarcrm/orgs","repos_url":"https://api.github.com/users/izhutaev-sugarcrm/repos","events_url":"https://api.github.com/users/izhutaev-sugarcrm/events{/privacy}","received_events_url":"https://api.github.com/users/izhutaev-sugarcrm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/izhutaev-sugarcrm/Tidbit","description":"Tidbit is a tool to create massive amounts of data for a SugarCRM instance","fork":true,"url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit","forks_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/forks","keys_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/teams","hooks_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/hooks","issue_events_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/issues/events{/number}","events_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/events","assignees_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/assignees{/user}","branches_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/branches{/branch}","tags_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/tags","blobs_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/git/refs{/sha}","trees_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/statuses/{sha}","languages_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/languages","stargazers_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/stargazers","contributors_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/contributors","subscribers_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/subscribers","subscription_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/subscription","commits_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/commits{/sha}","git_commits_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/git/commits{/sha}","comments_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/comments{/number}","issue_comment_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/issues/comments{/number}","contents_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/contents/{+path}","compare_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/merges","archive_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/downloads","issues_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/issues{/number}","pulls_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/pulls{/number}","milestones_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/milestones{/number}","notifications_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/labels{/name}","releases_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/releases{/id}","deployments_url":"https://api.github.com/repos/izhutaev-sugarcrm/Tidbit/deployments","created_at":"2013-02-04T11:39:13Z","updated_at":"2015-10-27T12:17:17Z","pushed_at":"2016-05-09T15:32:54Z","git_url":"git://github.com/izhutaev-sugarcrm/Tidbit.git","ssh_url":"git@github.com:izhutaev-sugarcrm/Tidbit.git","clone_url":"https://github.com/izhutaev-sugarcrm/Tidbit.git","svn_url":"https://github.com/izhutaev-sugarcrm/Tidbit","homepage":"http://developers.sugarcrm.com/opensource","size":661,"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":"sugarcrm:develop","ref":"develop","sha":"559cbd6fa5763111b45da5ed3f339d01c1567d83","user":{"login":"sugarcrm","id":60142,"avatar_url":"https://avatars.githubusercontent.com/u/60142?v=3","gravatar_id":"","url":"https://api.github.com/users/sugarcrm","html_url":"https://github.com/sugarcrm","followers_url":"https://api.github.com/users/sugarcrm/followers","following_url":"https://api.github.com/users/sugarcrm/following{/other_user}","gists_url":"https://api.github.com/users/sugarcrm/gists{/gist_id}","starred_url":"https://api.github.com/users/sugarcrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sugarcrm/subscriptions","organizations_url":"https://api.github.com/users/sugarcrm/orgs","repos_url":"https://api.github.com/users/sugarcrm/repos","events_url":"https://api.github.com/users/sugarcrm/events{/privacy}","received_events_url":"https://api.github.com/users/sugarcrm/received_events","type":"Organization","site_admin":false},"repo":{"id":801636,"name":"Tidbit","full_name":"sugarcrm/Tidbit","owner":{"login":"sugarcrm","id":60142,"avatar_url":"https://avatars.githubusercontent.com/u/60142?v=3","gravatar_id":"","url":"https://api.github.com/users/sugarcrm","html_url":"https://github.com/sugarcrm","followers_url":"https://api.github.com/users/sugarcrm/followers","following_url":"https://api.github.com/users/sugarcrm/following{/other_user}","gists_url":"https://api.github.com/users/sugarcrm/gists{/gist_id}","starred_url":"https://api.github.com/users/sugarcrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sugarcrm/subscriptions","organizations_url":"https://api.github.com/users/sugarcrm/orgs","repos_url":"https://api.github.com/users/sugarcrm/repos","events_url":"https://api.github.com/users/sugarcrm/events{/privacy}","received_events_url":"https://api.github.com/users/sugarcrm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sugarcrm/Tidbit","description":"Tidbit is a tool to create massive amounts of data for a SugarCRM instance","fork":false,"url":"https://api.github.com/repos/sugarcrm/Tidbit","forks_url":"https://api.github.com/repos/sugarcrm/Tidbit/forks","keys_url":"https://api.github.com/repos/sugarcrm/Tidbit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sugarcrm/Tidbit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sugarcrm/Tidbit/teams","hooks_url":"https://api.github.com/repos/sugarcrm/Tidbit/hooks","issue_events_url":"https://api.github.com/repos/sugarcrm/Tidbit/issues/events{/number}","events_url":"https://api.github.com/repos/sugarcrm/Tidbit/events","assignees_url":"https://api.github.com/repos/sugarcrm/Tidbit/assignees{/user}","branches_url":"https://api.github.com/repos/sugarcrm/Tidbit/branches{/branch}","tags_url":"https://api.github.com/repos/sugarcrm/Tidbit/tags","blobs_url":"https://api.github.com/repos/sugarcrm/Tidbit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sugarcrm/Tidbit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sugarcrm/Tidbit/git/refs{/sha}","trees_url":"https://api.github.com/repos/sugarcrm/Tidbit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sugarcrm/Tidbit/statuses/{sha}","languages_url":"https://api.github.com/repos/sugarcrm/Tidbit/languages","stargazers_url":"https://api.github.com/repos/sugarcrm/Tidbit/stargazers","contributors_url":"https://api.github.com/repos/sugarcrm/Tidbit/contributors","subscribers_url":"https://api.github.com/repos/sugarcrm/Tidbit/subscribers","subscription_url":"https://api.github.com/repos/sugarcrm/Tidbit/subscription","commits_url":"https://api.github.com/repos/sugarcrm/Tidbit/commits{/sha}","git_commits_url":"https://api.github.com/repos/sugarcrm/Tidbit/git/commits{/sha}","comments_url":"https://api.github.com/repos/sugarcrm/Tidbit/comments{/number}","issue_comment_url":"https://api.github.com/repos/sugarcrm/Tidbit/issues/comments{/number}","contents_url":"https://api.github.com/repos/sugarcrm/Tidbit/contents/{+path}","compare_url":"https://api.github.com/repos/sugarcrm/Tidbit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sugarcrm/Tidbit/merges","archive_url":"https://api.github.com/repos/sugarcrm/Tidbit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sugarcrm/Tidbit/downloads","issues_url":"https://api.github.com/repos/sugarcrm/Tidbit/issues{/number}","pulls_url":"https://api.github.com/repos/sugarcrm/Tidbit/pulls{/number}","milestones_url":"https://api.github.com/repos/sugarcrm/Tidbit/milestones{/number}","notifications_url":"https://api.github.com/repos/sugarcrm/Tidbit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sugarcrm/Tidbit/labels{/name}","releases_url":"https://api.github.com/repos/sugarcrm/Tidbit/releases{/id}","deployments_url":"https://api.github.com/repos/sugarcrm/Tidbit/deployments","created_at":"2010-07-27T22:08:57Z","updated_at":"2016-05-06T19:43:01Z","pushed_at":"2016-05-09T15:38:36Z","git_url":"git://github.com/sugarcrm/Tidbit.git","ssh_url":"git@github.com:sugarcrm/Tidbit.git","clone_url":"https://github.com/sugarcrm/Tidbit.git","svn_url":"https://github.com/sugarcrm/Tidbit","homepage":"http://developers.sugarcrm.com","size":693,"stargazers_count":24,"watchers_count":24,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":7,"forks":28,"open_issues":7,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/37"},"html":{"href":"https://github.com/sugarcrm/Tidbit/pull/37"},"issue":{"href":"https://api.github.com/repos/sugarcrm/Tidbit/issues/37"},"comments":{"href":"https://api.github.com/repos/sugarcrm/Tidbit/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sugarcrm/Tidbit/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/sugarcrm/Tidbit/statuses/95f89535b36109c28c66e371dc77ecfe95e312da"}}}}