Release of v3.2.1-rc3
Improved the Schema Table update engine (more). Fix autoloader timing, and loading. Implement the Joomla Powers in JCB code, to move away from JClasses. Remove many of the SQL updates, to only use the Schema updates of table columns to avoid collusion. Fix the admin.css file loading on dashboard. #1112.
This commit is contained in:
@ -143,25 +143,30 @@ class JFormFieldDynamicget extends JFormFieldList
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.name','a.gettype'),array('id','dynamic_get_name','type')));
|
||||
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
|
||||
$query->where($db->quoteName('a.published') . ' = 1');
|
||||
$query->order('a.name ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
$model = ComponentbuilderHelper::getModel('dynamic_gets');
|
||||
foreach($items as $item)
|
||||
{
|
||||
$type = $model->selectionTranslation($item->type,'gettype');
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->dynamic_get_name . ' (' . JText::_($type) . ')' );
|
||||
}
|
||||
}
|
||||
// Get the user object.
|
||||
$user = Factory::getUser();
|
||||
// Get the databse object.
|
||||
$db = Factory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.name','a.gettype'),array('id','dynamic_get_name','type')));
|
||||
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
|
||||
$query->where($db->quoteName('a.published') . ' = 1');
|
||||
$query->order('a.name ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = [];
|
||||
if ($items)
|
||||
{
|
||||
if ($this->multiple === false)
|
||||
{
|
||||
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
|
||||
}
|
||||
foreach($items as $item)
|
||||
{
|
||||
$type = $model->selectionTranslation($item->type,'gettype');
|
||||
$options[] = Html::_('select.option', $item->id, $item->dynamic_get_name . ' (' . Text::_($type) . ')' );
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user