Skip to content

Commit

Permalink
Fixes indent problems
Browse files Browse the repository at this point in the history
  • Loading branch information
fmbiete committed Aug 28, 2012
1 parent a6f481b commit c7bb374
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
6 changes: 3 additions & 3 deletions backend/combined/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ class BackendCombinedConfig {
// BackendCardDAV settings
// *************************
public static $BackendCardDAV_config = array(
'CARDDAV_SERVER' => CARDDAV_SERVER,
'CARDDAV_PORT' => CARDDAV_PORT,
'CARDDAV_PATH' => CARDDAV_PATH,
'CARDDAV_SERVER' => CARDDAV_SERVER,
'CARDDAV_PORT' => CARDDAV_PORT,
'CARDDAV_PATH' => CARDDAV_PATH,
'CARDDAV_PRINCIPAL' => CARDDAV_PRINCIPAL,
);

Expand Down
52 changes: 30 additions & 22 deletions include/vCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -672,28 +672,36 @@ public function key()
return key($this -> Data);
}

/**
* Magic method for easier access to vcard
*
* @return vCard object
*/
public function access()
{
foreach ($this as $key => $value) {
if ($key == "tel" || $key == "url" || $key == "email" || $key == "photo") {
for ($i=0;$i<sizeof($value); $i++) {
$card[$key][$value[$i]['Type'][0]] = $value[$i]['Value'];
}
} elseif ($key == "adr" ) {
for ($i=0;$i<sizeof($value); $i++) {
$card[$key][$value[$i]['Type'][0]] = $value[$i];
}
} else {
$card[$key] = $value[0];
}
}
return $card;
}
/**
* Magic method for easier access to vcard
*
* @return vCard object
*/
public function access()
{
foreach ($this as $key => $value)
{
if ($key == "tel" || $key == "url" || $key == "email" || $key == "photo")
{
for ($i=0;$i<sizeof($value); $i++)
{
$card[$key][$value[$i]['Type'][0]] = $value[$i]['Value'];
}
}
elseif ($key == "adr" )
{
for ($i=0;$i<sizeof($value); $i++)
{
$card[$key][$value[$i]['Type'][0]] = $value[$i];
}
}
else
{
$card[$key] = $value[0];
}
}

return $card;
}
}
?>

0 comments on commit c7bb374

Please sign in to comment.