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
advanced_help
Commits
ea33e1d4
Commit
ea33e1d4
authored
Jan 17, 2011
by
dmitrig01
Browse files
#990128
by dmitrig01: fix search integration.
parent
a9f4ab9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
advanced_help.module
View file @
ea33e1d4
...
...
@@ -855,6 +855,29 @@ function advanced_help_search_reset() {
variable_del
(
'advanced_help_last_cron'
);
}
/**
* Implements hook_search_status().
*/
function
advanced_help_search_status
()
{
$topics
=
advanced_help_get_topics
();
$total
=
0
;
foreach
(
$topics
as
$module
=>
$module_topics
)
{
foreach
(
$module_topics
as
$topic
=>
$info
)
{
$file
=
advanced_help_get_topic_filename
(
$module
,
$topic
);
if
(
$file
)
{
$total
++
;
}
}
}
$last_cron
=
variable_get
(
'advanced_help_last_cron'
,
array
(
'time'
=>
0
));
$indexed
=
0
;
if
(
$last_cron
[
'time'
]
!=
0
)
{
$indexed
=
db_query
(
"SELECT COUNT(*) FROM
{
search_dataset
}
sd WHERE sd.type = 'help' AND sd.sid IS NOT NULL AND sd.reindex = 0"
)
->
fetchField
();
}
return
array
(
'remaining'
=>
$total
-
$indexed
,
'total'
=>
$total
);
}
/**
* Get or create an sid (search id) that correllates to each topic for
* the search system.
...
...
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