Added getListViewDefaultOrdering method to compiler. Moved getFieldDatabaseName to the get class of the compiler. Updated the setFieldFilterListSet method. Imporved the filter query code to ignore empty values. gh-378
This commit is contained in:
@ -366,14 +366,38 @@ class ComponentbuilderModelJoomla_plugins extends JModelList
|
||||
}
|
||||
|
||||
// Filter by Class_extends.
|
||||
if ($class_extends = $this->getState('filter.class_extends'))
|
||||
$_class_extends = $this->getState('filter.class_extends');
|
||||
if (is_numeric($_class_extends))
|
||||
{
|
||||
$query->where('a.class_extends = ' . $db->quote($db->escape($class_extends)));
|
||||
if (is_float($_class_extends))
|
||||
{
|
||||
$query->where('a.class_extends = ' . (float) $_class_extends);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.class_extends = ' . (int) $_class_extends);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_class_extends))
|
||||
{
|
||||
$query->where('a.class_extends = ' . $db->quote($db->escape($_class_extends)));
|
||||
}
|
||||
// Filter by Joomla_plugin_group.
|
||||
if ($joomla_plugin_group = $this->getState('filter.joomla_plugin_group'))
|
||||
$_joomla_plugin_group = $this->getState('filter.joomla_plugin_group');
|
||||
if (is_numeric($_joomla_plugin_group))
|
||||
{
|
||||
$query->where('a.joomla_plugin_group = ' . $db->quote($db->escape($joomla_plugin_group)));
|
||||
if (is_float($_joomla_plugin_group))
|
||||
{
|
||||
$query->where('a.joomla_plugin_group = ' . (float) $_joomla_plugin_group);
|
||||
}
|
||||
else
|
||||
{
|
||||
$query->where('a.joomla_plugin_group = ' . (int) $_joomla_plugin_group);
|
||||
}
|
||||
}
|
||||
elseif (ComponentbuilderHelper::checkString($_joomla_plugin_group))
|
||||
{
|
||||
$query->where('a.joomla_plugin_group = ' . $db->quote($db->escape($_joomla_plugin_group)));
|
||||
}
|
||||
|
||||
// Add the list ordering clause.
|
||||
|
Reference in New Issue
Block a user