You are here

function advanced_help_get_module_name in Advanced Help 6

Same name and namespace in other branches
  1. 5 advanced_help.module \advanced_help_get_module_name()
  2. 7 advanced_help.module \advanced_help_get_module_name()

Small helper function to get a module's proper name.

2 calls to advanced_help_get_module_name()
advanced_help_index_page in ./advanced_help.module
Page callback to view the advanced help topic index.
advanced_help_topic_page in ./advanced_help.module
Page callback to view a help topic.

File

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

Code

function advanced_help_get_module_name($module) {
  $settings = advanced_help_get_settings();
  if (isset($settings[$module]['name'])) {
    $name = $settings[$module]['name'];
  }
  else {
    $info = db_fetch_object(db_query("SELECT * FROM {system} WHERE name = '%s'", $module));
    $info = unserialize($info->info);
    $name = t($info['name']);
  }
  return $name;
}