{"action":"created","comment":{"url":"https://api.github.com/repos/glpi-project/glpi/pulls/comments/238845521","pull_request_review_id":181457886,"id":238845521,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODg0NTUyMQ==","diff_hunk":"@@ -198,39 +198,23 @@ public function haveVisibilityAccess() {\n     * @return string joins to add\n    **/\n    static function addVisibilityJoins($forceall = false) {\n-\n-      if (!self::canView()) {\n-         return '';\n-      }\n-\n-      // Users\n-      $join = \" LEFT JOIN `glpi_rssfeeds_users`\n-                     ON (`glpi_rssfeeds_users`.`rssfeeds_id` = `glpi_rssfeeds`.`id`) \";\n-\n-      // Groups\n-      if ($forceall\n-          || (isset($_SESSION[\"glpigroups\"]) && count($_SESSION[\"glpigroups\"]))) {\n-         $join .= \" LEFT JOIN `glpi_groups_rssfeeds`\n-                        ON (`glpi_groups_rssfeeds`.`rssfeeds_id` = `glpi_rssfeeds`.`id`) \";\n-      }\n-\n-      // Profiles\n-      if ($forceall\n-          || (isset($_SESSION[\"glpiactiveprofile\"])\n-              && isset($_SESSION[\"glpiactiveprofile\"]['id']))) {\n-         $join .= \" LEFT JOIN `glpi_profiles_rssfeeds`\n-                        ON (`glpi_profiles_rssfeeds`.`rssfeeds_id` = `glpi_rssfeeds`.`id`) \";\n-      }\n-\n-      // Entities\n-      if ($forceall\n-          || (isset($_SESSION[\"glpiactiveentities\"]) && count($_SESSION[\"glpiactiveentities\"]))) {\n-         $join .= \" LEFT JOIN `glpi_entities_rssfeeds`\n-                        ON (`glpi_entities_rssfeeds`.`rssfeeds_id` = `glpi_rssfeeds`.`id`) \";\n-      }\n-\n-      return $join;\n-\n+      //not deprecated because used in Search\n+      global $DB;\n+\n+      //get and clean criteria\n+      $criteria = self::getVisibilityCriteria();\n+      unset($criteria['WHERE']);\n+      $criteria['FROM'] = self::getTable();\n+\n+      $it = new \\DBmysqlIterator(null);\n+      $it->execute($criteria);","path":"inc/rssfeed.class.php","position":46,"original_position":46,"commit_id":"22527deb720f11aae0166cfbec52b465cab6c608","original_commit_id":"22527deb720f11aae0166cfbec52b465cab6c608","user":{"login":"cedric-anne","id":33253653,"node_id":"MDQ6VXNlcjMzMjUzNjUz","avatar_url":"https://avatars1.githubusercontent.com/u/33253653?v=4","gravatar_id":"","url":"https://api.github.com/users/cedric-anne","html_url":"https://github.com/cedric-anne","followers_url":"https://api.github.com/users/cedric-anne/followers","following_url":"https://api.github.com/users/cedric-anne/following{/other_user}","gists_url":"https://api.github.com/users/cedric-anne/gists{/gist_id}","starred_url":"https://api.github.com/users/cedric-anne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cedric-anne/subscriptions","organizations_url":"https://api.github.com/users/cedric-anne/orgs","repos_url":"https://api.github.com/users/cedric-anne/repos","events_url":"https://api.github.com/users/cedric-anne/events{/privacy}","received_events_url":"https://api.github.com/users/cedric-anne/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n      $it->buildQuery($criteria);\r\n```","created_at":"2018-12-04T21:28:21Z","updated_at":"2018-12-04T21:41:20Z","html_url":"https://github.com/glpi-project/glpi/pull/5006#discussion_r238845521","pull_request_url":"https://api.github.com/repos/glpi-project/glpi/pulls/5006","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/glpi-project/glpi/pulls/comments/238845521"},"html":{"href":"https://github.com/glpi-project/glpi/pull/5006#discussion_r238845521"},"pull_request":{"href":"https://api.github.com/repos/glpi-project/glpi/pulls/5006"}}},"pull_request":{"url":"https://api.github.com/repos/glpi-project/glpi/pulls/5006","id":234645128,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0NjQ1MTI4","html_url":"https://github.com/glpi-project/glpi/pull/5006","diff_url":"https://github.com/glpi-project/glpi/pull/5006.diff","patch_url":"https://github.com/glpi-project/glpi/pull/5006.patch","issue_url":"https://api.github.com/repos/glpi-project/glpi/issues/5006","number":5006,"state":"open","locked":false,"title":"Deprecate raw condition","user":{"login":"trasher","id":224733,"node_id":"MDQ6VXNlcjIyNDczMw==","avatar_url":"https://avatars2.githubusercontent.com/u/224733?v=4","gravatar_id":"","url":"https://api.github.com/users/trasher","html_url":"https://github.com/trasher","followers_url":"https://api.github.com/users/trasher/followers","following_url":"https://api.github.com/users/trasher/following{/other_user}","gists_url":"https://api.github.com/users/trasher/gists{/gist_id}","starred_url":"https://api.github.com/users/trasher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trasher/subscriptions","organizations_url":"https://api.github.com/users/trasher/orgs","repos_url":"https://api.github.com/users/trasher/repos","events_url":"https://api.github.com/users/trasher/events{/privacy}","received_events_url":"https://api.github.com/users/trasher/received_events","type":"User","site_admin":false},"body":"<!--\r\n\r\nDear GLPI user.\r\n\r\nBEFORE SUBMITTING YOUR ISSUE, please make sure to read and follow these steps:\r\n\r\n* We don't support community plugins. Contact directly their authors, or use the community forum : http://forum.glpi-project.org.\r\n* For feature requests or enhancements, use the suggest dedicated site (http://suggest.glpi-project.org). We check it very often.\r\n* We prefer to keep this tracker in ENGLISH. If you want support in your language, the community forum (http://forum.glpi-project.org) is the best place.\r\n* Please use the below template.\r\n\r\nFor more informations, please check contributing guide:\r\nhttps://github.com/glpi-project/glpi/blob/master/CONTRIBUTING.md\r\n\r\nThe GLPI team.\r\n-->\r\n\r\n\r\n| 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?   | yes","created_at":"2018-11-29T13:51:28Z","updated_at":"2018-12-04T21:41:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"85317020deabc45647c0acee7af36a28cb8f64d7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":439545515,"node_id":"MDU6TGFiZWw0Mzk1NDU1MTU=","url":"https://api.github.com/repos/glpi-project/glpi/labels/wip","name":"wip","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/glpi-project/glpi/pulls/5006/commits","review_comments_url":"https://api.github.com/repos/glpi-project/glpi/pulls/5006/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/5006/comments","statuses_url":"https://api.github.com/repos/glpi-project/glpi/statuses/22527deb720f11aae0166cfbec52b465cab6c608","head":{"label":"trasher:deprecate-raw-condition","ref":"deprecate-raw-condition","sha":"22527deb720f11aae0166cfbec52b465cab6c608","user":{"login":"trasher","id":224733,"node_id":"MDQ6VXNlcjIyNDczMw==","avatar_url":"https://avatars2.githubusercontent.com/u/224733?v=4","gravatar_id":"","url":"https://api.github.com/users/trasher","html_url":"https://github.com/trasher","followers_url":"https://api.github.com/users/trasher/followers","following_url":"https://api.github.com/users/trasher/following{/other_user}","gists_url":"https://api.github.com/users/trasher/gists{/gist_id}","starred_url":"https://api.github.com/users/trasher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trasher/subscriptions","organizations_url":"https://api.github.com/users/trasher/orgs","repos_url":"https://api.github.com/users/trasher/repos","events_url":"https://api.github.com/users/trasher/events{/privacy}","received_events_url":"https://api.github.com/users/trasher/received_events","type":"User","site_admin":false},"repo":{"id":67509269,"node_id":"MDEwOlJlcG9zaXRvcnk2NzUwOTI2OQ==","name":"glpi","full_name":"trasher/glpi","private":false,"owner":{"login":"trasher","id":224733,"node_id":"MDQ6VXNlcjIyNDczMw==","avatar_url":"https://avatars2.githubusercontent.com/u/224733?v=4","gravatar_id":"","url":"https://api.github.com/users/trasher","html_url":"https://github.com/trasher","followers_url":"https://api.github.com/users/trasher/followers","following_url":"https://api.github.com/users/trasher/following{/other_user}","gists_url":"https://api.github.com/users/trasher/gists{/gist_id}","starred_url":"https://api.github.com/users/trasher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trasher/subscriptions","organizations_url":"https://api.github.com/users/trasher/orgs","repos_url":"https://api.github.com/users/trasher/repos","events_url":"https://api.github.com/users/trasher/events{/privacy}","received_events_url":"https://api.github.com/users/trasher/received_events","type":"User","site_admin":false},"html_url":"https://github.com/trasher/glpi","description":"GLPi stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT Management Software package, that provides ITIL Service Desk features, licenses tracking and software auditing.","fork":true,"url":"https://api.github.com/repos/trasher/glpi","forks_url":"https://api.github.com/repos/trasher/glpi/forks","keys_url":"https://api.github.com/repos/trasher/glpi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trasher/glpi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trasher/glpi/teams","hooks_url":"https://api.github.com/repos/trasher/glpi/hooks","issue_events_url":"https://api.github.com/repos/trasher/glpi/issues/events{/number}","events_url":"https://api.github.com/repos/trasher/glpi/events","assignees_url":"https://api.github.com/repos/trasher/glpi/assignees{/user}","branches_url":"https://api.github.com/repos/trasher/glpi/branches{/branch}","tags_url":"https://api.github.com/repos/trasher/glpi/tags","blobs_url":"https://api.github.com/repos/trasher/glpi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trasher/glpi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trasher/glpi/git/refs{/sha}","trees_url":"https://api.github.com/repos/trasher/glpi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trasher/glpi/statuses/{sha}","languages_url":"https://api.github.com/repos/trasher/glpi/languages","stargazers_url":"https://api.github.com/repos/trasher/glpi/stargazers","contributors_url":"https://api.github.com/repos/trasher/glpi/contributors","subscribers_url":"https://api.github.com/repos/trasher/glpi/subscribers","subscription_url":"https://api.github.com/repos/trasher/glpi/subscription","commits_url":"https://api.github.com/repos/trasher/glpi/commits{/sha}","git_commits_url":"https://api.github.com/repos/trasher/glpi/git/commits{/sha}","comments_url":"https://api.github.com/repos/trasher/glpi/comments{/number}","issue_comment_url":"https://api.github.com/repos/trasher/glpi/issues/comments{/number}","contents_url":"https://api.github.com/repos/trasher/glpi/contents/{+path}","compare_url":"https://api.github.com/repos/trasher/glpi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trasher/glpi/merges","archive_url":"https://api.github.com/repos/trasher/glpi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trasher/glpi/downloads","issues_url":"https://api.github.com/repos/trasher/glpi/issues{/number}","pulls_url":"https://api.github.com/repos/trasher/glpi/pulls{/number}","milestones_url":"https://api.github.com/repos/trasher/glpi/milestones{/number}","notifications_url":"https://api.github.com/repos/trasher/glpi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trasher/glpi/labels{/name}","releases_url":"https://api.github.com/repos/trasher/glpi/releases{/id}","deployments_url":"https://api.github.com/repos/trasher/glpi/deployments","created_at":"2016-09-06T13:10:00Z","updated_at":"2018-09-10T08:46:03Z","pushed_at":"2018-12-04T13:41:04Z","git_url":"git://github.com/trasher/glpi.git","ssh_url":"git@github.com:trasher/glpi.git","clone_url":"https://github.com/trasher/glpi.git","svn_url":"https://github.com/trasher/glpi","homepage":"http://glpi-project.org/","size":424273,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"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":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"glpi-project:master","ref":"master","sha":"36b40b4d7ebdd344ea7a20bbf189f8c77512b96d","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-04T11:01:54Z","pushed_at":"2018-12-04T16:36:52Z","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":433406,"stargazers_count":765,"watchers_count":765,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":375,"mirror_url":null,"archived":false,"open_issues_count":427,"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":375,"open_issues":427,"watchers":765,"default_branch":"9.3/bugfixes"}},"_links":{"self":{"href":"https://api.github.com/repos/glpi-project/glpi/pulls/5006"},"html":{"href":"https://github.com/glpi-project/glpi/pull/5006"},"issue":{"href":"https://api.github.com/repos/glpi-project/glpi/issues/5006"},"comments":{"href":"https://api.github.com/repos/glpi-project/glpi/issues/5006/comments"},"review_comments":{"href":"https://api.github.com/repos/glpi-project/glpi/pulls/5006/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/5006/commits"},"statuses":{"href":"https://api.github.com/repos/glpi-project/glpi/statuses/22527deb720f11aae0166cfbec52b465cab6c608"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"cedric-anne"}}