aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-20 20:37:06 -0800
committerzotlabs <mike@macgirvin.com>2016-12-20 20:37:06 -0800
commitf3ec818a66e7909bcb744868cfef43c3481c4e43 (patch)
tree4792cdfcf9fa1a4240626a93dc7155448f549bb9 /Zotlabs
parenta270ca51014e8bf98554bd5e8eda33a44aa60460 (diff)
downloadvolse-hubzilla-f3ec818a66e7909bcb744868cfef43c3481c4e43.tar.gz
volse-hubzilla-f3ec818a66e7909bcb744868cfef43c3481c4e43.tar.bz2
volse-hubzilla-f3ec818a66e7909bcb744868cfef43c3481c4e43.zip
abook_vcard cleanup
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Connections.php2
-rw-r--r--Zotlabs/Module/Connedit.php75
2 files changed, 34 insertions, 43 deletions
diff --git a/Zotlabs/Module/Connections.php b/Zotlabs/Module/Connections.php
index a412d16ae..a0375cebb 100644
--- a/Zotlabs/Module/Connections.php
+++ b/Zotlabs/Module/Connections.php
@@ -228,7 +228,7 @@ class Connections extends \Zotlabs\Web\Controller {
$contacts = array();
- if(count($r)) {
+ if($r) {
foreach($r as $rr) {
if($rr['xchan_url']) {
diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php
index 9d55d8ace..29471ed99 100644
--- a/Zotlabs/Module/Connedit.php
+++ b/Zotlabs/Module/Connedit.php
@@ -37,7 +37,7 @@ class Connedit extends \Zotlabs\Web\Controller {
intval(argv(1))
);
if($r) {
- \App::$poi = $r[0];
+ \App::$poi = array_shift($r);
}
}
@@ -373,7 +373,7 @@ class Connedit extends \Zotlabs\Web\Controller {
intval(\App::$poi['abook_id'])
);
if($r) {
- \App::$poi = $r[0];
+ \App::$poi = array_shift($r);
}
$clone = \App::$poi;
@@ -665,13 +665,13 @@ class Connedit extends \Zotlabs\Web\Controller {
if(feature_enabled(local_channel(),'affinity')) {
- $labels = array(
+ $labels = [
t('Me'),
t('Family'),
t('Friends'),
t('Acquaintances'),
t('All')
- );
+ ];
call_hooks('affinity_labels',$labels);
$label_str = '';
@@ -789,8 +789,7 @@ class Connedit extends \Zotlabs\Web\Controller {
else
$locstr = t('none');
- $o .= replace_macros($tpl,array(
-
+ $o .= replace_macros($tpl, [
'$header' => (($self) ? t('Connection Default Permissions') : sprintf( t('Connection: %s'),$contact['xchan_name'])),
'$autoperms' => array('autoperms',t('Apply these permissions automatically'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), t('Connection requests will be approved without your interaction'), $yes_no),
'$addr' => $contact['xchan_addr'],
@@ -840,42 +839,34 @@ class Connedit extends \Zotlabs\Web\Controller {
'$abook_prev' => $abook_prev,
'$abook_next' => $abook_next,
'$vcard_label' => t('Details'),
- '$displayname' => $displayname,
- '$name_label' => t('Name'),
- '$org_label' => t('Organisation'),
- '$title_label' => t('Title'),
- '$tel_label' => t('Phone'),
- '$email_label' => t('Email'),
- '$impp_label' => t('Instant messenger'),
- '$url_label' => t('Website'),
- '$adr_label' => t('Address'),
- '$note_label' => t('Note'),
- '$mobile' => t('Mobile'),
- '$home' => t('Home'),
- '$work' => t('Work'),
- '$other' => t('Other'),
- '$add_card' => t('Add Contact'),
- '$add_field' => t('Add Field'),
- '$create' => t('Create'),
- '$update' => t('Update'),
- '$delete' => t('Delete'),
- '$cancel' => t('Cancel'),
- '$po_box' => t('P.O. Box'),
- '$extra' => t('Additional'),
- '$street' => t('Street'),
- '$locality' => t('Locality'),
- '$region' => t('Region'),
- '$zip_code' => t('ZIP Code'),
- '$country' => t('Country')
-
-
-
-
-
-
-
-
- ));
+ '$displayname' => $displayname,
+ '$name_label' => t('Name'),
+ '$org_label' => t('Organisation'),
+ '$title_label' => t('Title'),
+ '$tel_label' => t('Phone'),
+ '$email_label' => t('Email'),
+ '$impp_label' => t('Instant messenger'),
+ '$url_label' => t('Website'),
+ '$adr_label' => t('Address'),
+ '$note_label' => t('Note'),
+ '$mobile' => t('Mobile'),
+ '$home' => t('Home'),
+ '$work' => t('Work'),
+ '$other' => t('Other'),
+ '$add_card' => t('Add Contact'),
+ '$add_field' => t('Add Field'),
+ '$create' => t('Create'),
+ '$update' => t('Update'),
+ '$delete' => t('Delete'),
+ '$cancel' => t('Cancel'),
+ '$po_box' => t('P.O. Box'),
+ '$extra' => t('Additional'),
+ '$street' => t('Street'),
+ '$locality' => t('Locality'),
+ '$region' => t('Region'),
+ '$zip_code' => t('ZIP Code'),
+ '$country' => t('Country')
+ ]);
$arr = array('contact' => $contact,'output' => $o);