/[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.3, Thu Jan 29 21:03:59 2009 UTC revision 1.8.2.4, Fri Jan 30 16:59:04 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: uc_node_checkout.module,v 1.8.2.2 2009/01/29 17:47:51 rszrama Exp $  // $Id: uc_node_checkout.module,v 1.8.2.3 2009/01/29 21:03:59 rszrama Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 133  function uc_node_checkout_enable() { Line 133  function uc_node_checkout_enable() {
133  }  }
134    
135  /**  /**
136     * Implementation of hook_exit().
137     */
138    function uc_node_checkout_exit() {
139      global $base_root;
140    
141      // Prevent node checkout pages from being cached.
142      $pages = array('node/add', 'ucnc-select');
143      $this_page = request_uri();
144      foreach ($pages as $page) {
145        if (strstr($this_page, $page) !== FALSE) {
146          cache_clear_all($base_root . $this_page, 'cache_page');
147          return;
148        }
149      }
150    }
151    
152    /**
153   * Implementation of hook_user().   * Implementation of hook_user().
154   */   */
155  function uc_node_checkout_user($op, &$edit, &$user, $category = NULL) {  function uc_node_checkout_user($op, &$edit, &$user, $category = NULL) {
# Line 174  function uc_node_checkout_form_alter(&$f Line 191  function uc_node_checkout_form_alter(&$f
191    
192    // Alters the product add to cart forms to redirect to the appropriate node    // Alters the product add to cart forms to redirect to the appropriate node
193    // add form if enabled.    // add form if enabled.
194    if (strpos($form_id, 'add_to_cart_form') > 0 && variable_get('uc_node_checkout_add_to_cart_node_form', TRUE)) {    if (variable_get('uc_node_checkout_add_to_cart_node_form', TRUE) &&
195          (strpos($form_id, 'add_to_cart_form') > 0 || strpos($form_id, 'uc_catalog_buy_it_now_form_') === 0)) {
196      // If a node type association exists for this product...      // If a node type association exists for this product...
197      if ($type = uc_node_checkout_node_type_association($form['nid']['#value'])) {      if ($type = uc_node_checkout_node_type_association($form['nid']['#value'])) {
198        // Store the node type in the form.        // Store the node type in the form.

Legend:
Removed from v.1.8.2.3  
changed lines
  Added in v.1.8.2.4

  ViewVC Help
Powered by ViewVC 1.1.2