You are here

public function PurgeDependModule::check_depend in Purge 7.2

Checks if the modules are installed and enabled.

Parameters

string $module_name:

File

includes/purge.class.inc, line 218
Contains all class and interface definitions for Purge.

Class

PurgeDependModule
Checks if a module is enabled.

Code

public function check_depend($module_name = NULL) {
  $pass = 0;
  if (!is_null($module_name)) {
    $modules = array(
      $module_name => 0,
    );
  }
  else {
    $modules = $this->modules;
  }
  foreach ($modules as $module_name => $module_status) {
    if (module_exists($module_name)) {
      $this->module_status[$module_name] = 1;
      $pass = 1;
    }
  }
  return $pass;
}