Index: forward.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/forward/forward.module,v
retrieving revision 1.11.2.11
diff -u -r1.11.2.11 forward.module
--- forward.module	31 May 2006 19:53:03 -0000	1.11.2.11
+++ forward.module	31 May 2006 21:02:12 -0000
@@ -73,7 +73,7 @@
   }
 
   $host=parse_url($base_url);
-  
+
   // Administrative Options
   $form['forward_options'] = array(
     '#type' => 'fieldset',
@@ -112,12 +112,13 @@
   $form['forward_options']['forward_flood_error'] = array(
     '#type' => 'textarea',
     '#title' => t('Flood Control Error'),
-    '#default_value' => t(variable_get('forward_flood_error', "You can't send more than %number messages per hour. Please try again later.")),
+    // ***NEEDS MORE(?) moved the t() inside but still no parameter array for %number in t()***
+    '#default_value' => variable_get('forward_flood_error', t("You can't send more than %number messages per hour. Please try again later.")),
     '#cols' => 40,
     '#rows' => 10,
     '#description' => t('This text appears if a user exceeds the flood control limit.  The value of the flood control limit setting will appear in place of %number in the message presented to users'),
   );
-  
+
   // Page Text Values
   $form['forward_text_values'] = array(
     '#type' => 'fieldset',
@@ -141,7 +142,7 @@
     '#rows' => 10,
     '#description' => t('This message will be displayed after the user successfully submits the form.'),
   );
-  
+
   // Forward Form Default Values
   $form['forward_default_values'] = array(
     '#type' => 'fieldset',
@@ -256,21 +257,21 @@
   }
 
   if (!flood_is_allowed('contact', variable_get('forward_flood_control', 10))) {
-    $output = t(variable_get('forward_flood_error', "You can't send more than %number messages per hour. Please try again later."), array('%number' => variable_get('forward_flood_control', 10)));
+    $output = variable_get('forward_flood_error', t("You can't send more than %number messages per hour. Please try again later.", array('%number' => variable_get('forward_flood_control', 10))));
   }
   else {
     $form = array();
     $url    = $base_url.'/node/'.$nid;
     $output = variable_get('forward_instructions', '<p>'.t('Thank you for your interest in spreading the word on').' '.variable_get('site_name', 'drupal').'.</p><p>'.t('NOTE: We only request your email address so that the person you are recommending the page to knows that you wanted them to see it, and that it is not junk mail. We do not capture any email address.').'</p>');
-    
-    
+
+
     if ($nid != '') {
       $emailtype = 'email';
     }
     else {
       $emailtype = 'postcard';
     }
-    
+
     $form['message'] = array(
       '#type' => 'fieldset',
       '#title' => t('Message to Send'),
@@ -433,10 +434,10 @@
           '#type' => 'submit',
           '#value' => t('Send Message'),
         );
-    
+
         $form['#method'] = 'post';
         $output = drupal_get_form('forward_form', $form);
-        
+
         $node->body .= $output;
       break;
     }
@@ -453,7 +454,7 @@
       form_set_error(NULL,variable_get('forward_flood_error', t("You can't send more than %number messages per hour. Please try again later.", array('%number' => variable_get('forward_flood_control', 10)))));
     }
   }
-  
+
   $yemail     = $_POST['edit']['yemail'];
   $recipients = $_POST['edit']['recipients'];
   $message    = $_POST['edit']['message'];
@@ -468,7 +469,7 @@
 
   // convert addresses to an array
   $recipient_addresses = explode(', ', $recipients);
