You are here

function phone_supported_countrycode in Phone 6

Same name and namespace in other branches
  1. 7 phone.module \phone_supported_countrycode()

Country supported or not by the module ?

Parameters

string $countrycode:

Return value

boolean Returns a boolean containting the answer to the question.

2 calls to phone_supported_countrycode()
format_phone_number in ./phone.module
Verification for Phone Numbers.
valid_phone_number in ./phone.module
Verification for Phone Numbers.

File

./phone.module, line 880
Defines phone number fields for CCK. Provide some verifications on the phone numbers

Code

function phone_supported_countrycode($countrycode) {
  if ($countrycode == 'fr' || $countrycode == 'be' || $countrycode == 'it' || $countrycode == 'el' || $countrycode == 'ch' || $countrycode == 'ca' || $countrycode == 'cr' || $countrycode == 'pa' || $countrycode == 'gb' || $countrycode == 'ru' || $countrycode == 'ua' || $countrycode == 'es' || $countrycode == 'au' || $countrycode == 'cs' || $countrycode == 'hu' || $countrycode == 'pl' || $countrycode == 'nl' || $countrycode == 'se' || $countrycode == 'za' || $countrycode == 'il' || $countrycode == 'nz' || $countrycode == 'br' || $countrycode == 'cl' || $countrycode == 'cn' || $countrycode == 'hk' || $countrycode == 'mo' || $countrycode == 'ph' || $countrycode == 'sg' || $countrycode == 'jo' || $countrycode == 'eg' || $countrycode == 'pk' || $countrycode == 'int') {
    return TRUE;
  }
  else {

    //Country not taken into account yet
    return FALSE;
  }
}