diff --git a/index.php b/index.php index 5f9c2cb..caef27e 100755 --- a/index.php +++ b/index.php @@ -45,16 +45,12 @@ if ($_SESSION["glpiactiveprofile"]["interface"] == "central"){ checkRight("computer","r"); -commonHeader($LANG["title"][8],$_SERVER['PHP_SELF'],"plugin","example"); - manageGetValuesInSearch(PLUGIN_EXAMPLE_TYPE); searchForm(PLUGIN_EXAMPLE_TYPE,$_SERVER['PHP_SELF'],$_GET["field"],$_GET["contains"],$_GET["sort"],$_GET["deleted"],$_GET["link"],$_GET["distinct"],$_GET["link2"],$_GET["contains2"],$_GET["field2"],$_GET["type2"]); showList(PLUGIN_EXAMPLE_TYPE,$_SERVER['PHP_SELF'],$_GET["field"],$_GET["contains"],$_GET["sort"],$_GET["order"],$_GET["start"],$_GET["deleted"],$_GET["link"],$_GET["distinct"],$_GET["link2"],$_GET["contains2"],$_GET["field2"],$_GET["type2"]); -commonFooter(); - commonFooter(); ?> diff --git a/setup.php b/setup.php index 9de0363..32388c9 100755 --- a/setup.php +++ b/setup.php @@ -125,9 +125,9 @@ function plugin_example_getSearchOption(){ function plugin_example_addLeftJoin($type,$ref_table,$new_table,$linkfield){ switch ($new_table){ - case "glpi_droprodown_plugin_example" : + case "glpi_dropdown_plugin_example" : // Standard LEFT JOIN for the example but use it for specific jointures - return " LEFT JOIN $new_table AS ON ($rt.$linkfield = $nt.ID) "; + return " LEFT JOIN $new_table ON ($ref_table.$linkfield = $new_table.ID) "; break; } return "";