Commit c9a4862f authored by David Lesieur's avatar David Lesieur

Updated comments.

parent 8e478f14
......@@ -9,15 +9,6 @@
// TODO: Have a list of prohibited widgets? (to avoid people being able to
// enable longtext fields as facets)
// TODO: Support formatters (right now only the default formatter is used).
// TODO: Support fields that store multiple database columns (which means we'll
// have to parse and search multiple values per field OR have a way to select
// what column(s) to use). At the moment only the first column is taken into
// account.
// TODO: Implement specialized classes for Date, NodeReference, UserReference, etc.
require_once('./'. drupal_get_path('module', 'faceted_search') .'/faceted_search.inc');
/**
......@@ -331,6 +322,8 @@ class cck_facet_category extends faceted_search_category {
*/
function build_results_query(&$query) {
$db_info = content_database_info($this->_field);
// Since the table might be joined multiple times in the query, we use the
// field's name in the table alias to create a unique table reference.
$query->add_table($db_info['table'], 'vid', 'n', 'vid', $db_info['table'] .'_'. $this->_field['field_name']);
$column = reset($db_info['columns']); // Get the first database column. Other columns are ignored.
switch($column['type']) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment