mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
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:
parent
27d5417939
commit
87a36b7e65
9
hook.php
9
hook.php
@ -89,10 +89,13 @@ function plugin_example_getSearchOption(){
|
|||||||
return $sopt;
|
return $sopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
function plugin_example_giveItem($type,$field,$data,$num,$linkfield=""){
|
function plugin_example_giveItem($type,$ID,$data,$num){
|
||||||
global $CFG_GLPI, $INFOFORM_PAGES;
|
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" :
|
case "glpi_plugin_example.name" :
|
||||||
$out= "<a href=\"".$CFG_GLPI["root_doc"]."/".$INFOFORM_PAGES[$type]."?ID=".$data['ID']."\">";
|
$out= "<a href=\"".$CFG_GLPI["root_doc"]."/".$INFOFORM_PAGES[$type]."?ID=".$data['ID']."\">";
|
||||||
$out.= $data["ITEM_$num"];
|
$out.= $data["ITEM_$num"];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user