|
@@ 383-398 (lines=16) @@
|
| 380 |
|
|
| 381 |
|
// If it is the field name and the field type has a single column |
| 382 |
|
// schema, add the field condition to the index query. |
| 383 |
|
if ($field_name == $filter_field && count($field_info['columns']) == 1) { |
| 384 |
|
$column = key($field_info['columns']); |
| 385 |
|
$query->fieldCondition($field_name, $column, $filter_value, $operator); |
| 386 |
|
break; |
| 387 |
|
} |
| 388 |
|
else { |
| 389 |
|
// Otherwise if the filter field contains a valid column |
| 390 |
|
// specification for the field type, add the field condition to |
| 391 |
|
// the index query. |
| 392 |
|
$column = substr($filter_field, strlen($field_name) + 1); |
| 393 |
|
|
| 394 |
|
if (in_array($column, array_keys($field_info['columns']))) { |
| 395 |
|
$query->fieldCondition($field_name, $column, $filter_value, $operator); |
| 396 |
|
break; |
| 397 |
|
} |
| 398 |
|
} |
| 399 |
|
} |
| 400 |
|
} |
| 401 |
|
} |
|
@@ 452-467 (lines=16) @@
|
| 449 |
|
|
| 450 |
|
// If it is the field name and the field type has a single column |
| 451 |
|
// schema, add the field condition to the index query. |
| 452 |
|
if ($field_name == $sort_field && count($field_info['columns']) == 1) { |
| 453 |
|
$column = key($field_info['columns']); |
| 454 |
|
$query->fieldOrderBy($field_name, $column, $direction); |
| 455 |
|
break; |
| 456 |
|
} |
| 457 |
|
else { |
| 458 |
|
// Otherwise if the sort field contains a valid column |
| 459 |
|
// specification for the field type, add the field condition to |
| 460 |
|
// the index query. |
| 461 |
|
$column = substr($sort_field, strlen($field_name) + 1); |
| 462 |
|
|
| 463 |
|
if (in_array($column, array_keys($field_info['columns']))) { |
| 464 |
|
$query->fieldOrderBy($field_name, $column, $direction); |
| 465 |
|
break; |
| 466 |
|
} |
| 467 |
|
} |
| 468 |
|
} |
| 469 |
|
} |
| 470 |
|
} |