function StatusInfoDrupal7::afterGetStatus

8.0.x StatusInfoDrupal7.php StatusInfoDrupal7::afterGetStatus(&$update_info, $projects, $check_disabled)
7.x StatusInfoDrupal7.php StatusInfoDrupal7::afterGetStatus(&$update_info, $projects, $check_disabled)
master StatusInfoDrupal7.php StatusInfoDrupal7::afterGetStatus(&$update_info, $projects, $check_disabled)

Perform adjustments after running get status.

  • Restore check-disabled setting in update module.
  • Adjust project type for disabled projects.

Overrides StatusInfoDrupal8::afterGetStatus

1 method overrides StatusInfoDrupal7::afterGetStatus()
StatusInfoDrupal6::afterGetStatus in lib/Drush/UpdateService/StatusInfoDrupal6.php
Perform adjustments after running get status.

File

lib/Drush/UpdateService/StatusInfoDrupal7.php, line 35
Implementation of 'drupal' update_status engine for Drupal 7.

Namespace

Drush\UpdateService

Class

StatusInfoDrupal7

Code

function afterGetStatus(&$update_info, $projects, $check_disabled) {
  // Restore Drupal settings.
  if (!is_null($check_disabled)) {
    global $conf;
    $conf['update_check_disabled'] = $this->update_check_disabled;
    unset($this->update_check_disabled);
  }

  // update.module sets a different project type
  // for disabled projects. Here we normalize it.
  if ($check_disabled) {
    foreach ($update_info as $key => $project) {
      if (in_array($project['project_type'], array('module-disabled', 'theme-disabled'))) {
        $update_info[$key]['project_type'] = substr($project['project_type'], 0, strpos($project['project_type'], '-'));
      }
    }
  }
}