Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -129,10 +129,14 @@ |
130 | 130 | // Something's wrong - exit |
131 | 131 | return $categories; |
132 | 132 | } |
133 | | - $conditions = "cl_from='$titlekey'"; |
| 133 | + $conditions['cl_from'] = $titlekey; |
134 | 134 | } |
135 | | - $res = $db->select( $db->tableName( 'categorylinks' ), |
136 | | - 'distinct cl_to', $conditions, __METHOD__ ); |
| 135 | + $res = $db->select( |
| 136 | + 'categorylinks', |
| 137 | + 'DISTINCT cl_to', |
| 138 | + $conditions, |
| 139 | + __METHOD__ |
| 140 | + ); |
137 | 141 | if ( $db->numRows( $res ) > 0 ) { |
138 | 142 | while ( $row = $db->fetchRow( $res ) ) { |
139 | 143 | $categories[] = $row[0]; |