Révision 6ff32cea
Ajouté par Florent Torregrosa il y a environ 9 ans
drupal7/modules/search/search.extender.inc | ||
---|---|---|
149 | 149 |
$this->searchExpression = $expression; |
150 | 150 |
$this->type = $module; |
151 | 151 |
|
152 |
// Add a search_* tag. This needs to be added before any preExecute methods |
|
153 |
// for decorated queries are called, as $this->prepared will be set to TRUE |
|
154 |
// and tags added in the execute method will never get used. For example, |
|
155 |
// if $query is extended by 'SearchQuery' then 'PagerDefault', the |
|
156 |
// search-specific tag will be added too late (when preExecute() has |
|
157 |
// already been called from the PagerDefault extender), and as a |
|
158 |
// consequence will not be available to hook_query_alter() implementations, |
|
159 |
// nor will the correct hook_query_TAG_alter() implementations get invoked. |
|
160 |
// See node_search_execute(). |
|
161 |
$this->addTag('search_' . $module); |
|
162 |
|
|
152 | 163 |
return $this; |
153 | 164 |
} |
154 | 165 |
|
... | ... | |
494 | 505 |
$this->orderBy('calculated_score', 'DESC'); |
495 | 506 |
} |
496 | 507 |
|
497 |
// Add tag and useful metadata.
|
|
508 |
// Add useful metadata. |
|
498 | 509 |
$this |
499 |
->addTag('search_' . $this->type) |
|
500 | 510 |
->addMetaData('normalize', $this->normalize) |
501 | 511 |
->fields('i', array('type', 'sid')); |
502 | 512 |
|
Formats disponibles : Unified diff
Update core to 7.36