mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
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:
parent
1aa2d2b262
commit
4758786c02
@ -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();
|
||||
?>
|
||||
|
||||
|
@ -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 "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user