Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
Call to a member function qn() on a non-object
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnsl committed Aug 7, 2011
1 parent c61d127 commit defe9c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/joomla/form/fields/rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ protected function getUserGroups()
{
// Initialise variables.
$db = JFactory::getDBO();
$query = $db->getQuery(true)->select('a.id AS value, a.title AS text, COUNT(DISTINCT b.id) AS level, a.parent_id')
$query = $db->getQuery(true);
$query->select('a.id AS value, a.title AS text, COUNT(DISTINCT b.id) AS level, a.parent_id')
->from('#__usergroups AS a')->leftJoin($query->qn('#__usergroups') . ' AS b ON a.lft > b.lft AND a.rgt < b.rgt')->group('a.id')
->order('a.lft ASC');

Expand Down

0 comments on commit defe9c2

Please sign in to comment.