diff --git a/hook.php b/hook.php index 74c1fc70..7ed2fbf7 100644 --- a/hook.php +++ b/hook.php @@ -220,7 +220,7 @@ function plugin_mreporting_uninstall() { Toolbox::deleteDir(GLPI_PLUGIN_DOC_DIR."/mreporting/notifications"); Toolbox::deleteDir(GLPI_PLUGIN_DOC_DIR."/mreporting"); - $objects = ["DisplayPreference", (class_exists('Bookmark') ? "Bookmark" : "SavedSearch")]; + $objects = ["DisplayPreference", "SavedSearch"]; foreach ($objects as $object) { $obj = new $object(); diff --git a/inc/common.class.php b/inc/common.class.php index d8ef3d78..39f5c123 100644 --- a/inc/common.class.php +++ b/inc/common.class.php @@ -1642,12 +1642,7 @@ static function showSelector($date1, $date2, $randname) { } $_SERVER['REQUEST_URI'] .= "&date1".$randname."=".$date1."&date2".$randname."=".$date2; - if (class_exists('Bookmark')) { - Bookmark::showSaveButton(Bookmark::URI, __CLASS__); - } else { - //@since GLPI 9.2 - SavedSearch::showSaveButton(SavedSearch::URI, __CLASS__); - } + SavedSearch::showSaveButton(SavedSearch::URI, __CLASS__); //If there's no selector for the report, there's no need for a reset button ! if ($has_selector) { diff --git a/inc/profile.class.php b/inc/profile.class.php index 7f1799b8..d3f17487 100644 --- a/inc/profile.class.php +++ b/inc/profile.class.php @@ -80,8 +80,7 @@ static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtem if (!$prof->getFromDBByProfile($item->getField('id'))) { $prof->createAccess($item->getField('id')); } - $prof->showForm($item->getField('id'), ['target' => - $CFG_GLPI["root_doc"]."/plugins/mreporting/front/profile.form.php"]); + $prof->showForm($item->getField('id')); } else if ($item->getType()=='PluginMreportingConfig') { $reportProfile = new self(); $reportProfile->showFormForManageProfile($item); @@ -204,10 +203,14 @@ function showForm($ID, $options = []) { return false; } - $this->getFromDB($ID); - $this->showFormHeader($options); + echo '