aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2011-12-18 23:04:45 +0100
committerBart Visscher <bartv@thisnet.nl>2011-12-18 23:10:43 +0100
commitdff9585f64e2723eaf2d088d9e946fe1d649ccd8 (patch)
tree4a44b933e20c3dcf0e965f4567795676701f10b2
parentff346ad1352ba5f99e409e2e1efca8a3e356af31 (diff)
downloadnextcloud-server-dff9585f64e2723eaf2d088d9e946fe1d649ccd8.tar.gz
nextcloud-server-dff9585f64e2723eaf2d088d9e946fe1d649ccd8.zip
Contacts: add missing property_options template var
-rw-r--r--apps/contacts/index.php2
-rw-r--r--apps/contacts/lib/app.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/apps/contacts/index.php b/apps/contacts/index.php
index de7b56dd1ae..58ddc74f532 100644
--- a/apps/contacts/index.php
+++ b/apps/contacts/index.php
@@ -74,11 +74,13 @@ if( !is_null($id)/* || count($contacts)*/){
$details = OC_Contacts_VCard::structureContact($vcard);
}
+$property_types = OC_Contacts_App::getAddPropertyOptions();
$adr_types = OC_Contacts_App::getTypesOfProperty('ADR');
$phone_types = OC_Contacts_App::getTypesOfProperty('TEL');
// Process the template
$tmpl = new OC_Template( 'contacts', 'index', 'user' );
+$tmpl->assign('property_types',$property_types);
$tmpl->assign('adr_types',$adr_types);
$tmpl->assign('phone_types',$phone_types);
$tmpl->assign('addressbooks', $addressbooks);
diff --git a/apps/contacts/lib/app.php b/apps/contacts/lib/app.php
index ba086e4aca8..79e00920a65 100644
--- a/apps/contacts/lib/app.php
+++ b/apps/contacts/lib/app.php
@@ -38,7 +38,7 @@ class OC_Contacts_App{
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()){
OC_JSON::error(array('data' => array( 'message' => self::$l10n->t('This is not your addressbook.')))); // Same here (as with the contact error). Could this error be improved?
exit();
}