{"action":"created","comment":{"url":"https://api.github.com/repos/openemr/openemr/pulls/comments/77933938","id":77933938,"diff_hunk":"@@ -122,7 +122,33 @@ function generate_select_list($tag_name, $list_id, $currvalue, $title, $empty_na\n \t$selectEmptyName = xlt($empty_name);\n \tif ($empty_name)\n \t\t$s .= \"<option value=''>\" . $selectEmptyName . \"</option>\";\n-\t$lres = sqlStatement(\"SELECT * FROM list_options WHERE list_id = ? AND activity=1 ORDER BY seq, title\", array($list_id));\n+\n+        // List order depends on language translation options.\n+        //  (Note we do not need to worry about the list order in the algorithm\n+        //   after the below code block since that is where searches for exceptions\n+        //   are done which include inactive items or items from a backup\n+        //   list; note these will always be shown at the bottom of the list no matter the\n+        //   chosen order.)\n+        $lang_id = empty($_SESSION['language_choice']) ? '1' : $_SESSION['language_choice'];\n+        if ($GLOBALS['gb_how_sort_list'] == '0') {\n+          //sort by seq\n+          $lres = sqlStatement(\"SELECT * FROM list_options WHERE list_id = ? AND activity=1 ORDER BY seq, title\", array($list_id));","path":"library/options.inc.php","position":15,"original_position":15,"commit_id":"96e492a98fc694539b3763d4689e1169be69bb8c","original_commit_id":"96e492a98fc694539b3763d4689e1169be69bb8c","user":{"login":"bradymiller","id":278968,"avatar_url":"https://avatars.githubusercontent.com/u/278968?v=3","gravatar_id":"","url":"https://api.github.com/users/bradymiller","html_url":"https://github.com/bradymiller","followers_url":"https://api.github.com/users/bradymiller/followers","following_url":"https://api.github.com/users/bradymiller/following{/other_user}","gists_url":"https://api.github.com/users/bradymiller/gists{/gist_id}","starred_url":"https://api.github.com/users/bradymiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradymiller/subscriptions","organizations_url":"https://api.github.com/users/bradymiller/orgs","repos_url":"https://api.github.com/users/bradymiller/repos","events_url":"https://api.github.com/users/bradymiller/events{/privacy}","received_events_url":"https://api.github.com/users/bradymiller/received_events","type":"User","site_admin":false},"body":"good point","created_at":"2016-09-08T01:34:24Z","updated_at":"2016-09-08T01:34:24Z","html_url":"https://github.com/openemr/openemr/pull/231#discussion_r77933938","pull_request_url":"https://api.github.com/repos/openemr/openemr/pulls/231","_links":{"self":{"href":"https://api.github.com/repos/openemr/openemr/pulls/comments/77933938"},"html":{"href":"https://github.com/openemr/openemr/pull/231#discussion_r77933938"},"pull_request":{"href":"https://api.github.com/repos/openemr/openemr/pulls/231"}}},"pull_request":{"url":"https://api.github.com/repos/openemr/openemr/pulls/231","id":84245944,"html_url":"https://github.com/openemr/openemr/pull/231","diff_url":"https://github.com/openemr/openemr/pull/231.diff","patch_url":"https://github.com/openemr/openemr/pull/231.patch","issue_url":"https://api.github.com/repos/openemr/openemr/issues/231","number":231,"state":"open","locked":false,"title":"Added option to sort lists by the translated title","user":{"login":"bradymiller","id":278968,"avatar_url":"https://avatars.githubusercontent.com/u/278968?v=3","gravatar_id":"","url":"https://api.github.com/users/bradymiller","html_url":"https://github.com/bradymiller","followers_url":"https://api.github.com/users/bradymiller/followers","following_url":"https://api.github.com/users/bradymiller/following{/other_user}","gists_url":"https://api.github.com/users/bradymiller/gists{/gist_id}","starred_url":"https://api.github.com/users/bradymiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradymiller/subscriptions","organizations_url":"https://api.github.com/users/bradymiller/orgs","repos_url":"https://api.github.com/users/bradymiller/repos","events_url":"https://api.github.com/users/bradymiller/events{/privacy}","received_events_url":"https://api.github.com/users/bradymiller/received_events","type":"User","site_admin":false},"body":"This is a modified solution for the following PR:\r\nhttps://github.com/openemr/openemr/pull/229","created_at":"2016-09-07T06:54:13Z","updated_at":"2016-09-08T01:34:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b8f3da90e659cc503b2198e26df1a5d7e3e6a87","assignee":{"login":"bradymiller","id":278968,"avatar_url":"https://avatars.githubusercontent.com/u/278968?v=3","gravatar_id":"","url":"https://api.github.com/users/bradymiller","html_url":"https://github.com/bradymiller","followers_url":"https://api.github.com/users/bradymiller/followers","following_url":"https://api.github.com/users/bradymiller/following{/other_user}","gists_url":"https://api.github.com/users/bradymiller/gists{/gist_id}","starred_url":"https://api.github.com/users/bradymiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradymiller/subscriptions","organizations_url":"https://api.github.com/users/bradymiller/orgs","repos_url":"https://api.github.com/users/bradymiller/repos","events_url":"https://api.github.com/users/bradymiller/events{/privacy}","received_events_url":"https://api.github.com/users/bradymiller/received_events","type":"User","site_admin":false},"assignees":[{"login":"bradymiller","id":278968,"avatar_url":"https://avatars.githubusercontent.com/u/278968?v=3","gravatar_id":"","url":"https://api.github.com/users/bradymiller","html_url":"https://github.com/bradymiller","followers_url":"https://api.github.com/users/bradymiller/followers","following_url":"https://api.github.com/users/bradymiller/following{/other_user}","gists_url":"https://api.github.com/users/bradymiller/gists{/gist_id}","starred_url":"https://api.github.com/users/bradymiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradymiller/subscriptions","organizations_url":"https://api.github.com/users/bradymiller/orgs","repos_url":"https://api.github.com/users/bradymiller/repos","events_url":"https://api.github.com/users/bradymiller/events{/privacy}","received_events_url":"https://api.github.com/users/bradymiller/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openemr/openemr/pulls/231/commits","review_comments_url":"https://api.github.com/repos/openemr/openemr/pulls/231/comments","review_comment_url":"https://api.github.com/repos/openemr/openemr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openemr/openemr/issues/231/comments","statuses_url":"https://api.github.com/repos/openemr/openemr/statuses/96e492a98fc694539b3763d4689e1169be69bb8c","head":{"label":"bradymiller:alphabetize-lists_1","ref":"alphabetize-lists_1","sha":"96e492a98fc694539b3763d4689e1169be69bb8c","user":{"login":"bradymiller","id":278968,"avatar_url":"https://avatars.githubusercontent.com/u/278968?v=3","gravatar_id":"","url":"https://api.github.com/users/bradymiller","html_url":"https://github.com/bradymiller","followers_url":"https://api.github.com/users/bradymiller/followers","following_url":"https://api.github.com/users/bradymiller/following{/other_user}","gists_url":"https://api.github.com/users/bradymiller/gists{/gist_id}","starred_url":"https://api.github.com/users/bradymiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradymiller/subscriptions","organizations_url":"https://api.github.com/users/bradymiller/orgs","repos_url":"https://api.github.com/users/bradymiller/repos","events_url":"https://api.github.com/users/bradymiller/events{/privacy}","received_events_url":"https://api.github.com/users/bradymiller/received_events","type":"User","site_admin":false},"repo":{"id":679832,"name":"openemr","full_name":"bradymiller/openemr","owner":{"login":"bradymiller","id":278968,"avatar_url":"https://avatars.githubusercontent.com/u/278968?v=3","gravatar_id":"","url":"https://api.github.com/users/bradymiller","html_url":"https://github.com/bradymiller","followers_url":"https://api.github.com/users/bradymiller/followers","following_url":"https://api.github.com/users/bradymiller/following{/other_user}","gists_url":"https://api.github.com/users/bradymiller/gists{/gist_id}","starred_url":"https://api.github.com/users/bradymiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradymiller/subscriptions","organizations_url":"https://api.github.com/users/bradymiller/orgs","repos_url":"https://api.github.com/users/bradymiller/repos","events_url":"https://api.github.com/users/bradymiller/events{/privacy}","received_events_url":"https://api.github.com/users/bradymiller/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bradymiller/openemr","description":"Mirror of official OpenEMR Sourceforge repository","fork":true,"url":"https://api.github.com/repos/bradymiller/openemr","forks_url":"https://api.github.com/repos/bradymiller/openemr/forks","keys_url":"https://api.github.com/repos/bradymiller/openemr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bradymiller/openemr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bradymiller/openemr/teams","hooks_url":"https://api.github.com/repos/bradymiller/openemr/hooks","issue_events_url":"https://api.github.com/repos/bradymiller/openemr/issues/events{/number}","events_url":"https://api.github.com/repos/bradymiller/openemr/events","assignees_url":"https://api.github.com/repos/bradymiller/openemr/assignees{/user}","branches_url":"https://api.github.com/repos/bradymiller/openemr/branches{/branch}","tags_url":"https://api.github.com/repos/bradymiller/openemr/tags","blobs_url":"https://api.github.com/repos/bradymiller/openemr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bradymiller/openemr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bradymiller/openemr/git/refs{/sha}","trees_url":"https://api.github.com/repos/bradymiller/openemr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bradymiller/openemr/statuses/{sha}","languages_url":"https://api.github.com/repos/bradymiller/openemr/languages","stargazers_url":"https://api.github.com/repos/bradymiller/openemr/stargazers","contributors_url":"https://api.github.com/repos/bradymiller/openemr/contributors","subscribers_url":"https://api.github.com/repos/bradymiller/openemr/subscribers","subscription_url":"https://api.github.com/repos/bradymiller/openemr/subscription","commits_url":"https://api.github.com/repos/bradymiller/openemr/commits{/sha}","git_commits_url":"https://api.github.com/repos/bradymiller/openemr/git/commits{/sha}","comments_url":"https://api.github.com/repos/bradymiller/openemr/comments{/number}","issue_comment_url":"https://api.github.com/repos/bradymiller/openemr/issues/comments{/number}","contents_url":"https://api.github.com/repos/bradymiller/openemr/contents/{+path}","compare_url":"https://api.github.com/repos/bradymiller/openemr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bradymiller/openemr/merges","archive_url":"https://api.github.com/repos/bradymiller/openemr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bradymiller/openemr/downloads","issues_url":"https://api.github.com/repos/bradymiller/openemr/issues{/number}","pulls_url":"https://api.github.com/repos/bradymiller/openemr/pulls{/number}","milestones_url":"https://api.github.com/repos/bradymiller/openemr/milestones{/number}","notifications_url":"https://api.github.com/repos/bradymiller/openemr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bradymiller/openemr/labels{/name}","releases_url":"https://api.github.com/repos/bradymiller/openemr/releases{/id}","deployments_url":"https://api.github.com/repos/bradymiller/openemr/deployments","created_at":"2010-05-21T22:25:18Z","updated_at":"2016-08-20T21:44:17Z","pushed_at":"2016-09-07T08:12:12Z","git_url":"git://github.com/bradymiller/openemr.git","ssh_url":"git@github.com:bradymiller/openemr.git","clone_url":"https://github.com/bradymiller/openemr.git","svn_url":"https://github.com/bradymiller/openemr","homepage":"http://open-emr.org/","size":299182,"stargazers_count":15,"watchers_count":15,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":0,"forks":7,"open_issues":0,"watchers":15,"default_branch":"master"}},"base":{"label":"openemr:master","ref":"master","sha":"b7e6df3733a7f9be034a3f8ec3e6bee091b2848a","user":{"login":"openemr","id":283089,"avatar_url":"https://avatars.githubusercontent.com/u/283089?v=3","gravatar_id":"","url":"https://api.github.com/users/openemr","html_url":"https://github.com/openemr","followers_url":"https://api.github.com/users/openemr/followers","following_url":"https://api.github.com/users/openemr/following{/other_user}","gists_url":"https://api.github.com/users/openemr/gists{/gist_id}","starred_url":"https://api.github.com/users/openemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openemr/subscriptions","organizations_url":"https://api.github.com/users/openemr/orgs","repos_url":"https://api.github.com/users/openemr/repos","events_url":"https://api.github.com/users/openemr/events{/privacy}","received_events_url":"https://api.github.com/users/openemr/received_events","type":"Organization","site_admin":false},"repo":{"id":679584,"name":"openemr","full_name":"openemr/openemr","owner":{"login":"openemr","id":283089,"avatar_url":"https://avatars.githubusercontent.com/u/283089?v=3","gravatar_id":"","url":"https://api.github.com/users/openemr","html_url":"https://github.com/openemr","followers_url":"https://api.github.com/users/openemr/followers","following_url":"https://api.github.com/users/openemr/following{/other_user}","gists_url":"https://api.github.com/users/openemr/gists{/gist_id}","starred_url":"https://api.github.com/users/openemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openemr/subscriptions","organizations_url":"https://api.github.com/users/openemr/orgs","repos_url":"https://api.github.com/users/openemr/repos","events_url":"https://api.github.com/users/openemr/events{/privacy}","received_events_url":"https://api.github.com/users/openemr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openemr/openemr","description":"Mirror of official OpenEMR Sourceforge repository","fork":false,"url":"https://api.github.com/repos/openemr/openemr","forks_url":"https://api.github.com/repos/openemr/openemr/forks","keys_url":"https://api.github.com/repos/openemr/openemr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openemr/openemr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openemr/openemr/teams","hooks_url":"https://api.github.com/repos/openemr/openemr/hooks","issue_events_url":"https://api.github.com/repos/openemr/openemr/issues/events{/number}","events_url":"https://api.github.com/repos/openemr/openemr/events","assignees_url":"https://api.github.com/repos/openemr/openemr/assignees{/user}","branches_url":"https://api.github.com/repos/openemr/openemr/branches{/branch}","tags_url":"https://api.github.com/repos/openemr/openemr/tags","blobs_url":"https://api.github.com/repos/openemr/openemr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openemr/openemr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openemr/openemr/git/refs{/sha}","trees_url":"https://api.github.com/repos/openemr/openemr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openemr/openemr/statuses/{sha}","languages_url":"https://api.github.com/repos/openemr/openemr/languages","stargazers_url":"https://api.github.com/repos/openemr/openemr/stargazers","contributors_url":"https://api.github.com/repos/openemr/openemr/contributors","subscribers_url":"https://api.github.com/repos/openemr/openemr/subscribers","subscription_url":"https://api.github.com/repos/openemr/openemr/subscription","commits_url":"https://api.github.com/repos/openemr/openemr/commits{/sha}","git_commits_url":"https://api.github.com/repos/openemr/openemr/git/commits{/sha}","comments_url":"https://api.github.com/repos/openemr/openemr/comments{/number}","issue_comment_url":"https://api.github.com/repos/openemr/openemr/issues/comments{/number}","contents_url":"https://api.github.com/repos/openemr/openemr/contents/{+path}","compare_url":"https://api.github.com/repos/openemr/openemr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openemr/openemr/merges","archive_url":"https://api.github.com/repos/openemr/openemr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openemr/openemr/downloads","issues_url":"https://api.github.com/repos/openemr/openemr/issues{/number}","pulls_url":"https://api.github.com/repos/openemr/openemr/pulls{/number}","milestones_url":"https://api.github.com/repos/openemr/openemr/milestones{/number}","notifications_url":"https://api.github.com/repos/openemr/openemr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openemr/openemr/labels{/name}","releases_url":"https://api.github.com/repos/openemr/openemr/releases{/id}","deployments_url":"https://api.github.com/repos/openemr/openemr/deployments","created_at":"2010-05-21T19:54:08Z","updated_at":"2016-09-06T23:52:53Z","pushed_at":"2016-09-07T09:02:54Z","git_url":"git://github.com/openemr/openemr.git","ssh_url":"git@github.com:openemr/openemr.git","clone_url":"https://github.com/openemr/openemr.git","svn_url":"https://github.com/openemr/openemr","homepage":"http://open-emr.org/","size":302684,"stargazers_count":298,"watchers_count":298,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":453,"mirror_url":null,"open_issues_count":24,"forks":453,"open_issues":24,"watchers":298,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openemr/openemr/pulls/231"},"html":{"href":"https://github.com/openemr/openemr/pull/231"},"issue":{"href":"https://api.github.com/repos/openemr/openemr/issues/231"},"comments":{"href":"https://api.github.com/repos/openemr/openemr/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/openemr/openemr/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/openemr/openemr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openemr/openemr/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/openemr/openemr/statuses/96e492a98fc694539b3763d4689e1169be69bb8c"}}}}
{"actor":{"display_login":"bradymiller"}}