X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcrepair.php;h=afa45e881cf2d017aa10592c1527682ff0a199df;hb=e9638b69801cee3e74a97825f9af3749c9322c53;hp=01b88d37a237a2b917466f56d07b6a5a1f401f72;hpb=4cff911939b263993eb41682ca558c975e2db01f;p=friendica.git diff --git a/mod/crepair.php b/mod/crepair.php index 01b88d37a2..afa45e881c 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -18,15 +18,16 @@ function crepair_post(&$a) { $contact = $r[0]; - $nick = ((x($_POST,'nick')) ? $_POST['nick'] : null); - $url = ((x($_POST,'url')) ? $_POST['url'] : null); - $request = ((x($_POST,'request')) ? $_POST['request'] : null); - $confirm = ((x($_POST,'confirm')) ? $_POST['confirm'] : null); - $notify = ((x($_POST,'notify')) ? $_POST['notify'] : null); - $poll = ((x($_POST,'poll')) ? $_POST['poll'] : null); + $nick = ((x($_POST,'nick')) ? $_POST['nick'] : ''); + $url = ((x($_POST,'url')) ? $_POST['url'] : ''); + $request = ((x($_POST,'request')) ? $_POST['request'] : ''); + $confirm = ((x($_POST,'confirm')) ? $_POST['confirm'] : ''); + $notify = ((x($_POST,'notify')) ? $_POST['notify'] : ''); + $poll = ((x($_POST,'poll')) ? $_POST['poll'] : ''); + $attag = ((x($_POST,'attag')) ? $_POST['attag'] : ''); - $r = q("UPDATE `contact` SET `nick` = '%s', `url` = '%s', `request` = '%s', `confirm` = '%s', `notify` = '%s', `poll` = '%s' + $r = q("UPDATE `contact` SET `nick` = '%s', `url` = '%s', `request` = '%s', `confirm` = '%s', `notify` = '%s', `poll` = '%s', `attag` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", dbesc($nick), dbesc($url), @@ -34,12 +35,13 @@ function crepair_post(&$a) { dbesc($confirm), dbesc($notify), dbesc($poll), + dbesc($attag), intval($contact['id']), local_user() ); if($r) - notice( t('Contact settings applied.') . EOL); + info( t('Contact settings applied.') . EOL); else notice( t('Contact update failed.') . EOL); @@ -84,6 +86,7 @@ function crepair_content(&$a) { $o .= replace_macros($tpl, array( '$label_name' => t('Name'), '$label_nick' => t('Account Nickname'), + '$label_attag' => t('@Tagname - overrides Name/Nickname'), '$label_url' => t('Account URL'), '$label_request' => t('Friend Request URL'), '$label_confirm' => t('Friend Confirm URL'), @@ -97,9 +100,10 @@ function crepair_content(&$a) { '$confirm' => $contact['confirm'], '$notify' => $contact['notify'], '$poll' => $contact['poll'], + '$contact_attag' => $contact['attag'], '$lbl_submit' => t('Submit') )); return $o; -} \ No newline at end of file +}