Code Duplication    Length = 7-7 lines in 2 locations

catalog/includes/functions/general.php 2 locations

@@ 1341-1347 (lines=7) @@
1338
  function tep_count_customer_orders($id = '', $check_session = true) {
1339
    global $customer_id, $languages_id;
1340
1341
    if (is_numeric($id) == false) {
1342
      if (tep_session_is_registered('customer_id')) {
1343
        $id = $customer_id;
1344
      } else {
1345
        return 0;
1346
      }
1347
    }
1348
1349
    if ($check_session == true) {
1350
      if ( (tep_session_is_registered('customer_id') == false) || ($id != $customer_id) ) {
@@ 1364-1370 (lines=7) @@
1361
  function tep_count_customer_address_book_entries($id = '', $check_session = true) {
1362
    global $customer_id;
1363
1364
    if (is_numeric($id) == false) {
1365
      if (tep_session_is_registered('customer_id')) {
1366
        $id = $customer_id;
1367
      } else {
1368
        return 0;
1369
      }
1370
    }
1371
1372
    if ($check_session == true) {
1373
      if ( (tep_session_is_registered('customer_id') == false) || ($id != $customer_id) ) {