Update carddav.php

added code by justbrain slightly adopted to the structure of the section to make things more readable