Changed JArrayHelper to use ArrayHelper and added the use namespace to the files needed. Changed JString to use StringHelper and added the use namespace to the files needed. Fixed the spelling mistake of uniqe. Made changes to compiler to accomidate the new pro member feature that added viewsDefaultOrdering options. Fixed the moving of custom fields found in subforms of a plugin or module. Improved the sorting options to correctly map for custom fields and the category field.
This commit is contained in:
@ -35,7 +35,7 @@ class JFormFieldLibconfigfield extends JFormFieldList
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
// load the db opbject
|
||||
// load the db object
|
||||
$db = JFactory::getDBO();
|
||||
// get the input from url
|
||||
$jinput = JFactory::getApplication()->input;
|
||||
|
@ -77,8 +77,9 @@ class JFormFieldListfields extends JFormFieldList
|
||||
if (ComponentbuilderHelper::checkArray($fieldIds))
|
||||
{
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.name'),array('id','name')));
|
||||
$query->select($db->quoteName(array('a.id','a.name', 'a.xml', 'b.name'),array('id','name', 'xml', 'type')));
|
||||
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
|
||||
$query->join('LEFT', '#__componentbuilder_fieldtype AS b ON b.id = a.fieldtype');
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
// only load these fields
|
||||
$query->where($db->quoteName('a.id') . ' IN (' . implode(',', $fieldIds) . ')');
|
||||
@ -91,7 +92,9 @@ class JFormFieldListfields extends JFormFieldList
|
||||
$options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->name);
|
||||
// get the field name (TODO this could slow down the system so we will need to improve on this)
|
||||
$field_name = ComponentbuilderHelper::safeFieldName(ComponentbuilderHelper::getBetween(json_decode($item->xml),'name="','"'));
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]');
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
|
@ -75,8 +75,9 @@ class JFormFieldMatchfield extends JFormFieldList
|
||||
}
|
||||
}
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.name'),array('id','name')));
|
||||
$query->select($db->quoteName(array('a.id','a.name','t.name'),array('id','name','type')));
|
||||
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 't') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('t.id') . ')');
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
// filter by fields linked
|
||||
if (ComponentbuilderHelper::checkArray($fieldIds))
|
||||
@ -93,10 +94,10 @@ class JFormFieldMatchfield extends JFormFieldList
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->name);
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
@ -82,8 +82,9 @@ class JFormFieldTargetfields extends JFormFieldList
|
||||
}
|
||||
}
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.name'),array('id','name')));
|
||||
$query->select($db->quoteName(array('a.id','a.name','t.name'),array('id','name','type')));
|
||||
$query->from($db->quoteName('#__componentbuilder_field', 'a'));
|
||||
$query->join('LEFT', $db->quoteName('#__componentbuilder_fieldtype', 't') . ' ON (' . $db->quoteName('a.fieldtype') . ' = ' . $db->quoteName('t.id') . ')');
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
// filter by fields linked
|
||||
if (ComponentbuilderHelper::checkArray($fieldIds))
|
||||
@ -99,7 +100,7 @@ class JFormFieldTargetfields extends JFormFieldList
|
||||
{
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->name);
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [' . $item->type . ']');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user