diff --git a/plugins/finder/categories/categories.php b/plugins/finder/categories/categories.php index ed2e30e552aae..65add732e1025 100644 --- a/plugins/finder/categories/categories.php +++ b/plugins/finder/categories/categories.php @@ -199,13 +199,11 @@ public function onFinderChangeState($context, $pks, $value) */ foreach ($pks as $pk) { - /* TODO: The $item variable does not seem to be used at all $query = clone($this->getStateQuery()); $query->where('a.id = ' . (int) $pk); $this->db->setQuery($query); $item = $this->db->loadObject(); - */ // Translate the state. $state = null; @@ -395,6 +393,7 @@ protected function getStateQuery() { $query = $this->db->getQuery(true) ->select($this->db->quoteName('a.id')) + ->select($this->db->quoteName('a.parent_id')) ->select('a.' . $this->state_field . ' AS state, c.published AS cat_state') ->select('a.access, c.access AS cat_access') ->from($this->db->quoteName('#__categories') . ' AS a')