function pm_update_filter

6.x drupal.inc pm_update_filter(&$project)
6.x drupal_6.inc pm_update_filter(&$project)
3.x drupal_6.inc pm_update_filter(&$project)
3.x drupal_7.inc pm_update_filter(&$project)
3.x drupal_5.inc pm_update_filter(&$project)
4.x drupal.inc pm_update_filter(&$project)
4.x drupal_6.inc pm_update_filter(&$project)
4.x drupal_5.inc pm_update_filter(&$project)
5.x drupal.inc pm_update_filter(&$project)
5.x drupal_6.inc pm_update_filter(&$project)

Returns a human readable message based on update status of a project.

It also may alter the project object and set $project['updateable'] and $project['candidate_version'].

Project statuses in Drupal 6 are:

  • UPDATE_NOT_SECURE
  • UPDATE_REVOKED
  • UPDATE_NOT_SUPPORTED
  • UPDATE_NOT_CURRENT
  • UPDATE_CURRENT
  • UPDATE_NOT_CHECKED
  • UPDATE_UNKNOWN
  • UPDATE_NOT_FETCHED

See also

pm_release_recommended()

1 call to pm_update_filter()
drush_pm_updatestatus in commands/pm/updatestatus.pm.inc
Command callback. Displays update status info of installed projects.

File

commands/pm/update_info/drupal_6.inc, line 27
Implementation of 'drupal' update_info engine for Drupal 6.

Code

function pm_update_filter(&$project) {
  switch ($project['status']) {
    case UPDATE_NOT_SECURE:
      $status = dt('SECURITY UPDATE available');
      pm_release_recommended($project);
      break;
    case UPDATE_REVOKED:
      $status = dt('Installed version REVOKED');
      pm_release_recommended($project);
      break;
    case UPDATE_NOT_SUPPORTED:
      $status = dt('Installed version not supported');
      pm_release_recommended($project);
      break;
    case UPDATE_NOT_CURRENT:
      $status = dt('Update available');
      pm_release_recommended($project);
      break;
    case UPDATE_NOT_CHECKED:
      $status = dt('Unable to check status');
      break;
    case UPDATE_CURRENT:
      $status = dt('Up to date');
      $project['candidate_version'] = $project['recommended'];
      break;
    case UPDATE_UNKNOWN:
    case UPDATE_NOT_FETCHED:
    default:
      $status = dt('Unknown');
      break;
  }
  return $status;
}