{"action":"opened","number":11997,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11997","id":84662787,"html_url":"https://github.com/joomla/joomla-cms/pull/11997","diff_url":"https://github.com/joomla/joomla-cms/pull/11997.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/11997.patch","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/11997","number":11997,"state":"open","locked":false,"title":"[JLanguage] Do not run the load language file method twice in the default language","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":"### Summary of Changes\r\n\r\nWhen loading language files for the en-GB language `JLanguage::load` method is trying to load the en-GB files two times when it only needs to do that one time.\r\n\r\nThis PR intends to corrects that.\r\n\r\n### Testing Instructions\r\n\r\n- Code review\r\n- Use latest staging\r\n- Enable debug global option and system debug plugin\r\n- Add, before and after  `JLanguage::load` (https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/language/language.php#L724) method a profiler mark like this:\r\n```php\r\n\tpublic function load($extension = 'joomla', $basePath = JPATH_BASE, $lang = null, $reload = false, $default = true)\r\n\t{\r\n\t\t!JDEBUG ?: JProfiler::getInstance('Application')->mark('');\r\n\r\n\t\t// Code removed for brevity\r\n\r\n\t\t!JDEBUG ?: JProfiler::getInstance('Application')->mark('<strong>Loaded</strong> ' . str_replace(JPATH_ROOT, '', $filename));\r\n\r\n\t\treturn $result;\r\n\t}\r\n```\r\n- Check in the debug plugin \"Profile Information\" that the `load` method is being called **two times** in en-GB for each language file.\r\n![image](https://cloud.githubusercontent.com/assets/9630530/18390749/63495844-76a3-11e6-846b-0364147ef201.png)\r\n- Apply patch\r\n- Add the profiler marks again to the file\r\n- Check in the debug plugin \"Profile Information\" that the `load` method is being called **one time** for en-GB for each language file.\r\n![image](https://cloud.githubusercontent.com/assets/9630530/18390857/c47a6fa4-76a3-11e6-8199-57022762414b.png)\r\n\r\n- Check if all language are still loaded correctly across joomla\r\n\r\n### Documentation Changes Required\r\n\r\nNone.","created_at":"2016-09-09T14:44:12Z","updated_at":"2016-09-09T14:44:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11997/commits","review_comments_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/11997/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/11997/comments","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/5eb09d1f319e3acb01501f2729e738be1fab31d8","head":{"label":"andrepereiradasilva:patch-5","ref":"patch-5","sha":"5eb09d1f319e3acb01501f2729e738be1fab31d8","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},"repo":{"id":46170295,"name":"joomla-cms","full_name":"andrepereiradasilva/joomla-cms","owner":{"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},"private":false,"html_url":"https://github.com/andrepereiradasilva/joomla-cms","description":"Home of the Joomla! Content Management System","fork":true,"url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms","forks_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/forks","keys_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/teams","hooks_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/events","assignees_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/tags","blobs_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/subscription","commits_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/merges","archive_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/downloads","issues_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/andrepereiradasilva/joomla-cms/deployments","created_at":"2015-11-14T10:22:32Z","updated_at":"2016-03-03T00:12:42Z","pushed_at":"2016-09-09T14:15:56Z","git_url":"git://github.com/andrepereiradasilva/joomla-cms.git","ssh_url":"git@github.com:andrepereiradasilva/joomla-cms.git","clone_url":"https://github.com/andrepereiradasilva/joomla-cms.git","svn_url":"https://github.com/andrepereiradasilva/joomla-cms","homepage":"https://www.joomla.org","size":157730,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":0,"default_branch":"staging"}},"base":{"label":"joomla:staging","ref":"staging","sha":"aadd56a314829699028b0bcbfa7862cfd8ebea99","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-09-09T00:20:44Z","pushed_at":"2016-09-09T14:14: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":294894,"stargazers_count":2133,"watchers_count":2133,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2284,"mirror_url":null,"open_issues_count":417,"forks":2284,"open_issues":417,"watchers":2133,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/11997"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/11997"},"issue":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/11997"},"comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/11997/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/11997/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/11997/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/joomla-cms/statuses/5eb09d1f319e3acb01501f2729e738be1fab31d8"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":7,"deletions":6,"changed_files":1}}
{"actor":{"display_login":"andrepereiradasilva"}}