From 7e40352642ab9cb7d196f8ca43783d3ad0371549 Mon Sep 17 00:00:00 2001
From: Pierre Buyle <buyle@pheromone.ca>
Date: Tue, 12 Feb 2013 10:20:08 -0500
Subject: [PATCH] Issue #1915188 by mongolito404: "Add the country code if not
 filled by the user" remove country code of US and CA
 numbers when provided.

---
 include/phone.ca.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/phone.ca.inc b/include/phone.ca.inc
index 6fa1432..fd3bfd8 100644
--- a/include/phone.ca.inc
+++ b/include/phone.ca.inc
@@ -70,7 +70,7 @@ function format_ca_phone_number($phonenumber, $field) {
   $separator = isset($field['ca_phone_separator']) ? $field['ca_phone_separator'] : '-';
 
   // construct ten-digit phone number
-  $phonenumber =
+  $phonenumber = $matches[1] .
     ( $field['ca_phone_parentheses'] ?
       '(' . $matches[2] . ') ' :
       $matches[2] . $separator ) .
-- 
1.7.11.1

