cvs diff: Diffing modules/update
Index: modules/update/update.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.api.php,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 update.api.php
--- modules/update/update.api.php	24 May 2009 17:39:35 -0000	1.2
+++ modules/update/update.api.php	1 Jun 2009 20:32:42 -0000
@@ -12,6 +12,46 @@
  */
 
 /**
+ * Alter the list of projects before fetching data and comparing versions.
+ *
+ * @param $projects
+ *   Reference to an array of the projects installed on the system.
+ *
+ * @see update_get_projects()
+ * @see _update_process_info_list()
+ */
+function hook_update_projects_alter(&$projects) {
+  // Add a custom project.
+  // The key for the array should be the machine-readable project "short name".
+  $projects['custom_project'] = array(
+    // Machine-readable project short name (same as the array key above).
+    'name' => 'custom_project',
+    // Array of values from the main .info file for this project.
+    'info' => array(
+      'name' => 'Custom project',
+      'description' => 'Some custom project that does stuff.',
+      'version' => '7.x-1.0',
+      'core' => '7.x',
+      // The most most recent (largest) value of the ctime (change time) on
+      // all the .info files included in this project.
+      '_info_file_ctime' => 1243888165,
+    ),
+    // The date stamp when the project was released, if known.
+    'datestamp' => 1243888185,
+    // Any modules (or themes) included in this project. Keyed by machine-
+    // readable "short name", value is the human-readable project name printed
+    // in the UI.
+    'includes' => array(
+      'custom_project' => 'Custom project',
+      'custom_project_helper' => 'Custom project helper module',
+      'custom_project_foo' => 'Custom project foo module',
+    ),
+    // Is this project a 'module' or a 'theme'?
+    'project_type' => 'module',
+  );
+}
+
+/**
  * Alter the information about available updates for projects.
  *
  * @param $projects
Index: modules/update/update.compare.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.compare.inc,v
retrieving revision 1.18
diff -u -p -u -p -r1.18 update.compare.inc
--- modules/update/update.compare.inc	24 May 2009 17:39:35 -0000	1.18
+++ modules/update/update.compare.inc	1 Jun 2009 20:32:42 -0000
@@ -38,6 +38,8 @@ function update_get_projects() {
       // Still empty, so we have to rebuild the cache.
       _update_process_info_list($projects, module_rebuild_cache(), 'module');
       _update_process_info_list($projects, system_theme_data(), 'theme');
+      // Allow other modules to alter projects before fetching and comparing.
+      drupal_alter('update_projects', $projects);
       // Cache the site's project data for at most 1 hour.
       _update_cache_set('update_project_projects', $projects, REQUEST_TIME + 3600);
     }
Index: modules/update/update.fetch.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.fetch.inc,v
retrieving revision 1.19
diff -u -p -u -p -r1.19 update.fetch.inc
--- modules/update/update.fetch.inc	24 May 2009 17:39:35 -0000	1.19
+++ modules/update/update.fetch.inc	1 Jun 2009 20:32:42 -0000
@@ -91,7 +91,7 @@ function _update_build_fetch_url($projec
   $name = $project['name'];
   $url = $project['info']['project status url'];
   $url .= '/' . $name . '/' . DRUPAL_CORE_COMPATIBILITY;
-  if (!empty($site_key)) {
+  if (!empty($site_key) && (strpos($project['project_type'], 'disabled') === FALSE)) {
     $url .= (strpos($url, '?') === TRUE) ? '&' : '?';
     $url .= 'site_key=';
     $url .= drupal_urlencode($site_key);
