function drush_get_project_status

3.x environment.inc drush_get_project_status($project)

Calculate a project status based on current status and schema version.

Parameters

$project: Array of a single project info.

Return value

String describing project status. Values: enabled|disabled|not installed

2 calls to drush_get_project_status()
drush_pm_list in commands/pm/pm.drush.inc
Command callback. Show a list of modules and status.
_drush_pm_info_project in commands/pm/pm.drush.inc
Return a string with general info of a project (module or theme).

File

includes/environment.inc, line 1052
Functions used by drush to query the environment and setting the current configuration.

Code

function drush_get_project_status($project) {
  if (($project->type == 'module') && ($project->schema_version == -1)) {
    $status = "not installed";
  }
  else {
    $status = ($project->status == 1) ? 'enabled' : 'disabled';
  }

  return $status;
}