From 4758786c0235cfe307a2aefbf41b7e45f26ed8da Mon Sep 17 00:00:00 2001 From: moyooo Date: Fri, 18 May 2007 22:03:11 +0000 Subject: [PATCH] rrection Left JOin git-svn-id: https://forge.glpi-project.org/svn/example/trunk@25 349b9182-4a13-0410-896f-e5e9767dd1b3 --- index.php | 4 ---- setup.php | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) 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 "";