{"action":"created","comment":{"url":"https://api.github.com/repos/glpi-project/glpi/pulls/comments/242473624","pull_request_review_id":185989337,"id":242473624,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjQ3MzYyNA==","diff_hunk":"@@ -149,48 +146,54 @@ function update0841to0843() {\n    $migration->displayMessage(sprintf(__('Data migration - %s'), 'glpi_displaypreferences'));\n \n    foreach ($ADDTODISPLAYPREF as $type => $tab) {\n-      $query = \"SELECT DISTINCT `users_id`\n-                FROM `glpi_displaypreferences`\n-                WHERE `itemtype` = '$type'\";\n-\n-      if ($result = $DB->query($query)) {\n-         if ($DB->numrows($result)>0) {\n-            while ($data = $DB->fetch_assoc($result)) {\n-               $query = \"SELECT MAX(`rank`)\n-                         FROM `glpi_displaypreferences`\n-                         WHERE `users_id` = '\".$data['users_id'].\"'\n-                               AND `itemtype` = '$type'\";\n-               $result = $DB->query($query);\n-               $rank   = $DB->result($result, 0, 0);\n-               $rank++;\n-\n-               foreach ($tab as $newval) {\n-                  $query = \"SELECT *\n-                            FROM `glpi_displaypreferences`\n-                            WHERE `users_id` = '\".$data['users_id'].\"'\n-                                  AND `num` = '$newval'\n-                                  AND `itemtype` = '$type'\";\n-                  if ($result2=$DB->query($query)) {\n-                     if ($DB->numrows($result2)==0) {\n-                        $query = \"INSERT INTO `glpi_displaypreferences`\n-                                         (`itemtype` ,`num` ,`rank` ,`users_id`)\n-                                  VALUES ('$type', '$newval', '\".$rank++.\"',\n-                                          '\".$data['users_id'].\"')\";\n-                        $DB->query($query);\n-                     }\n-                  }\n-               }\n-            }\n+      $displaypreferencesIterator = $DB->request([","path":"install/update_0841_0843.php","position":null,"original_position":160,"commit_id":"34fcb1d147bdd6f4d5dc35fa5d4b072e95d20322","original_commit_id":"40da169128a6ebe321458a9e454495a12d1d909d","user":{"login":"AdrienClairembault","id":42734840,"node_id":"MDQ6VXNlcjQyNzM0ODQw","avatar_url":"https://avatars1.githubusercontent.com/u/42734840?v=4","gravatar_id":"","url":"https://api.github.com/users/AdrienClairembault","html_url":"https://github.com/AdrienClairembault","followers_url":"https://api.github.com/users/AdrienClairembault/followers","following_url":"https://api.github.com/users/AdrienClairembault/following{/other_user}","gists_url":"https://api.github.com/users/AdrienClairembault/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrienClairembault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrienClairembault/subscriptions","organizations_url":"https://api.github.com/users/AdrienClairembault/orgs","repos_url":"https://api.github.com/users/AdrienClairembault/repos","events_url":"https://api.github.com/users/AdrienClairembault/events{/privacy}","received_events_url":"https://api.github.com/users/AdrienClairembault/received_events","type":"User","site_admin":false},"body":"Migration->updateDisplayPrefs is now used in all the modified files.","created_at":"2018-12-18T10:05:34Z","updated_at":"2018-12-18T10:05:34Z","html_url":"https://github.com/glpi-project/glpi/pull/5099#discussion_r242473624","pull_request_url":"https://api.github.com/repos/glpi-project/glpi/pulls/5099","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/glpi-project/glpi/pulls/comments/242473624"},"html":{"href":"https://github.com/glpi-project/glpi/pull/5099#discussion_r242473624"},"pull_request":{"href":"https://api.github.com/repos/glpi-project/glpi/pulls/5099"}},"in_reply_to_id":242453853},"pull_request":{"url":"https://api.github.com/repos/glpi-project/glpi/pulls/5099","id":238087162,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MDg3MTYy","html_url":"https://github.com/glpi-project/glpi/pull/5099","diff_url":"https://github.com/glpi-project/glpi/pull/5099.diff","patch_url":"https://github.com/glpi-project/glpi/pull/5099.patch","issue_url":"https://api.github.com/repos/glpi-project/glpi/issues/5099","number":5099,"state":"open","locked":false,"title":" Migration queries refactorization - update_085_0853 to update_0841_0843","user":{"login":"AdrienClairembault","id":42734840,"node_id":"MDQ6VXNlcjQyNzM0ODQw","avatar_url":"https://avatars1.githubusercontent.com/u/42734840?v=4","gravatar_id":"","url":"https://api.github.com/users/AdrienClairembault","html_url":"https://github.com/AdrienClairembault","followers_url":"https://api.github.com/users/AdrienClairembault/followers","following_url":"https://api.github.com/users/AdrienClairembault/following{/other_user}","gists_url":"https://api.github.com/users/AdrienClairembault/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrienClairembault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrienClairembault/subscriptions","organizations_url":"https://api.github.com/users/AdrienClairembault/orgs","repos_url":"https://api.github.com/users/AdrienClairembault/repos","events_url":"https://api.github.com/users/AdrienClairembault/events{/privacy}","received_events_url":"https://api.github.com/users/AdrienClairembault/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | \r\n| Fixed tickets | \r\n","created_at":"2018-12-12T15:52:51Z","updated_at":"2018-12-18T10:05:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e04bb7cd0a47172ef07a2f70db73b0adaa4d4f29","assignee":null,"assignees":[],"requested_reviewers":[{"login":"orthagh","id":418844,"node_id":"MDQ6VXNlcjQxODg0NA==","avatar_url":"https://avatars2.githubusercontent.com/u/418844?v=4","gravatar_id":"","url":"https://api.github.com/users/orthagh","html_url":"https://github.com/orthagh","followers_url":"https://api.github.com/users/orthagh/followers","following_url":"https://api.github.com/users/orthagh/following{/other_user}","gists_url":"https://api.github.com/users/orthagh/gists{/gist_id}","starred_url":"https://api.github.com/users/orthagh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orthagh/subscriptions","organizations_url":"https://api.github.com/users/orthagh/orgs","repos_url":"https://api.github.com/users/orthagh/repos","events_url":"https://api.github.com/users/orthagh/events{/privacy}","received_events_url":"https://api.github.com/users/orthagh/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/glpi-project/glpi/pulls/5099/commits","review_comments_url":"https://api.github.com/repos/glpi-project/glpi/pulls/5099/comments","review_comment_url":"https://api.github.com/repos/glpi-project/glpi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/glpi-project/glpi/issues/5099/comments","statuses_url":"https://api.github.com/repos/glpi-project/glpi/statuses/34fcb1d147bdd6f4d5dc35fa5d4b072e95d20322","head":{"label":"AdrienClairembault:migrations-85-84","ref":"migrations-85-84","sha":"34fcb1d147bdd6f4d5dc35fa5d4b072e95d20322","user":{"login":"AdrienClairembault","id":42734840,"node_id":"MDQ6VXNlcjQyNzM0ODQw","avatar_url":"https://avatars1.githubusercontent.com/u/42734840?v=4","gravatar_id":"","url":"https://api.github.com/users/AdrienClairembault","html_url":"https://github.com/AdrienClairembault","followers_url":"https://api.github.com/users/AdrienClairembault/followers","following_url":"https://api.github.com/users/AdrienClairembault/following{/other_user}","gists_url":"https://api.github.com/users/AdrienClairembault/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrienClairembault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrienClairembault/subscriptions","organizations_url":"https://api.github.com/users/AdrienClairembault/orgs","repos_url":"https://api.github.com/users/AdrienClairembault/repos","events_url":"https://api.github.com/users/AdrienClairembault/events{/privacy}","received_events_url":"https://api.github.com/users/AdrienClairembault/received_events","type":"User","site_admin":false},"repo":{"id":146272614,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYyNzI2MTQ=","name":"glpi","full_name":"AdrienClairembault/glpi","private":false,"owner":{"login":"AdrienClairembault","id":42734840,"node_id":"MDQ6VXNlcjQyNzM0ODQw","avatar_url":"https://avatars1.githubusercontent.com/u/42734840?v=4","gravatar_id":"","url":"https://api.github.com/users/AdrienClairembault","html_url":"https://github.com/AdrienClairembault","followers_url":"https://api.github.com/users/AdrienClairembault/followers","following_url":"https://api.github.com/users/AdrienClairembault/following{/other_user}","gists_url":"https://api.github.com/users/AdrienClairembault/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrienClairembault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrienClairembault/subscriptions","organizations_url":"https://api.github.com/users/AdrienClairembault/orgs","repos_url":"https://api.github.com/users/AdrienClairembault/repos","events_url":"https://api.github.com/users/AdrienClairembault/events{/privacy}","received_events_url":"https://api.github.com/users/AdrienClairembault/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AdrienClairembault/glpi","description":"GLPI is a Free Asset and IT Management Software package,ITIL Service Desk, licenses tracking and software auditing.","fork":true,"url":"https://api.github.com/repos/AdrienClairembault/glpi","forks_url":"https://api.github.com/repos/AdrienClairembault/glpi/forks","keys_url":"https://api.github.com/repos/AdrienClairembault/glpi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdrienClairembault/glpi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdrienClairembault/glpi/teams","hooks_url":"https://api.github.com/repos/AdrienClairembault/glpi/hooks","issue_events_url":"https://api.github.com/repos/AdrienClairembault/glpi/issues/events{/number}","events_url":"https://api.github.com/repos/AdrienClairembault/glpi/events","assignees_url":"https://api.github.com/repos/AdrienClairembault/glpi/assignees{/user}","branches_url":"https://api.github.com/repos/AdrienClairembault/glpi/branches{/branch}","tags_url":"https://api.github.com/repos/AdrienClairembault/glpi/tags","blobs_url":"https://api.github.com/repos/AdrienClairembault/glpi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdrienClairembault/glpi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdrienClairembault/glpi/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdrienClairembault/glpi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdrienClairembault/glpi/statuses/{sha}","languages_url":"https://api.github.com/repos/AdrienClairembault/glpi/languages","stargazers_url":"https://api.github.com/repos/AdrienClairembault/glpi/stargazers","contributors_url":"https://api.github.com/repos/AdrienClairembault/glpi/contributors","subscribers_url":"https://api.github.com/repos/AdrienClairembault/glpi/subscribers","subscription_url":"https://api.github.com/repos/AdrienClairembault/glpi/subscription","commits_url":"https://api.github.com/repos/AdrienClairembault/glpi/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdrienClairembault/glpi/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdrienClairembault/glpi/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdrienClairembault/glpi/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdrienClairembault/glpi/contents/{+path}","compare_url":"https://api.github.com/repos/AdrienClairembault/glpi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdrienClairembault/glpi/merges","archive_url":"https://api.github.com/repos/AdrienClairembault/glpi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdrienClairembault/glpi/downloads","issues_url":"https://api.github.com/repos/AdrienClairembault/glpi/issues{/number}","pulls_url":"https://api.github.com/repos/AdrienClairembault/glpi/pulls{/number}","milestones_url":"https://api.github.com/repos/AdrienClairembault/glpi/milestones{/number}","notifications_url":"https://api.github.com/repos/AdrienClairembault/glpi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdrienClairembault/glpi/labels{/name}","releases_url":"https://api.github.com/repos/AdrienClairembault/glpi/releases{/id}","deployments_url":"https://api.github.com/repos/AdrienClairembault/glpi/deployments","created_at":"2018-08-27T08:57:37Z","updated_at":"2018-08-27T08:57:46Z","pushed_at":"2018-12-18T09:59:18Z","git_url":"git://github.com/AdrienClairembault/glpi.git","ssh_url":"git@github.com:AdrienClairembault/glpi.git","clone_url":"https://github.com/AdrienClairembault/glpi.git","svn_url":"https://github.com/AdrienClairembault/glpi","homepage":"http://glpi-project.org/","size":418136,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"9.3/bugfixes"}},"base":{"label":"glpi-project:master","ref":"master","sha":"b4c12419ad7478c5d3abf80903f3b27b0eb5190b","user":{"login":"glpi-project","id":13361707,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzYxNzA3","avatar_url":"https://avatars3.githubusercontent.com/u/13361707?v=4","gravatar_id":"","url":"https://api.github.com/users/glpi-project","html_url":"https://github.com/glpi-project","followers_url":"https://api.github.com/users/glpi-project/followers","following_url":"https://api.github.com/users/glpi-project/following{/other_user}","gists_url":"https://api.github.com/users/glpi-project/gists{/gist_id}","starred_url":"https://api.github.com/users/glpi-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glpi-project/subscriptions","organizations_url":"https://api.github.com/users/glpi-project/orgs","repos_url":"https://api.github.com/users/glpi-project/repos","events_url":"https://api.github.com/users/glpi-project/events{/privacy}","received_events_url":"https://api.github.com/users/glpi-project/received_events","type":"Organization","site_admin":false},"repo":{"id":39182755,"node_id":"MDEwOlJlcG9zaXRvcnkzOTE4Mjc1NQ==","name":"glpi","full_name":"glpi-project/glpi","private":false,"owner":{"login":"glpi-project","id":13361707,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzYxNzA3","avatar_url":"https://avatars3.githubusercontent.com/u/13361707?v=4","gravatar_id":"","url":"https://api.github.com/users/glpi-project","html_url":"https://github.com/glpi-project","followers_url":"https://api.github.com/users/glpi-project/followers","following_url":"https://api.github.com/users/glpi-project/following{/other_user}","gists_url":"https://api.github.com/users/glpi-project/gists{/gist_id}","starred_url":"https://api.github.com/users/glpi-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glpi-project/subscriptions","organizations_url":"https://api.github.com/users/glpi-project/orgs","repos_url":"https://api.github.com/users/glpi-project/repos","events_url":"https://api.github.com/users/glpi-project/events{/privacy}","received_events_url":"https://api.github.com/users/glpi-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/glpi-project/glpi","description":"GLPI is a Free Asset and IT Management Software package,ITIL Service Desk, licenses tracking and software auditing.","fork":false,"url":"https://api.github.com/repos/glpi-project/glpi","forks_url":"https://api.github.com/repos/glpi-project/glpi/forks","keys_url":"https://api.github.com/repos/glpi-project/glpi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glpi-project/glpi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glpi-project/glpi/teams","hooks_url":"https://api.github.com/repos/glpi-project/glpi/hooks","issue_events_url":"https://api.github.com/repos/glpi-project/glpi/issues/events{/number}","events_url":"https://api.github.com/repos/glpi-project/glpi/events","assignees_url":"https://api.github.com/repos/glpi-project/glpi/assignees{/user}","branches_url":"https://api.github.com/repos/glpi-project/glpi/branches{/branch}","tags_url":"https://api.github.com/repos/glpi-project/glpi/tags","blobs_url":"https://api.github.com/repos/glpi-project/glpi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glpi-project/glpi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glpi-project/glpi/git/refs{/sha}","trees_url":"https://api.github.com/repos/glpi-project/glpi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glpi-project/glpi/statuses/{sha}","languages_url":"https://api.github.com/repos/glpi-project/glpi/languages","stargazers_url":"https://api.github.com/repos/glpi-project/glpi/stargazers","contributors_url":"https://api.github.com/repos/glpi-project/glpi/contributors","subscribers_url":"https://api.github.com/repos/glpi-project/glpi/subscribers","subscription_url":"https://api.github.com/repos/glpi-project/glpi/subscription","commits_url":"https://api.github.com/repos/glpi-project/glpi/commits{/sha}","git_commits_url":"https://api.github.com/repos/glpi-project/glpi/git/commits{/sha}","comments_url":"https://api.github.com/repos/glpi-project/glpi/comments{/number}","issue_comment_url":"https://api.github.com/repos/glpi-project/glpi/issues/comments{/number}","contents_url":"https://api.github.com/repos/glpi-project/glpi/contents/{+path}","compare_url":"https://api.github.com/repos/glpi-project/glpi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glpi-project/glpi/merges","archive_url":"https://api.github.com/repos/glpi-project/glpi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glpi-project/glpi/downloads","issues_url":"https://api.github.com/repos/glpi-project/glpi/issues{/number}","pulls_url":"https://api.github.com/repos/glpi-project/glpi/pulls{/number}","milestones_url":"https://api.github.com/repos/glpi-project/glpi/milestones{/number}","notifications_url":"https://api.github.com/repos/glpi-project/glpi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glpi-project/glpi/labels{/name}","releases_url":"https://api.github.com/repos/glpi-project/glpi/releases{/id}","deployments_url":"https://api.github.com/repos/glpi-project/glpi/deployments","created_at":"2015-07-16T07:20:21Z","updated_at":"2018-12-18T08:04:49Z","pushed_at":"2018-12-18T09:59:20Z","git_url":"git://github.com/glpi-project/glpi.git","ssh_url":"git@github.com:glpi-project/glpi.git","clone_url":"https://github.com/glpi-project/glpi.git","svn_url":"https://github.com/glpi-project/glpi","homepage":"http://glpi-project.org/","size":441172,"stargazers_count":780,"watchers_count":780,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":379,"mirror_url":null,"archived":false,"open_issues_count":431,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":379,"open_issues":431,"watchers":780,"default_branch":"9.4/bugfixes"}},"_links":{"self":{"href":"https://api.github.com/repos/glpi-project/glpi/pulls/5099"},"html":{"href":"https://github.com/glpi-project/glpi/pull/5099"},"issue":{"href":"https://api.github.com/repos/glpi-project/glpi/issues/5099"},"comments":{"href":"https://api.github.com/repos/glpi-project/glpi/issues/5099/comments"},"review_comments":{"href":"https://api.github.com/repos/glpi-project/glpi/pulls/5099/comments"},"review_comment":{"href":"https://api.github.com/repos/glpi-project/glpi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/glpi-project/glpi/pulls/5099/commits"},"statuses":{"href":"https://api.github.com/repos/glpi-project/glpi/statuses/34fcb1d147bdd6f4d5dc35fa5d4b072e95d20322"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AdrienClairembault"}}