/[drupal]/contributions/modules/forward/forward.module
ViewVC logotype

Diff of /contributions/modules/forward/forward.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.55.2.24, Mon Sep 21 15:43:44 2009 UTC revision 1.55.2.25, Mon Oct 5 21:38:08 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  /* $Id: forward.module,v 1.94 2009/09/01 19:10:49 seanr Exp $ */  /* $Id: forward.module,v 1.55.2.24 2009/09/21 15:43:44 seanr Exp $ */
3    
4  /**  /**
5   * @file   * @file
# Line 464  function forward_form(&$form_state, $pat Line 464  function forward_form(&$form_state, $pat
464      drupal_set_title(variable_get('forward_epostcard_title', 'Send an e-Postcard'));      drupal_set_title(variable_get('forward_epostcard_title', 'Send an e-Postcard'));
465    }    }
466    else {    else {
467      $emailtype = 'email';      $emailtype = 'page';
468      if (preg_match("/\?cid=/i", $path) == 1) {      if (preg_match("/\?cid=/i", $path) == 1) {
469        $paths = explode('?cid=', $path);        $paths = explode('?cid=', $path);
470        $cid = array('fragment' => 'comment-'.$paths[1]);        $cid = array('fragment' => 'comment-'.$paths[1]);
# Line 508  function forward_form(&$form_state, $pat Line 508  function forward_form(&$form_state, $pat
508      '#description' => t('Enter multiple addresses on separate lines or separate them with commas.'),      '#description' => t('Enter multiple addresses on separate lines or separate them with commas.'),
509      '#required' => TRUE,      '#required' => TRUE,
510    );    );
511    if (($emailtype == 'email') && ($nodeapi == FALSE)) {    if (($emailtype == 'page') && ($nodeapi == FALSE)) {
512      $form['message']['page'] = array(      $form['message']['page'] = array(
513        '#type' => 'item',        '#type' => 'item',
514        '#title' => t('You are going to email the following'),        '#title' => t('You are going to email the following'),
# Line 518  function forward_form(&$form_state, $pat Line 518  function forward_form(&$form_state, $pat
518    $form['message']['subject'] = array(    $form['message']['subject'] = array(
519      '#type' => 'item',      '#type' => 'item',
520      '#title' => t('Message Subject'),      '#title' => t('Message Subject'),
521      '#value' => t(variable_get('forward_'. $emailtype .'subject', '!name has sent you a message from !site'), array('!name' => t('(Your Name)'), '!site' => variable_get('site_name', 'drupal'))),      '#value' => t(variable_get('forward_'. $emailtype .'_subject', '!name has sent you a message from !site'), array('!name' => t('(Your Name)'), '!site' => variable_get('site_name', 'drupal'))),
522      '#description' => '',      '#description' => '',
523    );    );
524    $form['message']['body'] = array(    $form['message']['body'] = array(
525      '#type' => 'item',      '#type' => 'item',
526      '#title' => t('Message Body'),      '#title' => t('Message Body'),
527      '#value' => t(variable_get('forward_'. $emailtype .'message', '!name thought you would like to see the !site web site.'), array('!name' => t('(Your Name)'), '!site' => variable_get('site_name', 'drupal'))),      '#value' => t(variable_get('forward_'. $emailtype .'_message', '!name thought you would like to see the !site web site.'), array('!name' => t('(Your Name)'), '!site' => variable_get('site_name', 'drupal'))),
528      '#description' => '',      '#description' => '',
529    );    );
530    if (variable_get('forward_allow_message', TRUE)) {    if (variable_get('forward_allow_message', TRUE)) {
# Line 708  function forward_form_submit($form, &$fo Line 708  function forward_form_submit($form, &$fo
708          return;          return;
709        }        }
710    
711        switch ($content->body) {        //switch ($content->body) {
712          case MENU_NOT_FOUND:        //  case MENU_NOT_FOUND:
713            return drupal_not_found();        //    return drupal_not_found();
714            break;        //    break;
715          case MENU_ACCESS_DENIED:        //  case MENU_ACCESS_DENIED:
716            return drupal_access_denied();        //    return drupal_access_denied();
717            break;        //    break;
718        }        //}
719        $content->teaser = '';        $content->teaser = '';
720        $content->body = '';        $content->body = '';
721      }      }

Legend:
Removed from v.1.55.2.24  
changed lines
  Added in v.1.55.2.25

  ViewVC Help
Powered by ViewVC 1.1.2