@@ -4,8 +4,8 @@ package = Testing
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2012-10-17
|
||||
version = "7.16"
|
||||
; Information added by drupal.org packaging script on 2012-11-07
|
||||
version = "7.17"
|
||||
project = "drupal"
|
||||
datestamp = "1350508567"
|
||||
datestamp = "1352325357"
|
||||
|
||||
|
@@ -4,8 +4,8 @@ package = Testing
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2012-10-17
|
||||
version = "7.16"
|
||||
; Information added by drupal.org packaging script on 2012-11-07
|
||||
version = "7.17"
|
||||
project = "drupal"
|
||||
datestamp = "1350508567"
|
||||
datestamp = "1352325357"
|
||||
|
||||
|
@@ -4,8 +4,8 @@ package = Testing
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2012-10-17
|
||||
version = "7.16"
|
||||
; Information added by drupal.org packaging script on 2012-11-07
|
||||
version = "7.17"
|
||||
project = "drupal"
|
||||
datestamp = "1350508567"
|
||||
datestamp = "1352325357"
|
||||
|
||||
|
@@ -3,8 +3,8 @@ description = Test theme which acts as a base theme for other test subthemes.
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2012-10-17
|
||||
version = "7.16"
|
||||
; Information added by drupal.org packaging script on 2012-11-07
|
||||
version = "7.17"
|
||||
project = "drupal"
|
||||
datestamp = "1350508567"
|
||||
datestamp = "1352325357"
|
||||
|
||||
|
@@ -4,8 +4,8 @@ core = 7.x
|
||||
base theme = update_test_basetheme
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2012-10-17
|
||||
version = "7.16"
|
||||
; Information added by drupal.org packaging script on 2012-11-07
|
||||
version = "7.17"
|
||||
project = "drupal"
|
||||
datestamp = "1350508567"
|
||||
datestamp = "1352325357"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ version = VERSION
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2012-10-17
|
||||
version = "7.16"
|
||||
; Information added by drupal.org packaging script on 2012-11-07
|
||||
version = "7.17"
|
||||
project = "drupal"
|
||||
datestamp = "1350508567"
|
||||
datestamp = "1352325357"
|
||||
|
||||
|
@@ -592,7 +592,10 @@ function update_calculate_project_update_status($project, &$project_data, $avail
|
||||
|
||||
// See if this is a higher major version than our target and yet still
|
||||
// supported. If so, record it as an "Also available" release.
|
||||
if ($release['version_major'] > $target_major) {
|
||||
// Note: some projects have a HEAD release from CVS days, which could
|
||||
// be one of those being compared. They would not have version_major
|
||||
// set, so we must call isset first.
|
||||
if (isset($release['version_major']) && $release['version_major'] > $target_major) {
|
||||
if (in_array($release['version_major'], $supported_majors)) {
|
||||
if (!isset($project_data['also'])) {
|
||||
$project_data['also'] = array();
|
||||
|
@@ -288,17 +288,25 @@ function _update_build_fetch_url($project, $site_key = '') {
|
||||
$name = $project['name'];
|
||||
$url = _update_get_fetch_url_base($project);
|
||||
$url .= '/' . $name . '/' . DRUPAL_CORE_COMPATIBILITY;
|
||||
// Only append a site_key and the version information if we have a site_key
|
||||
// in the first place, and if this is not a disabled module or theme. We do
|
||||
// not want to record usage statistics for disabled code.
|
||||
|
||||
// Only append usage infomation if we have a site key and the project is
|
||||
// enabled. We do not want to record usage statistics for disabled projects.
|
||||
if (!empty($site_key) && (strpos($project['project_type'], 'disabled') === FALSE)) {
|
||||
// Append the site key.
|
||||
$url .= (strpos($url, '?') !== FALSE) ? '&' : '?';
|
||||
$url .= 'site_key=';
|
||||
$url .= rawurlencode($site_key);
|
||||
|
||||
// Append the version.
|
||||
if (!empty($project['info']['version'])) {
|
||||
$url .= '&version=';
|
||||
$url .= rawurlencode($project['info']['version']);
|
||||
}
|
||||
|
||||
// Append the list of modules or themes enabled.
|
||||
$list = array_keys($project['includes']);
|
||||
$url .= '&list=';
|
||||
$url .= rawurlencode(implode(',', $list));
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = update.test
|
||||
configure = admin/reports/updates/settings
|
||||
|
||||
; Information added by drupal.org packaging script on 2012-10-17
|
||||
version = "7.16"
|
||||
; Information added by drupal.org packaging script on 2012-11-07
|
||||
version = "7.17"
|
||||
project = "drupal"
|
||||
datestamp = "1350508567"
|
||||
datestamp = "1352325357"
|
||||
|
||||
|
@@ -769,6 +769,7 @@ class UpdateCoreUnitTestCase extends DrupalUnitTestCase {
|
||||
$project['project_type'] = '';
|
||||
$project['info']['version'] = '';
|
||||
$project['info']['project status url'] = 'http://www.example.com';
|
||||
$project['includes'] = array('module1' => 'Module 1', 'module2' => 'Module 2');
|
||||
$site_key = '';
|
||||
$expected = 'http://www.example.com/' . $project['name'] . '/' . DRUPAL_CORE_COMPATIBILITY;
|
||||
$url = _update_build_fetch_url($project, $site_key);
|
||||
@@ -785,14 +786,16 @@ class UpdateCoreUnitTestCase extends DrupalUnitTestCase {
|
||||
$project['project_type'] = '';
|
||||
$expected = 'http://www.example.com/' . $project['name'] . '/' . DRUPAL_CORE_COMPATIBILITY;
|
||||
$expected .= '?site_key=site_key';
|
||||
$expected .= '&list=' . rawurlencode('module1,module2');
|
||||
$url = _update_build_fetch_url($project, $site_key);
|
||||
$this->assertEqual($url, $expected, "When site_key provided, '$url' should be '$expected'.");
|
||||
|
||||
// http://drupal.org/node/1481156 test incorrect logic when url contains
|
||||
// http://drupal.org/node/1481156 test incorrect logic when URL contains
|
||||
// a question mark.
|
||||
$project['info']['project status url'] = 'http://www.example.com/?project=';
|
||||
$expected = 'http://www.example.com/?project=/' . $project['name'] . '/' . DRUPAL_CORE_COMPATIBILITY;
|
||||
$expected .= '&site_key=site_key';
|
||||
$expected .= '&list=' . rawurlencode('module1,module2');
|
||||
$url = _update_build_fetch_url($project, $site_key);
|
||||
$this->assertEqual($url, $expected, "When ? is present, '$url' should be '$expected'.");
|
||||
|
||||
|
Reference in New Issue
Block a user