Mercurial > defr > drupal > core
comparison modules/update/update.compare.inc @ 11:589fb7c02327 6.5
Drupal 6.5
| author | Franck Deroche <webmaster@defr.org> |
|---|---|
| date | Tue, 23 Dec 2008 14:32:19 +0100 |
| parents | acef7ccb09b5 |
| children |
comparison
equal
deleted
inserted
replaced
| 10:6f15c9d74937 | 11:589fb7c02327 |
|---|---|
| 1 <?php | 1 <?php |
| 2 // $Id: update.compare.inc,v 1.8.2.1 2008/08/12 05:10:12 dries Exp $ | 2 // $Id: update.compare.inc,v 1.8.2.2 2008/08/28 08:14:56 dries Exp $ |
| 3 | 3 |
| 4 /** | 4 /** |
| 5 * @file | 5 * @file |
| 6 * Code required only when comparing available updates to existing data. | 6 * Code required only when comparing available updates to existing data. |
| 7 */ | 7 */ |
| 347 $projects[$project]['reason'] = t('No available releases found'); | 347 $projects[$project]['reason'] = t('No available releases found'); |
| 348 continue; | 348 continue; |
| 349 } | 349 } |
| 350 foreach ($available[$project]['releases'] as $version => $release) { | 350 foreach ($available[$project]['releases'] as $version => $release) { |
| 351 // First, if this is the existing release, check a few conditions. | 351 // First, if this is the existing release, check a few conditions. |
| 352 if ($projects[$project]['existing_version'] == $version) { | 352 if ($projects[$project]['existing_version'] === $version) { |
| 353 if (isset($release['terms']['Release type']) && | 353 if (isset($release['terms']['Release type']) && |
| 354 in_array('Insecure', $release['terms']['Release type'])) { | 354 in_array('Insecure', $release['terms']['Release type'])) { |
| 355 $projects[$project]['status'] = UPDATE_NOT_SECURE; | 355 $projects[$project]['status'] = UPDATE_NOT_SECURE; |
| 356 } | 356 } |
| 357 elseif ($release['status'] == 'unpublished') { | 357 elseif ($release['status'] == 'unpublished') { |
| 436 $available[$project]['recommended'] = $version_patch_changed; | 436 $available[$project]['recommended'] = $version_patch_changed; |
| 437 } | 437 } |
| 438 } | 438 } |
| 439 | 439 |
| 440 // Stop searching once we hit the currently installed version. | 440 // Stop searching once we hit the currently installed version. |
| 441 if ($projects[$project]['existing_version'] == $version) { | 441 if ($projects[$project]['existing_version'] === $version) { |
| 442 break; | 442 break; |
| 443 } | 443 } |
| 444 | 444 |
| 445 // If we're running a dev snapshot and have a timestamp, stop | 445 // If we're running a dev snapshot and have a timestamp, stop |
| 446 // searching for security updates once we hit an official release | 446 // searching for security updates once we hit an official release |
| 511 } | 511 } |
| 512 | 512 |
| 513 // Figure out the status, based on what we've seen and the install type. | 513 // Figure out the status, based on what we've seen and the install type. |
| 514 switch ($projects[$project]['install_type']) { | 514 switch ($projects[$project]['install_type']) { |
| 515 case 'official': | 515 case 'official': |
| 516 if ($projects[$project]['existing_version'] == $projects[$project]['recommended'] || $projects[$project]['existing_version'] == $projects[$project]['latest_version']) { | 516 if ($projects[$project]['existing_version'] === $projects[$project]['recommended'] || $projects[$project]['existing_version'] === $projects[$project]['latest_version']) { |
| 517 $projects[$project]['status'] = UPDATE_CURRENT; | 517 $projects[$project]['status'] = UPDATE_CURRENT; |
| 518 } | 518 } |
| 519 else { | 519 else { |
| 520 $projects[$project]['status'] = UPDATE_NOT_CURRENT; | 520 $projects[$project]['status'] = UPDATE_NOT_CURRENT; |
| 521 } | 521 } |
