giveitem correction

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@99 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
tsmr 2009-10-30 20:53:29 +00:00
parent 254646ecec
commit 07b2fbd88f

View File

@ -135,10 +135,12 @@ function plugin_example_getAddSearchOptions($itemtype){
} }
function plugin_example_giveItem($type,$ID,$data,$num){ function plugin_example_giveItem($type,$ID,$data,$num){
global $CFG_GLPI, $INFOFORM_PAGES,$SEARCH_OPTION; global $CFG_GLPI, $INFOFORM_PAGES;
$table=$SEARCH_OPTION[$type][$ID]["table"]; $searchopt=getSearchOptions($type);
$field=$SEARCH_OPTION[$type][$ID]["field"];
$table=$searchopt[$ID]["table"];
$field=$searchopt[$ID]["field"];
switch ($table.'.'.$field){ switch ($table.'.'.$field){
case "glpi_plugin_example.name" : case "glpi_plugin_example.name" :