diff --git a/inc/wizard.class.php b/inc/wizard.class.php index 89e4f8e87..4333a3f72 100644 --- a/inc/wizard.class.php +++ b/inc/wizard.class.php @@ -127,42 +127,26 @@ public static function header($title) { echo ''; } - $query = "SELECT `glpi_savedsearches`.*, - `glpi_savedsearches_users`.`id` AS IS_DEFAULT - FROM `glpi_savedsearches` - LEFT JOIN `glpi_savedsearches_users` - ON (`glpi_savedsearches`.`itemtype` = `glpi_savedsearches_users`.`itemtype` - AND `glpi_savedsearches`.`id` = `glpi_savedsearches_users`.`savedsearches_id` - AND `glpi_savedsearches_users`.`users_id` = '".Session::getLoginUserID()."') - WHERE `glpi_savedsearches`.`is_private`='1' - AND `glpi_savedsearches`.`users_id`='".Session::getLoginUserID()."' - OR `glpi_savedsearches`.`is_private`='0' ". - getEntitiesRestrictRequest("AND", "glpi_savedsearches", "", "", true); - - if ($result = $DB->query($query)) { - if ($DB->numrows($result)) { - Ajax::createSlidePanel( - 'showSavedSearches', - [ - 'title' => __('Saved searches'), - 'url' => $CFG_GLPI['root_doc'] . '/ajax/savedsearch.php?action=show', - 'icon' => '/pics/menu_config.png', - 'icon_url' => SavedSearch::getSearchURL(), - 'icon_txt' => __('Manage saved searches') - ] - ); - echo '
  • '; - Ajax::createIframeModalWindow('loadbookmark', - $CFG_GLPI["root_doc"]."/front/savedsearch.php?action=load", - ['title' => __('Saved searches'), - 'reloadonclose' => true]); - echo ''; - echo ''; - echo ''.__('Saved searches').''; - echo ''; - echo '
  • '; - } - } + Ajax::createSlidePanel( + 'showSavedSearches', + [ + 'title' => __('Saved searches'), + 'url' => $CFG_GLPI['root_doc'] . '/ajax/savedsearch.php?action=show', + 'icon' => '/pics/menu_config.png', + 'icon_url' => SavedSearch::getSearchURL(), + 'icon_txt' => __('Manage saved searches') + ] + ); + echo '
  • '; + Ajax::createIframeModalWindow('loadbookmark', + $CFG_GLPI["root_doc"]."/front/savedsearch.php?action=load", + ['title' => __('Saved searches'), + 'reloadonclose' => true]); + echo ''; + echo ''; + echo ''.__('Saved searches').''; + echo ''; + echo '
  • '; if (isset($CFG_GLPI["helpdesk_doc_url"]) && !empty($CFG_GLPI["helpdesk_doc_url"])) { echo '
  • ';