diff --git a/administrator/components/com_content/config.xml b/administrator/components/com_content/config.xml index d467380a479cb..530e8ecf937b9 100644 --- a/administrator/components/com_content/config.xml +++ b/administrator/components/com_content/config.xml @@ -762,6 +762,7 @@
- - + + - - + +
diff --git a/administrator/components/com_content/models/articles.php b/administrator/components/com_content/models/articles.php index dd4606404256a..2528fc9b48bbf 100644 --- a/administrator/components/com_content/models/articles.php +++ b/administrator/components/com_content/models/articles.php @@ -52,7 +52,8 @@ public function __construct($config = array()) 'author_id', 'category_id', 'level', - 'tag' + 'tag', + 'rating_count', 'rating', ); if (JLanguageAssociations::isEnabled()) @@ -322,14 +323,8 @@ protected function getListQuery() } // Add the list ordering clause. - $orderCol = $this->state->get('list.fullordering', 'a.id'); - $orderDirn = ''; - - if (empty($orderCol)) - { - $orderCol = $this->state->get('list.ordering', 'a.id'); - $orderDirn = $this->state->get('list.direction', 'DESC'); - } + $orderCol = $this->state->get('list.ordering', 'a.id'); + $orderDirn = $this->state->get('list.direction', 'DESC'); $query->order($db->escape($orderCol) . ' ' . $db->escape($orderDirn)); diff --git a/administrator/components/com_content/models/featured.php b/administrator/components/com_content/models/featured.php index 1293c1abacc2a..c66dc0921f4f4 100644 --- a/administrator/components/com_content/models/featured.php +++ b/administrator/components/com_content/models/featured.php @@ -55,7 +55,8 @@ public function __construct($config = array()) 'author_id', 'category_id', 'level', - 'tag' + 'tag', + 'rating_count', 'rating', ); } @@ -220,14 +221,8 @@ protected function getListQuery() } // Add the list ordering clause. - $orderCol = $this->state->get('list.fullordering', 'a.title'); - $orderDirn = ''; - - if (empty($orderCol)) - { - $orderCol = $this->state->get('list.ordering', 'a.title'); - $orderDirn = $this->state->get('list.direction', 'ASC'); - } + $orderCol = $this->state->get('list.ordering', 'a.title'); + $orderDirn = $this->state->get('list.direction', 'ASC'); $query->order($db->escape($orderCol) . ' ' . $db->escape($orderDirn)); diff --git a/administrator/components/com_content/models/fields/votelist.php b/administrator/components/com_content/models/fields/votelist.php new file mode 100644 index 0000000000000..e28b05024b5b5 --- /dev/null +++ b/administrator/components/com_content/models/fields/votelist.php @@ -0,0 +1,43 @@ +get('id'); -$listOrder = str_replace(' ' . $this->state->get('list.direction'), '', $this->state->get('list.fullordering')); +$listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $saveOrder = $listOrder == 'a.ordering'; $columns = 10; diff --git a/administrator/components/com_content/views/featured/tmpl/default.php b/administrator/components/com_content/views/featured/tmpl/default.php index 4c41a9168e3b5..f930cbd384a7e 100644 --- a/administrator/components/com_content/views/featured/tmpl/default.php +++ b/administrator/components/com_content/views/featured/tmpl/default.php @@ -17,7 +17,7 @@ $user = JFactory::getUser(); $userId = $user->get('id'); -$listOrder = str_replace(' ' . $this->state->get('list.direction'), '', $this->state->get('list.fullordering')); +$listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); $saveOrder = $listOrder == 'fp.ordering'; $columns = 10; diff --git a/libraries/joomla/form/fields/list.php b/libraries/joomla/form/fields/list.php index f5e6fdf563d2a..d28832dacffa9 100644 --- a/libraries/joomla/form/fields/list.php +++ b/libraries/joomla/form/fields/list.php @@ -117,12 +117,6 @@ protected function getOptions() { continue; } - - // Requires vote plugin enabled - if (in_array('vote', $requires) && !JPluginHelper::isEnabled('content', 'vote')) - { - continue; - } } $value = (string) $option['value'];