-  
+
   $arBadStr = array("Content-Type:", "MIME-Version:", "Content-Transfer-Encoding:", "bcc:", "cc:");
   foreach($arBadStr as $tStr){
     if (eregi($tStr, $yemail) || eregi($tStr, $subject)) {
@@ -505,7 +506,7 @@
   // Compose the body:
   ### Note how the form values are accessed the same way they were accessed in the validate
   ### function
-  
+
   //If selected assemble dynamic footer block.
   switch (variable_get('forward_dynamic_block','')) {
     case 'node':
@@ -529,7 +530,7 @@
       $dynamic_content .= forward_top5_list($query, $base_url,'blog');
       break;
   }
-  
+
   if (!$edit['nid']) {
     $emailtype = 'postcard';
     $nid = '';
@@ -550,7 +551,7 @@
 	  'forward_header_image' => variable_get('forward_header_image', ''),
 	  'site_name' => variable_get('site_name', 'Drupal'),
 	  'yemail' => $edit['yemail'],
-	  'forward_message' => t(variable_get('forward_'.$emailtype.'message', '%name thought you would like to see the %site web site.'), array('%name' => l($edit['yname'], 'mailto:'.$edit['yemail'],NULL,NULL,NULL,TRUE), '%site' => variable_get('site_name', 'drupal'))),
+	  'forward_message' => variable_get('forward_'.$emailtype.'message', t('%name thought you would like to see the %site web site.', array('%name' => l($edit['yname'], 'mailto:'.$edit['yemail'],NULL,NULL,NULL,TRUE), '%site' => variable_get('site_name', 'drupal')))),
 	  'message' => $edit['message'],
 	  'base_url' => $base_url,
 	  'content' => $content,
@@ -558,14 +559,14 @@
 	  'forward_ad_footer' => variable_get('forward_ad_footer', ''),
 	  'forward_footer' => variable_get('forward_footer', '')
   );
-  
+
   $body = theme('forward_'.$emailtype, $vars);
-  $subject = t(variable_get('forward_'.$emailtype.'subject', '%name has sent you a message from %site'), array('%name' => $edit['yname'], '%site' => variable_get('site_name', 'drupal')));
+  $subject = variable_get('forward_'.$emailtype.'subject', t('%name has sent you a message from %site', array('%name' => $edit['yname'], '%site' => variable_get('site_name', 'drupal'))));
 
   $headers = "From: ".$edit['yemail']."\n";
   $headers .= "MIME-Version: 1.0\n";
   $headers .= "Content-type: text/html; charset=utf-8\n";
-  
+
   $recipients = trim($edit['recipients']);
   $recipients = str_replace(array("\r\n", "\n", "\r"), ', ', $recipients);
   $recipients = str_replace(',', ', ', $recipients);
@@ -576,7 +577,7 @@
   db_query("INSERT INTO {forward_log} (nid, type, timestamp) VALUES ('%d', '%s', %d)", $nid, "SENT", time());
   variable_set('forward_total', variable_get('forward_total', 0) +1);
   variable_set('forward_recipients', variable_get('forward_recipients', 0) + substr_count($recipients, ",") + 1);
-  
+
   flood_register_event('forward');
 
   drupal_set_message(variable_get('forward_thankyou', t('Thank you for your help in spreading the word about').' '.variable_get('site_name', 'drupal').'. '.t('We appreciate your help.')), 'status');
@@ -600,7 +601,7 @@
     if ($forward_link_type) {
       if ($type == 'comment') {
         $forward_link_type = 'comment';
-        $links[] = l(t("email this $forward_link_type"), "forward/$node->nid&cid=$node->cid", array('title' => t('Forward this page to a friend'), 'class' => 'forward-page'));
+        $links[] = l(t("email this %type", array('%type' => $forward_link_type)), "forward/$node->nid&cid=$node->cid", array('title' => t('Forward this page to a friend'), 'class' => 'forward-page'));
         return $links;
       }
       $forward_link_type = $node->type;
@@ -609,12 +610,12 @@
 
     if ($main) {  // not on an index page
       if (variable_get('forward_show_on_main', 0)) {
-        $links[] = l(t("email this $forward_link_type"), "forward/$node->nid", array('title' => t('Forward this page to a friend'), 'class' => 'forward-page'));
+        $links[] = l(t("email this %type", array('%type' => $forward_link_type)), "forward/$node->nid", array('title' => t('Forward this page to a friend'), 'class' => 'forward-page'));
         return $links;
       }
     }
     else { // not on a main page
-      $links[] = l(t("email this $forward_link_type"), "forward/$node->nid", array('title' => t('Forward this page to a friend'), 'class' => 'forward-page'));
+      $links[] = l(t("email this %type", array('%type' => $forward_link_type)), "forward/$node->nid", array('title' => t('Forward this page to a friend'), 'class' => 'forward-page'));
       return $links;
     }
   }
