Skip to content

Commit

Permalink
Add Robert's suggested changes. Fixes #229, fixes #197, fixes #210.
Browse files Browse the repository at this point in the history
It should be noted that the issues with Profile are specific to Profile itself not the core. The search and filter features in the viewmembers function are not functioning because the results are not processed. Searching for users using the main site search works fine.
  • Loading branch information
craigh committed Feb 4, 2012
1 parent 3798d76 commit e9e5c63
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/util/DBUtil.php
Expand Up @@ -2260,7 +2260,7 @@ public static function selectExpandedFieldArray($table, $joinInfo, $field, $wher
$tables = self::getTables();
$tableName = $tables[$table];
$columns = $tables["{$table}_column"];
$fieldName = $columns[$field];
$fieldName = isset($columns[$field]) ? 'tbl.'.$columns[$field] : $field;

$sqlJoinArray = self::_processJoinArray($table, $joinInfo);
$sqlJoin = $sqlJoinArray[0];
Expand All @@ -2269,8 +2269,7 @@ public static function selectExpandedFieldArray($table, $joinInfo, $field, $wher
$where = self::_checkWhereClause($where);
$orderby = self::_checkOrderByClause($orderby, $table);

$alias = empty($sqlJoinArray[0]) ? 'tbl.' : 'a.';
$dSql = ($distinct ? "DISTINCT({$alias}$fieldName)" : "{$alias}$fieldName");
$dSql = ($distinct ? "DISTINCT($fieldName)" : "$fieldName");
$sqlStart = "SELECT $dSql ";
$sqlFrom = "FROM $tableName AS tbl ";

Expand Down

0 comments on commit e9e5c63

Please sign in to comment.