--- phone.cs.inc	2009-03-08 01:04:26.000000000 +0100
+++ phone.cs.new.inc	2009-08-11 10:19:29.000000000 +0200
@@ -32,19 +32,13 @@ function valid_cs_phone_number($phonenum
 function format_cs_phone_number($phonenumber) {
 
   // define regular expression   
-  $regex = "/^((\+|00)420)? ?(\d{3}) ?(\d{3}) ?(\d{3})$/";
+  $regex = "/^((?:\+|00)420)? ?(\d{3}) ?(\d{3}) ?(\d{3})$/";
 
   // get digits of phone number
   preg_match($regex, $phonenumber, $matches);
   
-  if ($field['phone_country_code']) {
-        if ($matches[1] != "+420") {
-    	$phonenumber = "+420" . " " . $matches[3] .' '. $matches[4] .' '. $matches[5]; 
-        }
-   }   
-  else { 
-  	$phonenumber = $matches[3] .' '. $matches[4] .' '. $matches[5];
-  }
+  // construct nine-digit phone number with czech prefix
+  $phonenumber = '+420 '. $matches[2] .' '. $matches[3] .' '. $matches[4];
  
   return $phonenumber;
 }
\ No newline at end of file
