From: Thomas Tanghus Date: Fri, 9 Dec 2011 14:25:26 +0000 (+0100) Subject: Merge git://gitorious.org/owncloud/owncloud into tanghus_remote_backup X-Git-Tag: v3.0~79^2~1^2~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7aa8eb3427679366905840b80a69e36344a5632d;p=nextcloud-server.git Merge git://gitorious.org/owncloud/owncloud into tanghus_remote_backup Conflicts: apps/contacts/ajax/deletebook.php apps/contacts/index.php --- 7aa8eb3427679366905840b80a69e36344a5632d diff --cc apps/contacts/ajax/deletebook.php index 238975436e7,3ede17ab886..a89c00575e9 --- a/apps/contacts/ajax/deletebook.php +++ b/apps/contacts/ajax/deletebook.php @@@ -23,21 -23,12 +23,14 @@@ // Init owncloud require_once('../../../lib/base.php'); - $id = $_POST['id']; - - OC_Log::write('contacts','deletebook.php: '.$id,OC_Log::DEBUG); - +$l10n = new OC_L10N('contacts'); - // Check if we are a user OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('contacts'); - $addressbook = OC_Contacts_Addressbook::find( $id ); - if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){ - OC_JSON::error(array('data' => array( 'message' => $l10n->t('This is not your contact.')))); - exit(); - } -$id = $_GET['id']; ++//$id = $_GET['id']; ++$id = $_POST['id']; + $addressbook = OC_Contacts_App::getAddressbook( $id ); OC_Contacts_Addressbook::delete($id); OC_JSON::success(array('data' => array( 'id' => $id ))); diff --cc apps/contacts/ajax/showaddcard.php index 5842046f00c,54592c89c0d..92e24216c5e --- a/apps/contacts/ajax/showaddcard.php +++ b/apps/contacts/ajax/showaddcard.php @@@ -29,10 -27,10 +27,10 @@@ require_once('../../../lib/base.php') OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('contacts'); - $adr_types = OC_Contacts_VCard::getTypesOfProperty($l10n, 'ADR'); - $phone_types = OC_Contacts_VCard::getTypesOfProperty($l10n, 'TEL'); + $adr_types = OC_Contacts_App::getTypesOfProperty('ADR'); + $phone_types = OC_Contacts_App::getTypesOfProperty('TEL'); -$addressbooks = OC_Contacts_Addressbook::all(OC_USER::getUser()); +$addressbooks = OC_Contacts_Addressbook::allAddressbooks(OC_USER::getUser()); $tmpl = new OC_Template('contacts','part.addcardform'); $tmpl->assign('addressbooks',$addressbooks); $tmpl->assign('adr_types',$adr_types); diff --cc apps/contacts/index.php index 917335fb68b,de7b56dd1ae..29c9e4f1219 --- a/apps/contacts/index.php +++ b/apps/contacts/index.php @@@ -78,16 -74,8 +77,21 @@@ if( !is_null($id)/* || count($contacts) $details = OC_Contacts_VCard::structureContact($vcard); } ++<<<<<<< HEAD +// Include Style and Script +OC_Util::addScript('contacts','interface'); +OC_Util::addStyle('contacts','styles'); +OC_Util::addStyle('contacts','formtastic'); +OC_Util::addScript('', 'jquery.multiselect'); +OC_Util::addStyle('', 'jquery.multiselect'); + +$l10n = new OC_L10N('contacts'); +$adr_types = OC_Contacts_VCard::getTypesOfProperty($l10n, 'ADR'); +$phone_types = OC_Contacts_VCard::getTypesOfProperty($l10n, 'TEL'); ++======= + $adr_types = OC_Contacts_App::getTypesOfProperty('ADR'); + $phone_types = OC_Contacts_App::getTypesOfProperty('TEL'); ++>>>>>>> eeaf539a4414e3081b6f6652167363a3221a1973 // Process the template $tmpl = new OC_Template( 'contacts', 'index', 'user' ); diff --cc apps/contacts/templates/index.php index 2ecadb4d60f,649c4807dd5..44505031c64 --- a/apps/contacts/templates/index.php +++ b/apps/contacts/templates/index.php @@@ -13,11 -15,12 +13,18 @@@
- inc("part.addcardform"); ?> + inc("part.details"); + } + else{ + echo $this->inc("part.addcardform"); + } + ?>
+ +
+
+ t("There was a fail, while parsing the file."); ?> +
+