Update example plugin to #1141 of the core

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@61 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
moyooo 2009-01-06 21:28:28 +00:00
parent 27d5417939
commit 87a36b7e65

View File

@ -89,10 +89,13 @@ function plugin_example_getSearchOption(){
return $sopt;
}
function plugin_example_giveItem($type,$field,$data,$num,$linkfield=""){
global $CFG_GLPI, $INFOFORM_PAGES;
function plugin_example_giveItem($type,$ID,$data,$num){
global $CFG_GLPI, $INFOFORM_PAGES,$SEARCH_OPTION;
switch ($field){
$table=$SEARCH_OPTION[$type][$ID]["table"];
$field=$SEARCH_OPTION[$type][$ID]["field"];
switch ($table.'.'.$field){
case "glpi_plugin_example.name" :
$out= "<a href=\"".$CFG_GLPI["root_doc"]."/".$INFOFORM_PAGES[$type]."?ID=".$data['ID']."\">";
$out.= $data["ITEM_$num"];