You are here

function advanced_help_get_module_name in Advanced Help 5

Same name and namespace in other branches
  1. 6 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 306
advanced_help.module

Code

function advanced_help_get_module_name($module) {

  // Get name and filename from system table.
  $file = db_fetch_object(db_query("SELECT * FROM {system} WHERE name = '%s'", $module));

  // from module.inc line 106
  $file->info = _module_parse_info_file(dirname($file->filename) . '/' . $file->name . '.info');
  return t($file->info['name']);
}