]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge git://gitorious.org/owncloud/owncloud into tanghus_remote_backup
authorThomas Tanghus <thomas@tanghus.net>
Fri, 9 Dec 2011 14:25:26 +0000 (15:25 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Fri, 9 Dec 2011 14:25:26 +0000 (15:25 +0100)
Conflicts:
apps/contacts/ajax/deletebook.php
apps/contacts/index.php

1  2 
apps/contacts/ajax/deletebook.php
apps/contacts/ajax/showaddcard.php
apps/contacts/index.php
apps/contacts/js/interface.js
apps/contacts/lib/vcard.php
apps/contacts/templates/index.php

index 238975436e732449bf6f7d15240056dc8fb8ad57,3ede17ab88647880b717ee294d1dee245a6b95c5..a89c00575e9fc8f15119b76080b9522bc6b2e867
  // 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 )));
index 5842046f00c756e9c803aa1e703db924e6110971,54592c89c0d835d0212488d75642fbb4832ef030..92e24216c5e78eec9b4667943ab70d1af7bb483f
@@@ -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);
index 917335fb68bd3c144dcf29562685901146490f71,de7b56dd1aea8a05446b0767174a8b9465370a03..29c9e4f1219337bd01657a5c03b7c90fdac15f8a
@@@ -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' );
Simple merge
Simple merge
index 2ecadb4d60f2c4df9a8e4e2b7e86b7833f049e42,649c4807dd5f71587022f9b990b25bb18bfd7076..44505031c64e473f21731f00be360bab81bdb5fd
        </ul>
  </div>
  <div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>">
-       <?php echo $this->inc("part.addcardform"); ?>
+       <?php
+               if ($_['id']){
+                       echo $this->inc("part.details");
+               }
+               else{
+                       echo $this->inc("part.addcardform");
+               }
+       ?>
  </div>
 +<!-- Dialogs -->
 +<div id="dialog_holder"></div>
 +<div id="parsingfail_dialog" title="Parsing Fail">
 +      <?php echo $l->t("There was a fail, while parsing the file."); ?>
 +</div>
 +<!-- End of Dialogs -->