? forward-398806.patch
Index: forward.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/forward/forward.module,v
retrieving revision 1.30.2.60
diff -u -p -r1.30.2.60 forward.module
--- forward.module	16 Mar 2009 21:23:45 -0000	1.30.2.60
+++ forward.module	6 Apr 2009 21:36:39 -0000
@@ -1,5 +1,5 @@
 <?php
-/* $Id: forward.module,v 1.30.2.60 2009/03/16 21:23:45 seanr Exp $ */
+/* $Id: forward.module,v 1.30.2.59 2009/03/11 17:48:54 chx Exp $ */
 
 include(drupal_get_path('module', 'forward') .'/forward.theme');
 
@@ -159,14 +159,6 @@ function forward_admin_settings() {
     '#default_value' => variable_get('forward_filter_tags', 'p,br,em,strong,cite,code,ul,ol,li,dl,dt,dd'),
     '#description' => t('List of allowed tags (separated by commas) that will be allowed by the XSS filter if enabled above.  The default tags allowed are: p,br,em,strong,cite,code,ul,ol,li,dl,dt,dd'),
   );
-  $form['forward_options']['forward_sender_address'] = array(
-    '#type' => 'textfield',
-    '#title' => t('From Address'),
-    '#default_value' => variable_get('forward_sender_address', ''),
-    '#size' => 40,
-    '#maxlength' => 40,
-    '#description' => t('If left blank, the from address entered in the form will be used as the from address for the email.  Enter a valid email address here to override that.  The sender\'s email will still appear in the body of the message.'),
-  );
 
   // Page Text Values
   $form['forward_text_values'] = array(
@@ -200,6 +192,14 @@ function forward_admin_settings() {
     '#collapsed' => false,
     '#description' => t('These options will set the default values for the "email this page" form.')
   );
+  $form['forward_page_defaults']['forward_sender_addy'] = array(
+    '#type' => 'textfield',
+    '#title' => t('From Address'),
+    '#default_value' => variable_get('forward_sender_addy', 'NoReply@'. $host['host']),
+    '#size' => 40,
+    '#maxlength' => 40,
+    '#description' => t('The address to send from.  Should be a functioning email address.'),
+  );
   $form['forward_page_defaults']['forward_header_image'] = array(
     '#type' => 'textfield',
     '#title' => t('Header Image for Email'),
@@ -305,7 +305,7 @@ function forward_admin_settings() {
  * Email Tracker
  */
 function forward_tracker() {
-  $path = drupal_get_normal_path($_GET['path']);
+  $path = drupal_get_normal_path($_GET['q']);
   $args = explode('/', $path);
   
   if (($args[0] == 'node') && (is_numeric($args[1]))) {
@@ -328,13 +328,15 @@ function forward_tracker() {
 function forward_page() {
   //print '<pre>'.print_r(menu_get_menu(),1).'</pre>'; exit;
   $nid = NULL;
-  if (empty($_GET['path']) || ($_GET['path'] == 'node/0')) {
-    return t('No path was selected to forward');
+  if (empty($_GET['q']) || ($_GET['q'] == 'node/0')) {
+    return 'No path was selected to forward';
   }
   
-  if (!empty($_GET['path'])) {
-    $path = drupal_get_normal_path($_GET['path']);
-    $ret = preg_match("/^node\/(.*)/i", $path, $matches);
+  if (!empty($_GET['q'])) {
+    $path = drupal_get_normal_path($_GET['q']);
+    echo '<br>$path<pre>'. print_r($path,true) . "</pre>";
+    //$ret = preg_match("/^node\/(.*)/i", $path, $matches);
+    $ret = preg_match("/^forward\/(.*)/i", $path, $matches);
     if ($ret == 1) {
       $nid = $matches[1];
     }
@@ -654,7 +656,7 @@ function forward_form_submit($form_id, $
   $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')));
 
-  $from = (variable_get('forward_sender_address', FALSE)) ? variable_get('forward_sender_address', FALSE) : $edit['yemail'];
+  $from = $edit['yemail'];
   $headers['MIME-Version'] = '1.0';
   $headers['Content-Type'] = 'text/html; charset=utf-8';
 
