diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-10-13 02:14:05 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-10-13 02:14:05 +0000 |
commit | 9058a8984d76ae238bdc3a45a1c41dfa9012445c (patch) | |
tree | a9dfd57d0dc97b22f4199eda99dc196ba6ba458d /modules/update/update.compare.inc | |
parent | cad226e60bc5827050789d4900f1a17907c203d3 (diff) | |
download | brdo-9058a8984d76ae238bdc3a45a1c41dfa9012445c.tar.gz brdo-9058a8984d76ae238bdc3a45a1c41dfa9012445c.tar.bz2 |
- Patch #597484 by dww: use the Queue API to fetch available update data.
Diffstat (limited to 'modules/update/update.compare.inc')
-rw-r--r-- | modules/update/update.compare.inc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/update/update.compare.inc b/modules/update/update.compare.inc index db216d7cf..389c30d76 100644 --- a/modules/update/update.compare.inc +++ b/modules/update/update.compare.inc @@ -406,7 +406,7 @@ function update_calculate_project_data($available) { break; case 'not-fetched': $projects[$project]['status'] = UPDATE_NOT_FETCHED; - $projects[$project]['reason'] = t('Failed to fetch available update data'); + $projects[$project]['reason'] = t('Failed to get available update data.'); break; default: @@ -469,6 +469,17 @@ function update_calculate_project_data($available) { $version_patch_changed = ''; $patch = ''; + // If the project is marked as UPDATE_FETCH_PENDING, it means that the + // data we currently have (if any) is stale, and we've got a task queued + // up to (re)fetch the data. In that case, we mark it as such, merge in + // whatever data we have (e.g. project title and link), and move on. + if (!empty($available[$project]['fetch_status']) && $available[$project]['fetch_status'] == UPDATE_FETCH_PENDING) { + $projects[$project]['status'] = UPDATE_FETCH_PENDING; + $projects[$project]['reason'] = t('No available update data'); + $projects[$project] += $available[$project]; + continue; + } + // Defend ourselves from XML history files that contain no releases. if (empty($available[$project]['releases'])) { $projects[$project]['status'] = UPDATE_UNKNOWN; |