From 75721b7e8242701cc690a635175b8ef63ddba4fe Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 14 Mar 2018 10:24:08 +0100 Subject: reveal the profile name field only if multi prifiles feature is enabled --- Zotlabs/Module/Profiles.php | 11 ++++------- view/tpl/profile_edit.tpl | 8 ++++++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index fad16cb04..e02cb33db 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -655,7 +655,7 @@ class Profiles extends \Zotlabs\Web\Controller { intval($id), intval(local_channel()) ); - if(! count($r)) { + if(! $r) { notice( t('Profile not found.') . EOL); return; } @@ -712,13 +712,10 @@ class Profiles extends \Zotlabs\Web\Controller { $tpl = get_markup_template("profile_edit.tpl"); $o .= replace_macros($tpl,array( - + '$multi_profiles' => ((feature_enabled(local_channel(),'multi_profiles')) ? true : false), '$form_security_token' => get_form_security_token("profile_edit"), - '$profile_clone_link' => ((feature_enabled(local_channel(),'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t=' - . get_form_security_token("profile_clone") : ''), - '$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' - . get_form_security_token("profile_drop"), - + '$profile_clone_link' => 'profiles/clone/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_clone"), + '$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"), '$fields' => $fields, '$vcard' => $vcard, '$guid' => $r[0]['profile_guid'], diff --git a/view/tpl/profile_edit.tpl b/view/tpl/profile_edit.tpl index 95183fdf4..c967fa02c 100755 --- a/view/tpl/profile_edit.tpl +++ b/view/tpl/profile_edit.tpl @@ -4,7 +4,7 @@ -