advanced_help_get_sids

  1. drupal
    1. 6 advanced_help.module function
    2. 7 advanced_help.module function
Drupal 7 advanced_help_get_sids(&$topics)

Get or create an sid (search id) that correllates to each topic for the search system.

1 call to advanced_help_get_sids()

File

sites/all/modules/advanced_help/advanced_help.module, line 884
Pluggable system to provide advanced help facilities for Drupal and modules.

Code

function advanced_help_get_sids(&$topics) {
  global $language;
  $result = db_query("SELECT * FROM {advanced_help_index} WHERE language = :language", 
    array(':language' => $language->language));
  foreach ($result as $sid) {
    if (empty($topics[$sid->module][$sid->topic])) {
      db_query("DELETE FROM {advanced_help_index} WHERE sid = :sid", 
        array(':sid' => $sid->sid));
    }
    else {
      $topics[$sid->module][$sid->topic]['sid'] = $sid->sid;
    }
  }
}