summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-02-11 21:57:38 +0100
committerBart Visscher <bartv@thisnet.nl>2012-02-12 15:14:23 +0100
commit8f3da6ee9b6082e6853a0166470316e5b19867e3 (patch)
tree79e6178b6e1a265827005f732251ad8d4ca9e82c /apps
parent1a74f0a18c799444d462c3d65ca348713bf89ad3 (diff)
downloadnextcloud-server-8f3da6ee9b6082e6853a0166470316e5b19867e3.tar.gz
nextcloud-server-8f3da6ee9b6082e6853a0166470316e5b19867e3.zip
Small coding style update
Fixup OC_Contacts_App
Diffstat (limited to 'apps')
-rw-r--r--apps/contacts/lib/app.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index 944bd6e83af..5e58f9e928f 100644
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -10,7 +10,7 @@
* This class manages our app actions
*/
OC_Contacts_App::$l10n = new OC_L10N('contacts');
-class OC_Contacts_App{
+class OC_Contacts_App {
public static $l10n;
/**
@@ -18,7 +18,7 @@ class OC_Contacts_App{
* @param int $id of contact
* @param Sabre_VObject_Component $vcard to render
*/
- public static function renderDetails($id, $vcard, $new=false){
+ public static function renderDetails($id, $vcard, $new=false) {
$property_types = self::getAddPropertyOptions();
$adr_types = self::getTypesOfProperty('ADR');
$phone_types = self::getTypesOfProperty('TEL');
@@ -46,9 +46,9 @@ class OC_Contacts_App{
OC_JSON::success(array('data' => array( 'id' => $id, 'name' => $name, 'page' => $page )));
}
- public static function getAddressbook($id){
+ public static function getAddressbook($id) {
$addressbook = OC_Contacts_Addressbook::find( $id );
- if( $addressbook === false || $addressbook['userid'] != OC_User::getUser()){
+ if( $addressbook === false || $addressbook['userid'] != OC_User::getUser()) {
if ($addressbook === false) {
OC_Log::write('contacts', 'Addressbook not found: '. $id, OC_Log::ERROR);
}
@@ -61,9 +61,9 @@ class OC_Contacts_App{
return $addressbook;
}
- public static function getContactObject($id){
+ public static function getContactObject($id) {
$card = OC_Contacts_VCard::find( $id );
- if( $card === false ){
+ if( $card === false ) {
OC_Log::write('contacts', 'Contact could not be found: '.$id, OC_Log::ERROR);
OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('Contact could not be found.').' '.$id)));
exit();
@@ -77,12 +77,12 @@ class OC_Contacts_App{
* @brief Gets the VCard as an OC_VObject
* @returns The card or null if the card could not be parsed.
*/
- public static function getContactVCard($id){
+ public static function getContactVCard($id) {
$card = self::getContactObject( $id );
$vcard = OC_VObject::parse($card['carddata']);
// Try to fix cards with missing 'N' field from pre ownCloud 4. Hot damn, this is ugly...
- if(!is_null($vcard) && !$vcard->__isset('N')){
+ if(!is_null($vcard) && !$vcard->__isset('N')) {
$appinfo = $info=OC_App::getAppInfo('contacts');
if($appinfo['version'] >= 5) {
OC_Log::write('contacts','OC_Contacts_App::getContactVCard. Deprecated check for missing N field', OC_Log::DEBUG);
@@ -100,10 +100,10 @@ class OC_Contacts_App{
return $vcard;
}
- public static function getPropertyLineByChecksum($vcard, $checksum){
+ public static function getPropertyLineByChecksum($vcard, $checksum) {
$line = null;
- for($i=0;$i<count($vcard->children);$i++){
- if(md5($vcard->children[$i]->serialize()) == $checksum ){
+ for($i=0;$i<count($vcard->children);$i++) {
+ if(md5($vcard->children[$i]->serialize()) == $checksum ) {
$line = $i;
break;
}
@@ -114,7 +114,7 @@ class OC_Contacts_App{
/**
* @return array of vcard prop => label
*/
- public static function getAddPropertyOptions(){
+ public static function getAddPropertyOptions() {
$l10n = self::$l10n;
return array(
'ADR' => $l10n->t('Address'),
@@ -127,9 +127,9 @@ class OC_Contacts_App{
/**
* @return types for property $prop
*/
- public static function getTypesOfProperty($prop){
+ public static function getTypesOfProperty($prop) {
$l = self::$l10n;
- switch($prop){
+ switch($prop) {
case 'ADR':
return array(
'WORK' => $l->t('Work'),