rrection Left JOin

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@25 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
moyooo 2007-05-18 22:03:11 +00:00
parent 1aa2d2b262
commit 4758786c02
2 changed files with 2 additions and 6 deletions

View File

@ -45,16 +45,12 @@ if ($_SESSION["glpiactiveprofile"]["interface"] == "central"){
checkRight("computer","r"); checkRight("computer","r");
commonHeader($LANG["title"][8],$_SERVER['PHP_SELF'],"plugin","example");
manageGetValuesInSearch(PLUGIN_EXAMPLE_TYPE); 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"]); 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"]); 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(); commonFooter();
?> ?>

View File

@ -125,9 +125,9 @@ function plugin_example_getSearchOption(){
function plugin_example_addLeftJoin($type,$ref_table,$new_table,$linkfield){ function plugin_example_addLeftJoin($type,$ref_table,$new_table,$linkfield){
switch ($new_table){ 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 // 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; break;
} }
return ""; return "";