Index: opensearch.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/opensearch/opensearch.info,v
retrieving revision 1.1
diff -u -p -r1.1 opensearch.info
--- opensearch.info	27 Apr 2008 16:01:06 -0000	1.1
+++ opensearch.info	23 Jul 2008 21:47:49 -0000
@@ -1,4 +1,5 @@
 ; $Id: opensearch.info,v 1.1 2008/04/27 16:01:06 hunmaat Exp $
 name = OpenSearch Feed
 description = Allows Drupal search results to be returned in the OpenSearch RSS format
-dependencies = search
\ No newline at end of file
+dependencies = search
+package = Search
Index: opensearch.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/opensearch/opensearch.module,v
retrieving revision 1.10
diff -u -p -r1.10 opensearch.module
--- opensearch.module	27 Apr 2008 20:15:23 -0000	1.10
+++ opensearch.module	23 Jul 2008 21:47:49 -0000
@@ -2,6 +2,11 @@
 // $Id: opensearch.module,v 1.10 2008/04/27 20:15:23 hunmaat Exp $
 
 /**
+ * @file
+ * opensearch
+ */
+
+/**
  * Implementation of hook_menu().
  */
 function opensearch_menu($may_cache) {
@@ -10,8 +15,9 @@ function opensearch_menu($may_cache) {
   if ($may_cache) {
     $items[] = array(
       'path' => 'admin/settings/opensearch',
-      'title' => t('opensearch'),
-      'callback' => 'opensearch_admin_settings',
+      'title' => t('Opensearch'),
+      'callback' => 'drupal_get_form',
+      'callback arguments' => array('opensearch_admin_settings'),
       'access' => user_access('administer site configuration'),
       'type' => MENU_NORMAL_ITEM,
     );
@@ -19,7 +25,7 @@ function opensearch_menu($may_cache) {
     foreach (module_list() as $name) {
       if (module_hook($name, 'search') && $title = module_invoke($name, 'search', 'name')) {
         $items[] = array(
-          'path' => 'opensearch/' . $name,
+          'path' => 'opensearch/'. $name,
           'title' => $title,
           'callback' => 'opensearch_view',
           'access' => user_access('search content'),
@@ -35,7 +41,7 @@ function opensearch_menu($may_cache) {
       'rel' => 'search',
       'href' => url('opensearch/'. $type, NULL, NULL, TRUE),
       'type' => 'application/opensearchdescription+xml',
-      'title' => $opensearch_shortname
+      'title' => variable_get('site_name', 'Drupal') . ' ' . $opensearch_shortname
     ));
   }
 
@@ -57,7 +63,7 @@ function opensearch_admin_settings() {
 
   $form['description']['opensearch_prefix'] = array(
     '#type' => 'markup',
-    '#value' => '<p>' . t('Your site offers the following OpenSearch description files: %links', array('%links' => theme('item_list', $links))) . '</p>',
+    '#value' => '<p>'. t('Your site offers the following OpenSearch description files: %links', array('%links' => theme('item_list', $links))) .'</p>',
   );
   $form['description']['opensearch_shortname'] = array(
     '#type' => 'textfield',
@@ -124,7 +130,7 @@ function opensearch_admin_settings() {
     '#default_value' => $opensearch_adult_content,
   );
 
-  return system_settings_form('opensearch_admin_settings', $form);
+  return system_settings_form($form);
 }
 
 
@@ -132,7 +138,7 @@ function opensearch_form_alter($form_id,
   if ($form_id == 'search_form' && arg(2)) {
     // for pagination etc.
     $get = drupal_query_string_encode($_GET, array('q'));
-    $form['basic']['inline']['rss'] = array('#type' => 'markup', '#value' => theme('xml_icon', url('opensearch/' . arg(1). '/'. urlencode(search_get_keys()), trim($get)?$get:NULL)));
+    $form['basic']['inline']['rss'] = array('#type' => 'markup', '#value' => theme('xml_icon', url('opensearch/'. arg(1) .'/'. urlencode(search_get_keys()), trim($get)?$get:NULL)));
   }
 }
 
@@ -153,7 +159,7 @@ function opensearch_view() {
 
   if (trim($keys)) {
     // Log the search keys:
-    watchdog('search', t('OpenSearch: %keys (@type).', array('%keys' => $keys, '@type' => module_invoke($type, 'search', 'name'))), WATCHDOG_NOTICE, l(t('results'), 'search/' . $type . '/' . $keys));
+    watchdog('search', t('OpenSearch: %keys (@type).', array('%keys' => $keys, '@type' => module_invoke($type, 'search', 'name'))), WATCHDOG_NOTICE, l(t('results'), 'search/'. $type .'/'. $keys));
 
     // Collect the search results:
     $results = module_invoke($type, 'search', 'search', $keys);
@@ -241,8 +247,8 @@ function opensearch_description($type) {
   $opensearch_description = t($opensearch_description, array('@site' => $site_name, '@type' => $search_type));
   $opensearch_longname = t($opensearch_longname, array('@site' => $site_name, '@type' => $search_type));
   $url = check_url($base_url);
-  $url_search = str_replace(array('%7B', '%7D', '&'), array('{', '}', '&amp;'), url('search/' . $type . '/{searchTerms}', 'page={startPage}', NULL, TRUE));
-  $url_opensearch = str_replace(array('%7B', '%7D', '&'), array('{', '}', '&amp;'), url('opensearch/' . $type . '/{searchTerms}', 'page={startPage}', NULL, TRUE));
+  $url_search = str_replace(array('%7B', '%7D', '&'), array('{', '}', '&amp;'), url('search/'. $type .'/{searchTerms}', 'page={startPage}', NULL, TRUE));
+  $url_opensearch = str_replace(array('%7B', '%7D', '&'), array('{', '}', '&amp;'), url('opensearch/'. $type .'/{searchTerms}', 'page={startPage}', NULL, TRUE));
   $output = <<<DOC
 <?xml version="1.0" encoding="UTF-8"?>
 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
@@ -287,15 +293,15 @@ DOC;
   $logo = theme_get_setting('logo');
   if (theme_get_setting('toggle_logo') && ($logo_url = check_url(theme_get_setting('logo_path')))) {
     list($width, $height, $type, $image_attributes) = @getimagesize($logo_url);
-    $logo_url = $url. '/'. $logo_url;
+    $logo_url = $url .'/'. $logo_url;
     if ($height) {
-      $height = 'height="'. $height. '"';
+      $height = 'height="'. $height .'"';
     }
     if ($width) {
-      $width = 'width="'. $width. '"';
+      $width = 'width="'. $width .'"';
     }
     if ($type) {
-      $type = 'type="'. image_type_to_mime_type($type). '"';
+      $type = 'type="'. image_type_to_mime_type($type) .'"';
     }
     $output .= "\n  <Image $height $width $type>$logo_url</Image>";
   }
@@ -305,15 +311,15 @@ DOC;
       $favicon_url = substr($favicon_url, 1);
     }
     list($width, $height, $type, $image_attributes) = @getimagesize($favicon_url);
-    $favicon_url = $url . '/' . $favicon_url;
+    $favicon_url = $url .'/'. $favicon_url;
     if ($height) {
-      $height = 'height="'. $height. '"';
+      $height = 'height="'. $height .'"';
     }
     if ($width) {
-      $width = 'width="'. $width. '"';
+      $width = 'width="'. $width .'"';
     }
     if ($type) {
-      $type = 'type="' . image_type_to_mime_type($type) . '"';
+      $type = 'type="'. image_type_to_mime_type($type) .'"';
     }
     $output .= "\n  <Image $height $width $type>$favicon_url</Image>";
   }
