X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Flib%2FDrush%2FUpdateService%2FStatusInfoDrupal7.php;fp=vendor%2Fdrush%2Fdrush%2Flib%2FDrush%2FUpdateService%2FStatusInfoDrupal7.php;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=0e6ae6eb46c37e7bbfe79880a7f881da07f7a271;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/drush/drush/lib/Drush/UpdateService/StatusInfoDrupal7.php b/vendor/drush/drush/lib/Drush/UpdateService/StatusInfoDrupal7.php deleted file mode 100644 index 0e6ae6eb4..000000000 --- a/vendor/drush/drush/lib/Drush/UpdateService/StatusInfoDrupal7.php +++ /dev/null @@ -1,109 +0,0 @@ -update_check_disabled = $conf['update_check_disabled']; - $conf['update_check_disabled'] = $check_disabled; - } - } - - /** - * {@inheritdoc} - */ - 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'], '-')); - } - } - } - } - - /** - * Obtains release info for all installed projects via update.module. - * - * @see update_get_available(). - * @see update_manual_status(). - */ - protected function getAvailableReleases() { - // Force to invalidate some caches that are only cleared - // when visiting update status report page. This allow to detect changes in - // .info files. - _update_cache_clear('update_project_data'); - _update_cache_clear('update_project_projects'); - - // From update_get_available(): Iterate all projects and create a fetch task - // for those we have no information or is obsolete. - $available = _update_get_cached_available_releases(); - - module_load_include('inc', 'update', 'update.compare'); - $update_projects = update_get_projects(); - - foreach ($update_projects as $key => $project) { - if (empty($available[$key])) { - update_create_fetch_task($project); - continue; - } - if ($project['info']['_info_file_ctime'] > $available[$key]['last_fetch']) { - $available[$key]['fetch_status'] = UPDATE_FETCH_PENDING; - } - if (empty($available[$key]['releases'])) { - $available[$key]['fetch_status'] = UPDATE_FETCH_PENDING; - } - if (!empty($available[$key]['fetch_status']) && $available[$key]['fetch_status'] == UPDATE_FETCH_PENDING) { - update_create_fetch_task($project); - } - } - - // Set a batch to process all pending tasks. - $batch = array( - 'operations' => array( - array('update_fetch_data_batch', array()), - ), - 'finished' => 'update_fetch_data_finished', - 'file' => drupal_get_path('module', 'update') . '/update.fetch.inc', - ); - batch_set($batch); - drush_backend_batch_process(); - - // Clear any error set by a failed update fetch task. This avoid rollbacks. - drush_clear_error(); - - // Calculate update status data. - $available = _update_get_cached_available_releases(); - return $available; - } -} -