Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
ab7815c8
Commit
ab7815c8
authored
Mar 18, 2005
by
Steven Wittens
Browse files
-
#19063
: Use module_implements instead of hand-rolled routine.
parent
332a5633
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/search.module
View file @
ab7815c8
...
...
@@ -301,22 +301,8 @@ function search_keywords_variation($text) {
* Invokes hook_search_preprocess() in modules.
*/
function
search_preprocess
(
&
$text
)
{
static
$modules
=
null
;
// Cache list of modules which implement this hook. This function gets called
// a lot during reindexing.
if
(
!
is_array
(
$modules
))
{
$modules
=
array
();
foreach
(
module_list
()
as
$module
)
{
if
(
module_hook
(
$module
,
'search_preprocess'
))
{
$modules
[]
=
$module
;
}
}
}
// Process $text
if
(
count
(
$modules
)
>
0
)
{
foreach
(
$modules
as
$module
)
{
$text
=
module_invoke
(
$module
,
'search_preprocess'
,
$text
);
}
foreach
(
module_implements
(
'search_preprocess'
)
as
$module
)
{
$text
=
module_invoke
(
$module
,
'search_preprocess'
,
$text
);
}
}
...
...
modules/search/search.module
View file @
ab7815c8
...
...
@@ -301,22 +301,8 @@ function search_keywords_variation($text) {
* Invokes hook_search_preprocess() in modules.
*/
function
search_preprocess
(
&
$text
)
{
static
$modules
=
null
;
// Cache list of modules which implement this hook. This function gets called
// a lot during reindexing.
if
(
!
is_array
(
$modules
))
{
$modules
=
array
();
foreach
(
module_list
()
as
$module
)
{
if
(
module_hook
(
$module
,
'search_preprocess'
))
{
$modules
[]
=
$module
;
}
}
}
// Process $text
if
(
count
(
$modules
)
>
0
)
{
foreach
(
$modules
as
$module
)
{
$text
=
module_invoke
(
$module
,
'search_preprocess'
,
$text
);
}
foreach
(
module_implements
(
'search_preprocess'
)
as
$module
)
{
$text
=
module_invoke
(
$module
,
'search_preprocess'
,
$text
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment