Code Duplication    Length = 5-5 lines in 2 locations

catalog/includes/functions/general.php 2 locations

@@ 1210-1214 (lines=5) @@
1207
      }
1208
    }
1209
1210
    if ($check_session == true) {
1211
      if (!isset($_SESSION['customer_id']) || ($id != $_SESSION['customer_id'])) {
1212
        return 0;
1213
      }
1214
    }
1215
1216
    $Qorders = $OSCOM_Db->prepare('select count(*) as total from :table_orders o, :table_orders_status s where o.customers_id = :customers_id and o.orders_status = s.orders_status_id and s.language_id = :language_id and s.public_flag = 1');
1217
    $Qorders->bindInt(':customers_id', $id);
@@ 1239-1243 (lines=5) @@
1236
      }
1237
    }
1238
1239
    if ($check_session == true) {
1240
      if (!isset($_SESSION['customer_id']) || ($id != $_SESSION['customer_id'])) {
1241
        return 0;
1242
      }
1243
    }
1244
1245
    $Qaddresses = $OSCOM_Db->prepare('select count(*) as total from :table_address_book where customers_id = :customers_id');
1246
    $Qaddresses->bindInt(':customers_id', $id);