/[drupal]/contributions/modules/uc_node_checkout/uc_node_checkout.admin.inc
ViewVC logotype

Diff of /contributions/modules/uc_node_checkout/uc_node_checkout.admin.inc

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

revision 1.1.2.1, Thu Jan 29 17:22:34 2009 UTC revision 1.1.2.2, Fri Jan 30 18:54:50 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id$  // $Id: uc_node_checkout.admin.inc,v 1.1.2.1 2009/01/29 17:22:34 rszrama Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 128  function uc_node_checkout_type_form(&$fo Line 128  function uc_node_checkout_type_form(&$fo
128  function uc_node_checkout_type_form_submit($form, &$form_state) {  function uc_node_checkout_type_form_submit($form, &$form_state) {
129    // Save the product node ID.    // Save the product node ID.
130    if ($form_state['values']['product_nid'] || $form_state['values']['view']) {    if ($form_state['values']['product_nid'] || $form_state['values']['view']) {
131      db_query("UPDATE {uc_node_checkout_types} SET product_nid = %d, node_view = '%s' WHERE type = '%s'", $form_state['values']['product_nid'], $form_state['values']['view'], $form_state['values']['type']);      db_query("UPDATE {uc_node_checkout_types} SET product_nid = %d, node_view = '%s' WHERE node_type = '%s'", $form_state['values']['product_nid'], $form_state['values']['view'], $form_state['values']['type']);
132      if (!db_affected_rows()) {      if (!db_affected_rows()) {
133        db_query("INSERT INTO {uc_node_checkout_types} (type, product_nid, node_view) VALUES ('%s', %d, '%s')", $form_state['values']['type'], $form_state['values']['product_nid'], $form_state['values']['view']);        db_query("INSERT INTO {uc_node_checkout_types} (node_type, product_nid, node_view) VALUES ('%s', %d, '%s')", $form_state['values']['type'], $form_state['values']['product_nid'], $form_state['values']['view']);
134      }      }
135    }    }
136    else {    else {
137      db_query("DELETE FROM {uc_node_checkout_types} WHERE type = '%s'", $form_state['values']['type']);      db_query("DELETE FROM {uc_node_checkout_types} WHERE node_type = '%s'", $form_state['values']['type']);
138    }    }
139    
140    // Save the restricted fields settings.    // Save the restricted fields settings.

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

  ViewVC Help
Powered by ViewVC 1.1.2