static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if (get_class($item) == 'Preference') { $pref = new self(); $id = $pref->addDefaultPreference(Session::getLoginUserID()); $pref->showForm($id); } return true; }
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getType() == 'Preference') { $pref = new self(); $pref_ID = $pref->checkIfPreferenceExists(Session::getLoginUserID()); if (!$pref_ID) { $pref_ID = $pref->addDefaultPreference(Session::getLoginUserID()); } $pref->showFormUserPreference($pref->getFormURL(), $pref_ID); } return true; }