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;
|
||||
|
||||
/**
|
||||
* Site_views Model
|
||||
*/
|
||||
@ -30,7 +32,7 @@ class ComponentbuilderModelSite_views extends JModelList
|
||||
'a.system_name','system_name',
|
||||
'a.name','name',
|
||||
'a.description','description',
|
||||
'a.main_get','main_get',
|
||||
'g.name',
|
||||
'a.context','context',
|
||||
'a.add_php_ajax','add_php_ajax',
|
||||
'a.add_custom_button','add_custom_button'
|
||||
@ -265,7 +267,7 @@ class ComponentbuilderModelSite_views 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));
|
||||
@ -312,7 +314,7 @@ class ComponentbuilderModelSite_views 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