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

Diff of /contributions/modules/uc_node_checkout/uc_node_checkout.module

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

revision 1.8.2.8, Thu Jul 30 16:27:54 2009 UTC revision 1.8.2.9, Thu Jul 30 16:38:35 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: uc_node_checkout.module,v 1.8.2.7 2009/07/30 16:17:17 rszrama Exp $  // $Id: uc_node_checkout.module,v 1.8.2.8 2009/07/30 16:27:54 rszrama Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 474  function uc_node_checkout_product_select Line 474  function uc_node_checkout_product_select
474    if (!$view || !isset($view->display[$view_display])) {    if (!$view || !isset($view->display[$view_display])) {
475      // Redirect to the node add form if a product NID is associated.      // Redirect to the node add form if a product NID is associated.
476      if ($nc_map['nid']) {      if ($nc_map['nid']) {
477        drupal_goto('node/add/'. $type, 'product_nid='. $nc_map['nid']);        drupal_goto('node/add/'. str_replace('_', '-', $type), 'product_nid='. $nc_map['nid']);
478      }      }
479      else {      else {
480        // We're outta luck...        // We're outta luck...
# Line 496  function uc_node_checkout_product_select Line 496  function uc_node_checkout_product_select
496    if (empty($options) && $nc_map['nid']) {    if (empty($options) && $nc_map['nid']) {
497      // Redirect to the node add form if a product NID is associated.      // Redirect to the node add form if a product NID is associated.
498      if ($nc_map['nid']) {      if ($nc_map['nid']) {
499        drupal_goto('node/add/'. $type, 'product_nid='. $nc_map['nid']);        drupal_goto('node/add/'. str_replace('_', '-', $type), 'product_nid='. $nc_map['nid']);
500      }      }
501      else {      else {
502        // We're outta luck...        // We're outta luck...
# Line 526  function uc_node_checkout_product_select Line 526  function uc_node_checkout_product_select
526  }  }
527    
528  function uc_node_checkout_product_select_form_submit($form, &$form_state) {  function uc_node_checkout_product_select_form_submit($form, &$form_state) {
529    drupal_goto('node/add/'. $form_state['values']['type'], 'product_nid='. $form_state['values']['product_nid']);    drupal_goto('node/add/'. str_replace('_', '-', $form_state['values']['type']), 'product_nid='. $form_state['values']['product_nid']);
530  }  }
531    
532  /**  /**

Legend:
Removed from v.1.8.2.8  
changed lines
  Added in v.1.8.2.9

  ViewVC Help
Powered by ViewVC 1.1.2