function advanced_help_get_sids in Advanced Help 5
Same name and namespace in other branches
- 6 advanced_help.module \advanced_help_get_sids()
- 7 advanced_help.module \advanced_help_get_sids()
Get or create an sid (search id) that correllates to each topic for the search system.
1 call to advanced_help_get_sids()
- advanced_help_update_index in ./
advanced_help.module - Implementation of hook_update_index().
File
- ./
advanced_help.module, line 654 - advanced_help.module
Code
function advanced_help_get_sids(&$topics) {
global $language;
$result = db_query("SELECT * FROM {advanced_help_index} WHERE language = '%s'", $language->language);
while ($sid = db_fetch_object($result)) {
if (empty($topics[$sid->module][$sid->topic])) {
db_query("DELETE FROM {advanced_help_index} WHERE sid = %d", $sid->sid);
}
else {
$topics[$sid->module][$sid->topic]['sid'] = $sid->sid;
}
}
}