]> source.dussan.org Git - nextcloud-server.git/commitdiff
Contacts: Fix for not being able to add contact to empty/non-existant address book.
authorThomas Tanghus <thomas@tanghus.net>
Mon, 9 Apr 2012 14:29:56 +0000 (16:29 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 9 Apr 2012 14:30:58 +0000 (16:30 +0200)
apps/contacts/ajax/addcontact.php
apps/contacts/css/contacts.css
apps/contacts/lib/addressbook.php

index 947b35bab51b41c061938f40a68a1f7d096d4015..68da54655aea760a8521fe8f40e5cd575124a8e5 100644 (file)
@@ -47,8 +47,6 @@ OC_Contacts_App::getAddressbook( $aid ); // is owner access check
 
 $fn = trim($_POST['fn']);
 $n = trim($_POST['n']);
-debug('N: '.$n);
-debug('FN: '.$fn);
 
 $vcard = new OC_VObject('VCARD');
 $vcard->setUID();
index 5d3ebf65fbe67be4b659f25b082a3a71bb0b7571..2d207943841cd22c05cad9d0ded891b77c8bd9d2 100644 (file)
@@ -56,7 +56,7 @@ dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; }
 
 .contactpart legend { width:auto; padding:.3em; border:1px solid #ddd; font-weight:bold; cursor:pointer; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }
 #cropbox { margin: auto; }
-#contacts_details_photo { border-radius: 0.5em; border: thin solid #bbb; padding: 0.5em; margin: 0.3em; cursor: pointer; background: url(../../../core/img/loading.gif) no-repeat center center; display: block; /* clear: right;*/ }
+#contacts_details_photo { border-radius: 0.5em; border: thin solid #bbb; margin: 0.3em; cursor: pointer; background: url(../../../core/img/loading.gif) no-repeat center center; display: block; /* clear: right;*/ }
 #contacts_details_photo:hover { background: #fff; }
 /*#contacts_details_photo_progress { margin: 0.3em 0.3em 0.3em 7em; clear: left; }*/
 /* Address editor */
index 052c19e55fe40a8e03b194c34adadc895d71072e..9061fa1914042dff24874f31f80f50227d6a6861 100644 (file)
@@ -169,7 +169,7 @@ class OC_Contacts_Addressbook{
                        $uid = OC_User::getUser();
                }
                $prefbooks = OC_Preferences::getValue($uid,'contacts','openaddressbooks',null);
-               if(is_null($prefbooks)){
+               if(!$prefbooks){
                        $addressbooks = OC_Contacts_Addressbook::all($uid);
                        if(count($addressbooks) == 0){
                                OC_Contacts_Addressbook::add($uid,'default','Default Address Book');