You are here

function mobile_tools_get_module_names in Mobile Tools 6

Same name and namespace in other branches
  1. 5 mobile_tools.module \mobile_tools_get_module_names()
  2. 6.3 mobile_tools.admin.inc \mobile_tools_get_module_names()
  3. 6.2 mobile_tools.admin.inc \mobile_tools_get_module_names()
  4. 7.2 mobile_tools.admin.inc \mobile_tools_get_module_names()

return the human readable name of the modules

1 call to mobile_tools_get_module_names()
_mobile_tools_external in ./mobile_tools.admin.inc
Help function that retrieves the modules that implement the hook_is_mobile_device() or hook_is_mobile_site() hooks.

File

./mobile_tools.admin.inc, line 340
Adminstrative pages for Mobile Tools

Code

function mobile_tools_get_module_names($modules) {
  $output = array();
  foreach ($modules as $module_key => $module_value) {
    $query = "SELECT * FROM {system} WHERE type = '%s' AND name = '%s'";
    $result = db_query($query, 'module', $module_value);
    $item = db_fetch_object($result);
    $info = $item->info;
    $info = unserialize($info);
    $output[$module_value] = $info['name'];
  }
  return $output;
}