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:
@ -12,6 +12,8 @@
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\Utilities\ArrayHelper;
|
||||
|
||||
/**
|
||||
* Fields Model
|
||||
*/
|
||||
@ -28,7 +30,7 @@ class ComponentbuilderModelFields extends JModelList
|
||||
'a.created_by','created_by',
|
||||
'a.modified_by','modified_by',
|
||||
'a.name','name',
|
||||
'a.fieldtype','fieldtype',
|
||||
'g.name',
|
||||
'a.datatype','datatype',
|
||||
'a.indexes','indexes',
|
||||
'a.null_switch','null_switch',
|
||||
@ -352,7 +354,7 @@ class ComponentbuilderModelFields extends JModelList
|
||||
}
|
||||
elseif (is_array($categoryId))
|
||||
{
|
||||
JArrayHelper::toInteger($categoryId);
|
||||
ArrayHelper::toInteger($categoryId);
|
||||
$categoryId = implode(',', $categoryId);
|
||||
$query->where('a.category IN (' . $categoryId . ')');
|
||||
}
|
||||
@ -360,7 +362,7 @@ class ComponentbuilderModelFields extends JModelList
|
||||
|
||||
// Add the list ordering clause.
|
||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||
$orderDirn = $this->state->get('list.direction', 'asc');
|
||||
$orderDirn = $this->state->get('list.direction', 'DESC');
|
||||
if ($orderCol != '')
|
||||
{
|
||||
$query->order($db->escape($orderCol . ' ' . $orderDirn));
|
||||
@ -407,7 +409,7 @@ class ComponentbuilderModelFields extends JModelList
|
||||
}
|
||||
|
||||
// Order the results by ordering
|
||||
$query->order('a.ordering ASC');
|
||||
$query->order('a.id DESC');
|
||||
|
||||
// Load the items
|
||||
$db->setQuery($query);
|
||||
|
Reference in New Issue
Block a user