diff --git a/mod/admin.php b/mod/admin.php index dd9a0d475f..32a4ab531c 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -328,6 +328,7 @@ function admin_page_site_post(&$a){ $enotify_no_content = ((x($_POST,'enotify_no_content')) ? True : False); $private_addons = ((x($_POST,'private_addons')) ? True : False); $disable_embedded = ((x($_POST,'disable_embedded')) ? True : False); + $allow_users_remote_self = ((x($_POST,'allow_users_remote_self')) ? True : False); $no_multi_reg = ((x($_POST,'no_multi_reg')) ? True : False); $no_openid = !((x($_POST,'no_openid')) ? True : False); @@ -453,6 +454,7 @@ function admin_page_site_post(&$a){ set_config('system','newuser_private', $newuser_private); set_config('system','enotify_no_content', $enotify_no_content); set_config('system','disable_embedded', $disable_embedded); + set_config('system','allow_users_remote_self', $allow_users_remote_self); set_config('system','block_extended_register', $no_multi_reg); set_config('system','no_openid', $no_openid); @@ -603,7 +605,7 @@ function admin_page_site(&$a) { '$enotify_no_content' => array('enotify_no_content', t("Don't include post content in email notifications"), get_config('system','enotify_no_content'), t("Don't include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure.")), '$private_addons' => array('private_addons', t("Disallow public access to addons listed in the apps menu."), get_config('config','private_addons'), t("Checking this box will restrict addons listed in the apps menu to members only.")), '$disable_embedded' => array('disable_embedded', t("Don't embed private images in posts"), get_config('system','disable_embedded'), t("Don't replace locally-hosted private photos in posts with an embedded copy of the image. This means that contacts who receive posts containing private photos will have to authenticate and load each image, which may take a while.")), - + '$allow_users_remote_self' => array('allow_users_remote_self', t('Allow Users to set remote_self'), get_config('system','allow_users_remote_self'), t('With checking this, every user is allowed to mark every contact as a remote_self in the repair contact dialog. Setting this flag on a contact causes mirroring every posting of that contact in the users stream.')), '$no_multi_reg' => array('no_multi_reg', t("Block multiple registrations"), get_config('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")), '$no_openid' => array('no_openid', t("OpenID support"), !get_config('system','no_openid'), t("OpenID support for registration and logins.")), '$no_regfullname' => array('no_regfullname', t("Fullname check"), !get_config('system','no_regfullname'), t("Force users to register with a space between firstname and lastname in Full name, as an antispam measure")), diff --git a/mod/crepair.php b/mod/crepair.php index ec56d7c284..f8336ef0ba 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,9 @@ 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'), + '$allow_remote_self' => get_config('system','allow_users_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 +169,7 @@ function crepair_content(&$a) { '$poll' => $contact['poll'], '$contact_attag' => $contact['attag'], '$lbl_submit' => t('Submit') - )); + )); return $o; diff --git a/view/templates/admin_site.tpl b/view/templates/admin_site.tpl index 7d0e6d8f46..6791fb87f3 100644 --- a/view/templates/admin_site.tpl +++ b/view/templates/admin_site.tpl @@ -89,6 +89,7 @@ {{include file="field_checkbox.tpl" field=$enotify_no_content}} {{include file="field_checkbox.tpl" field=$private_addons}} {{include file="field_checkbox.tpl" field=$disable_embedded}} + {{include file="field_checkbox.tpl" field=$allow_users_remote_self}}

{{$advanced}}

diff --git a/view/templates/crepair.tpl b/view/templates/crepair.tpl index 8d3ed7df89..d53af5dad7 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}}

@@ -43,6 +37,10 @@
+{{if $allow_remote_self eq 1}} +

{{$label_remote_self}}

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