mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
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:
parent
ed351bce69
commit
0658e5c00f
9
hook.php
9
hook.php
@ -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 "";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user