added remote_self as option to the contact repair dislog

This commit is contained in:
Tobias Diekershoff 2013-12-22 17:05:49 +01:00
parent 22a6c72b31
commit f515def280
2 changed files with 9 additions and 8 deletions

View file

@ -59,8 +59,9 @@ function crepair_post(&$a) {
$poll = ((x($_POST,'poll')) ? $_POST['poll'] : ''); $poll = ((x($_POST,'poll')) ? $_POST['poll'] : '');
$attag = ((x($_POST,'attag')) ? $_POST['attag'] : ''); $attag = ((x($_POST,'attag')) ? $_POST['attag'] : '');
$photo = ((x($_POST,'photo')) ? $_POST['photo'] : ''); $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", WHERE `id` = %d AND `uid` = %d LIMIT 1",
dbesc($name), dbesc($name),
dbesc($nick), dbesc($nick),
@ -70,6 +71,7 @@ function crepair_post(&$a) {
dbesc($notify), dbesc($notify),
dbesc($poll), dbesc($poll),
dbesc($attag), dbesc($attag),
$remote_self,
intval($contact['id']), intval($contact['id']),
local_user() local_user()
); );
@ -154,6 +156,8 @@ function crepair_content(&$a) {
'$label_notify' => t('Notification Endpoint URL'), '$label_notify' => t('Notification Endpoint URL'),
'$label_poll' => t('Poll/Feed URL'), '$label_poll' => t('Poll/Feed URL'),
'$label_photo' => t('New photo from this 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_name' => $contact['name'],
'$contact_nick' => $contact['nick'], '$contact_nick' => $contact['nick'],
'$contact_id' => $contact['id'], '$contact_id' => $contact['id'],
@ -164,7 +168,7 @@ function crepair_content(&$a) {
'$poll' => $contact['poll'], '$poll' => $contact['poll'],
'$contact_attag' => $contact['attag'], '$contact_attag' => $contact['attag'],
'$lbl_submit' => t('Submit') '$lbl_submit' => t('Submit')
)); ));
return $o; return $o;

View file

@ -1,9 +1,3 @@
{{*
* AUTOMATICALLY GENERATED TEMPLATE
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
*
*}}
<form id="crepair-form" action="crepair/{{$contact_id}}" method="post" > <form id="crepair-form" action="crepair/{{$contact_id}}" method="post" >
<h4>{{$contact_name}}</h4> <h4>{{$contact_name}}</h4>
@ -44,6 +38,9 @@
<input type="text" id="crepair-photo" class="crepair-input" name="photo" value="" /> <input type="text" id="crepair-photo" class="crepair-input" name="photo" value="" />
<div class="clear"></div> <div class="clear"></div>
<h4>{{$label_remote_self}}</h4>
{{include file="field_checkbox.tpl" field=$remote_self}}
<input type="submit" name="submit" value="{{$lbl_submit}}" /> <input type="submit" name="submit" value="{{$lbl_submit}}" />
</form> </form>