You are here

function system_service_module_exists in Services 6.2

Same name and namespace in other branches
  1. 5 services/system_service/system_service.module \system_service_module_exists()
  2. 6 services/system_service/system_service.inc \system_service_module_exists()
  3. 7 services/system_service/system_service.inc \system_service_module_exists()

Check if a module is enabled. If so, return its version.

Parameters

$module: The name of the module to check.

Return value

The module's version string, or nothing if the module is not enable or installed.

1 string reference to 'system_service_module_exists'
system_service_service in services/system_service/system_service.module
Implementation of hook_service().

File

services/system_service/system_service.inc, line 114
Link general system functionalities to services module.

Code

function system_service_module_exists($module) {
  if (module_exists($module)) {
    $modules = module_rebuild_cache();
    if (array_key_exists($module, $modules)) {
      return (string) $modules[$module]->info['version'];
    }
  }
  return "";
}