Modification for adding photos.

This commit is contained in:
Thomas Tanghus 2012-02-06 07:23:44 +01:00
parent 89073970d3
commit 89616d81f0

View file

@ -71,6 +71,28 @@ if(is_array($value)) {
$value = strip_tags($value);
}
switch($name) {
case 'BDAY':
$date = New DateTime($value);
$value = $date->format(DateTime::ATOM);
case 'FN':
if(!$value) {
// create a method thats returns an alternative for FN.
//$value = getOtherValue();
}
case 'N':
case 'ORG':
case 'NICKNAME':
break;
case 'EMAIL':
$value = strtolower($value);
break;
case 'TEL':
case 'ADR': // should I delete the property if empty or throw an error?
break;
}
$property = $vcard->addProperty($name, $value); //, $parameters);
$line = count($vcard->children) - 1;