Index: drupalorg/drupalorg.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drupalorg/drupalorg/drupalorg.module,v
retrieving revision 1.47
diff -u -p -r1.47 drupalorg.module
--- drupalorg/drupalorg.module	17 Aug 2010 21:23:57 -0000	1.47
+++ drupalorg/drupalorg.module	17 Aug 2010 23:42:00 -0000
@@ -735,50 +735,3 @@ function drupalorg_homebox() {
     ),
   );
 }
-
-/**
- * Render the HTML for a given block.
- *
- * This function takes a module and a delta, loads the block info from the DB,
- * invokes the function to compute the block content, and then renders the
- * block to HTML via theme('block'). This is basically a heavily pared back
- * implementation of block_list() for a single block.
- *
- * @param string $module
- *   The module that defines the block we're rendering.
- * 
- * @param string $delta
- *   The delta of the block that we're rendering.
- * 
- * @return
- *   The rendered HTML for the given block.
- * 
- * @see block_list()
- * @see theme_block()
- */
-function drupalorg_block_render($module, $delta) {
-  // Load the title, since that can be modified administratively.  
-  $title = db_result(db_query("SELECT title FROM {blocks} WHERE module = '%s' AND delta = '%s'", $module, $delta));
-
-  $block_output = module_invoke($module, 'block', 'view', $delta);
-  foreach ($block_output as $k => $v) {
-    $block->$k = $v;
-  }
-
-  // Set the module and delta so that the blocks contain
-  // at least the minimum of expected information.
-  $block->module = $module;
-  $block->delta = $delta;
-
-  if (isset($block->content) && $block->content) {
-    // Override default block title if a custom display title is present.
-    if ($title) {
-      // Check plain admin-generated titles, but not titles set in code.
-      $block->subject = $title == '<none>' ? '' : check_plain($title);
-    }
-    if (!isset($block->subject)) {
-      $block->subject = '';
-    }
-  }
-  return theme('block', $block);
-}
Index: drupalorg_search/drupalorg_search.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drupalorg/drupalorg_search/drupalorg_search.module,v
retrieving revision 1.25
diff -u -p -r1.25 drupalorg_search.module
--- drupalorg_search/drupalorg_search.module	16 Aug 2010 21:30:41 -0000	1.25
+++ drupalorg_search/drupalorg_search.module	17 Aug 2010 23:42:00 -0000
@@ -430,10 +430,12 @@ function drupalorg_search_preprocess_dru
   );
   // Render and save the facet blocks.
   foreach ($facets as $delta => $module) {
-    $variables[$delta] = drupalorg_block_render($module, $delta);
+    $variables[$delta] = project_block_render($module, $delta);
   }
 
-  $variables['version_form'] = drupal_get_form('drupalorg_search_version_form', 'download');
+  $variables['version_form'] = drupal_get_form('project_solr_version_form', 'download');
+  $version_alias = variable_get('project_solr_project_release_api_tids_alias', 'api_version');
+  $variables['version_form'][$version_alias]['#title'] = t('Show only modules for Drupal version');
 }
 
 /**
@@ -480,54 +482,3 @@ function drupalorg_search_get_project_ty
     }
   }
 }
-
-/**
- * This generates a form containing version selection and a submit button.
- * 
- * Generate a form with a version selection to allow filtering page content
- * based on the drupal version. Also includes path to allow the form to 
- * potentially submit to other urls if desired.
- * 
- * @param string $path
- *   The base path to which the version form will redirect.
- */
-function drupalorg_search_version_form(&$form_state, $path) {
-  $query = apachesolr_current_query();
-
-  $form = array(
-    '#attributes' => array('class' => 'clear-block'),
-  );
-
-  // Add version select field to our form.
-  $form['drupal_core'] = project_solr_get_api_version_field($query, t('Show only modules for Drupal version'));
-
-  $form['path'] = array(
-    '#type' => 'value',
-    '#value' => $path,
-  );
-  $form['submit'] = array(
-    '#type' => 'submit',
-    '#value' => t('Search'),
-  );
-  return $form;
-}
-
-/**
- * Create a query with the right version filter and redirect to the right page.
- * 
- * Create a new query, add any version filtering if it was selected in the
- * form, and redirect back to the relevant page with the appropriate filter
- * string.
- */
-function drupalorg_search_version_form_submit($form, &$form_state) {
-  // We create a new query with our base path so that we don't need to remove
-  // any existing drupal_core selection, and so that the implict type and 
-  // module tid filters don't end up in the url string.
-  $query = apachesolr_drupal_query('', '', '', $form_state['values']['path']);
-
-  if (!empty($form_state['values']['drupal_core'])) {
-    $query->add_filter(variable_get('project_solr_project_release_api_tids_alias', 'api_version'), $form_state['values']['drupal_core']);
-  }
-
-  $form_state['redirect'] = array($query->get_path(), $query->get_url_queryvalues());
-}
