]> git.mxchange.org Git - friendica.git/blobdiff - mod/crepair.php
Merge pull request #7988 from friendica/MrPetovan-notice
[friendica.git] / mod / crepair.php
index ce27b44982a26a295dd68d75ea2bdaa76b339b02..b9b8651439c531fb84c1f181387782e28daa6d21 100644 (file)
@@ -38,17 +38,17 @@ function crepair_post(App $a)
                return;
        }
 
-       $name        = defaults($_POST, 'name'       , $contact['name']);
-       $nick        = defaults($_POST, 'nick'       , '');
-       $url         = defaults($_POST, 'url'        , '');
-       $alias       = defaults($_POST, 'alias'      , '');
-       $request     = defaults($_POST, 'request'    , '');
-       $confirm     = defaults($_POST, 'confirm'    , '');
-       $notify      = defaults($_POST, 'notify'     , '');
-       $poll        = defaults($_POST, 'poll'       , '');
-       $attag       = defaults($_POST, 'attag'      , '');
-       $photo       = defaults($_POST, 'photo'      , '');
-       $remote_self = defaults($_POST, 'remote_self', false);
+       $name        = ($_POST['name']        ?? '') ?: $contact['name'];
+       $nick        =  $_POST['nick']        ?? '';
+       $url         =  $_POST['url']         ?? '';
+       $alias       =  $_POST['alias']       ?? '';
+       $request     =  $_POST['request']     ?? '';
+       $confirm     =  $_POST['confirm']     ?? '';
+       $notify      =  $_POST['notify']      ?? '';
+       $poll        =  $_POST['poll']        ?? '';
+       $attag       =  $_POST['attag']       ?? '';
+       $photo       =  $_POST['photo']       ?? '';
+       $remote_self =  $_POST['remote_self'] ?? false;
        $nurl        = Strings::normaliseLink($url);
 
        $r = DBA::update(
@@ -134,7 +134,7 @@ function crepair_content(App $a)
 
        $update_profile = in_array($contact['network'], Protocol::FEDERATED);
 
-       $tab_str = Module\Contact::getTabsHTML($a, $contact, 5);
+       $tab_str = Module\Contact::getTabsHTML($a, $contact, 6);
 
        $tpl = Renderer::getMarkupTemplate('crepair.tpl');
        $o = Renderer::replaceMacros($tpl, [