Permit to use addDefaultXXX for plugins in search engine see #2547

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@149 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
moyooo 2010-12-23 09:18:56 +00:00
parent ed351bce69
commit 0658e5c00f

View File

@ -107,8 +107,9 @@ function plugin_example_addDefaultJoin($type, $ref_table, &$already_link_tables)
switch ($type) { switch ($type) {
// case "PluginExampleExample" : // case "PluginExampleExample" :
case "MyType" : case "MyType" :
return Search::addLeftJoin($type, $ref_table, $already_link_tables, return Search::addLeftJoin($type, $ref_table, $already_link_tables,
"newtable", "linkfield"); "newtable", "linkfield");
break;
} }
return ""; return "";
} }
@ -120,7 +121,8 @@ function plugin_example_addDefaultSelect($type) {
switch ($type) { switch ($type) {
// case "PluginExampleExample" : // case "PluginExampleExample" :
case "MyType" : case "MyType" :
return "`mytable`.`myfield` = 'myvalue' AS MYNAME, "; return "`mytable`.`myfield` = 'myvalue' AS MYNAME, ";
break;
} }
return ""; return "";
} }
@ -132,7 +134,8 @@ function plugin_example_addDefaultWhere($type) {
switch ($type) { switch ($type) {
// case "PluginExampleExample" : // case "PluginExampleExample" :
case "MyType" : case "MyType" :
return " `mytable`.`myfield` = 'myvalue' "; return " `mytable`.`myfield` = 'myvalue' ";
break;
} }
return ""; return "";
} }