Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d720c661
Commit
d720c661
authored
Jul 29, 2005
by
Steven Wittens
Browse files
-
#26458
: node_search doesn't node_view, causing bad snippets.
parent
d9d4b9bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/node.module
View file @
d720c661
...
...
@@ -562,6 +562,17 @@ function node_search($op = 'search', $keys = null) {
$results
=
array
();
foreach
(
$find
as
$item
)
{
$node
=
node_load
(
$item
);
// Get node output (filtered and with module-specific fields).
if
(
node_hook
(
$node
,
'view'
))
{
node_invoke
(
$node
,
'view'
,
false
,
false
);
}
else
{
$node
=
node_prepare
(
$node
,
false
);
}
// Allow modules to change $node->body before viewing.
node_invoke_nodeapi
(
$node
,
'view'
,
false
,
false
);
$extra
=
node_invoke_nodeapi
(
$node
,
'search result'
);
$results
[]
=
array
(
'link'
=>
url
(
'node/'
.
$item
),
'type'
=>
node_invoke
(
$node
,
'node_name'
),
...
...
modules/node/node.module
View file @
d720c661
...
...
@@ -562,6 +562,17 @@ function node_search($op = 'search', $keys = null) {
$results
=
array
();
foreach
(
$find
as
$item
)
{
$node
=
node_load
(
$item
);
// Get node output (filtered and with module-specific fields).
if
(
node_hook
(
$node
,
'view'
))
{
node_invoke
(
$node
,
'view'
,
false
,
false
);
}
else
{
$node
=
node_prepare
(
$node
,
false
);
}
// Allow modules to change $node->body before viewing.
node_invoke_nodeapi
(
$node
,
'view'
,
false
,
false
);
$extra
=
node_invoke_nodeapi
(
$node
,
'search result'
);
$results
[]
=
array
(
'link'
=>
url
(
'node/'
.
$item
),
'type'
=>
node_invoke
(
$node
,
'node_name'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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