Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1699
 
1739
 
1739
 
general.php
_> 11 <?php
  22 /*
<> 3 -  $Id: general.php,v 1.231 2003/07/09 01:15:48 hpdl Exp $
   3+  $Id: general.php 1739 2007-12-20 00:52:16Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
12521252   }
  12531253 
  12541254   function tep_count_customer_orders($id = '', $check_session = true) {
<> 1255 -    global $customer_id;
   1255+    global $customer_id, $languages_id;
12561256 
  12571257     if (is_numeric($id) == false) {
  12581258       if (tep_session_is_registered('customer_id')) {
     
 !
12681268       }
  12691269     }
  12701270 
<> 1271 -    $orders_check_query = tep_db_query("select count(*) as total from " . TABLE_ORDERS . " where customers_id = '" . (int)$id . "'");
   1271+    $orders_check_query = tep_db_query("select count(*) as total from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$id . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1'");
<_ 12721272     $orders_check = tep_db_fetch_array($orders_check_query);
  12731273 
  12741274     return $orders_check['total'];