Index: googleanalytics.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/google_analytics/googleanalytics.module,v
retrieving revision 1.11
diff -u -F^f -r1.11 googleanalytics.module
--- googleanalytics.module	15 Oct 2006 23:53:39 -0000	1.11
+++ googleanalytics.module	21 Nov 2006 08:51:59 -0000
@@ -22,10 +22,10 @@ function googleanalytics_menu($maycache)
   if ($maycache) {
     $items[] = array(
       'path' => 'admin/settings/googleanalytics',
-      'title' => t('google analytics'),
+      'title' => t('Google analytics'),
       'description' => t('Configure the settings used to generate your Google Analytics site map.'),
       'callback' => 'drupal_get_form',
-      'callback arguments' => array('googleanalytics_admin_settings'),
+      'callback arguments' => 'googleanalytics_admin_settings',
       'access' => user_access('administer site configuration'),
       'type' => MENU_NORMAL_ITEM,
     );
@@ -101,7 +101,7 @@ function googleanalytics_admin_settings(
       '#size' => 15,
       '#maxlength' => 20,
       '#required' => TRUE,
-      '#description' => t('The user account is unique to the websites domain. You can obtain a user account from the %url website.', array('%url' => '<a href="http://www.google.com/analytics/">Google Analytics</a>'))
+      '#description' => t('The user account is unique to the websites domain. You can obtain a user account from the <a href="@url">Google Analytics</a> website.', array('@url' => 'http://www.google.com/analytics/'))
     );
 
    // Render the role overview.
@@ -115,10 +115,12 @@ function googleanalytics_admin_settings(
   );
 
   while ($role = db_fetch_object($result)) {
-    $form['roles']["googleanalytics_track_{$role->name}"] = array(
+    // can't use empty spaces in varname
+    $role_varname = $string = str_replace(" ", "_", $role->name);
+    $form['roles']["googleanalytics_track_$role_varname"] = array(
       '#type' => 'checkbox',
       '#title' => t($role->name),
-      '#default_value' => variable_get("googleanalytics_track_{$role->name}", FALSE),
+      '#default_value' => variable_get("googleanalytics_track_$role_varname", FALSE),
     );
   }
 
@@ -129,9 +131,9 @@ function googleanalytics_admin_settings(
         '#description' => t('If your users have profile fields completed, you can track your logged in users based on a defined profile field.')
   );
 
-  if(!module_exist('profile')) {
+  if(!module_exists('profile')) {
     $form['segmentation']['profile'] = array(
-          '#value' => t('You need to activate the %profile to use this feature.', array('%profile' => l('profile.module', 'admin/modules')) )
+      '#value' => t('You need to activate the <a href="@profile">Profile module</a> to use this feature.', array('@profile' => url('admin/build/modules')))
     );
   } else {
     // Compile a list of fields to show.
@@ -164,9 +166,9 @@ function googleanalytics_admin_settings(
       '#title' => t('JavaScript Code'),
       '#default_value' => variable_get('googleanalytics_codesnippet',''),
       '#rows' => 15,
-      '#description' => t('Paste %snippets here. These will be added to every page that Google Analytics appears on. For help with this feature see the %blog. <strong>Do not include the &lt;script&gt; tags</strong>, and always end your code with a semicolon (;).', array('%snippets' => l(t('custom code snippets'), 'http://drupal.org/node/39282'), '%blog' => l(t('cutroni.com blog'), 'http://cutroni.com/blog/') ) )
+      '#description' => t('Paste <a href="@snippets">custom code snippets here</a>. These will be added to every page that Google Analytics appears on. For help with this feature see the <a href="@blog">cutroni.com blog</a>. <strong>Do not include the &lt;script&gt; tags</strong>, and always end your code with a semicolon (;).', array('@snippets' => 'http://drupal.org/node/39282', '@blog' => 'http://cutroni.com/blog/') ) 
   );
 
   return system_settings_form($form);
 }
-?>
\ No newline at end of file
+?>
