roundcubemail/plugins/vcard_attachments/vcard_attachments.php
function is_vcard($part)
    {
        return (
            // Content-Type: text/vcard;
            $part->mimetype == 'text/vcard' ||
            // Content-Type: text/x-vcard;
            $part->mimetype == 'text/x-vcard' ||
            // Content-Type: text/directory; profile=vCard;
            ($part->mimetype == 'text/directory' && (
                ($part->ctype_parameters['profile'] &&
                    strtolower($part->ctype_parameters['profile']) == 'vcard')
            // Content-Type: text/directory; (with filename=*.vcf)
                    || ($part->filename && preg_match('/\.vcf$/i', $part->filename))
                )
            )
        );
    }
function is_vcard($part)
    {
        return (
            // Content-Type: text/vcard;
            $part->mimetype == 'text/vcard' ||
            // Content-Type: text/x-vcard;
            $part->mimetype == 'text/x-vcard' ||
            // Content-Type: text/directory; profile=vCard;
            ($part->mimetype == 'text/directory' && (
                ($part->ctype_parameters['profile'] &&
                    strtolower($part->ctype_parameters['profile']) == 'vcard')
            // Content-Type: text/directory; (with filename=*.vcf)
                    || ($part->filename && preg_match('/\.vcf$/i', $part->filename))
                )
            )
        );
    }
function is_vcard ( $ part ) { return ( // Content-Type: text/vcard; $ part -> mimetype == 'text/vcard' || // Content-Type: text/x-vcard; $ part -> mimetype == 'text/x-vcard' || // Content-Type: text/directory; profile=vCard; ( $ part -> mimetype == 'text/directory' && ( ( $ part -> ctype_parameters [ 'profile' ] && strtolower ( $ part -> ctype_parameters [ 'profile' ] ) == 'vcard' ) // Content-Type: text/directory; (with filename=*.vcf) || ( $ part -> filename && preg_match ( '/\.vcf$/i' , $ part -> filename ) ) ) ) ) ; }
Checks if specified message part is a vcard data

@param rcube_message_part Part object

@return boolean True if part is of type vcard
Checks if specified message part is a vcard data