From: Tobias Diekershoff Date: Sun, 22 Dec 2013 16:05:49 +0000 (+0100) Subject: added remote_self as option to the contact repair dislog X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f515def280ee6da2056ee496ed7fd0f9ba73e622;p=friendica.git added remote_self as option to the contact repair dislog --- diff --git a/mod/crepair.php b/mod/crepair.php index ec56d7c284..1324185342 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -59,8 +59,9 @@ function crepair_post(&$a) { $poll = ((x($_POST,'poll')) ? $_POST['poll'] : ''); $attag = ((x($_POST,'attag')) ? $_POST['attag'] : ''); $photo = ((x($_POST,'photo')) ? $_POST['photo'] : ''); + $remote_self = ((x($_POST,'remote_self')) ? intval($_POST['remote_self']) : 0); - $r = q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `url` = '%s', `request` = '%s', `confirm` = '%s', `notify` = '%s', `poll` = '%s', `attag` = '%s' + $r = q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `url` = '%s', `request` = '%s', `confirm` = '%s', `notify` = '%s', `poll` = '%s', `attag` = '%s', `remote_self` = '%d' WHERE `id` = %d AND `uid` = %d LIMIT 1", dbesc($name), dbesc($nick), @@ -70,6 +71,7 @@ function crepair_post(&$a) { dbesc($notify), dbesc($poll), dbesc($attag), + $remote_self, intval($contact['id']), local_user() ); @@ -154,6 +156,8 @@ function crepair_content(&$a) { '$label_notify' => t('Notification Endpoint URL'), '$label_poll' => t('Poll/Feed URL'), '$label_photo' => t('New photo from this URL'), + '$label_remote_self' => t('Remote Self'), + '$remote_self' => array('remote_self', t('Mirror postings from this contact'), $contact['remote_self'], t('Mark this contact as remote_self, this will cause friendica to repost new entries from this contact.')), '$contact_name' => $contact['name'], '$contact_nick' => $contact['nick'], '$contact_id' => $contact['id'], @@ -164,7 +168,7 @@ function crepair_content(&$a) { '$poll' => $contact['poll'], '$contact_attag' => $contact['attag'], '$lbl_submit' => t('Submit') - )); + )); return $o; diff --git a/view/templates/crepair.tpl b/view/templates/crepair.tpl index 8d3ed7df89..27c11fa922 100644 --- a/view/templates/crepair.tpl +++ b/view/templates/crepair.tpl @@ -1,9 +1,3 @@ -{{* - * AUTOMATICALLY GENERATED TEMPLATE - * DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN - * - *}} -

{{$contact_name}}

@@ -44,6 +38,9 @@
+

{{$label_remote_self}}

+{{include file="field_checkbox.tpl" field=$remote_self}} +