/[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.2, Fri Jan 30 18:54:50 2009 UTC revision 1.1.2.3, Thu Feb 5 22:08:36 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: uc_node_checkout.admin.inc,v 1.1.2.1 2009/01/29 17:22:34 rszrama Exp $  // $Id: uc_node_checkout.admin.inc,v 1.1.2.2 2009/01/30 18:54:50 rszrama Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 297  function uc_node_checkout_autocomplete($ Line 297  function uc_node_checkout_autocomplete($
297    $matches = array();    $matches = array();
298    
299    if ($string) {    if ($string) {
300      $result = db_query_range("SELECT nid, title FROM {node} WHERE LOWER(title) LIKE LOWER('%s%%')", $string, 0, 10);      $result = db_query_range("SELECT n.nid, n.title, p.model, p.unique_hash FROM {uc_products} AS p LEFT JOIN {node} AS n ON n.nid = p.nid WHERE p.unique_hash != '' AND (LOWER(n.title) LIKE '%s%%' OR LOWER(p.model) LIKE '%s%%')", strtolower($string), strtolower($string), 0, 10);
301      while ($node = db_fetch_object($result)) {      while ($node = db_fetch_object($result)) {
302        $matches[$node->nid] = check_plain($node->title);        $matches[$node->nid] = t('@title [@sku]', array('@title' => $node->title, '@sku' => $node->model));
303      }      }
304    }    }
305    

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

  ViewVC Help
Powered by ViewVC 1.1.2