]> git.mxchange.org Git - friendica.git/blobdiff - mod/crepair.php
Merge remote-tracking branch 'upstream/master'
[friendica.git] / mod / crepair.php
old mode 100755 (executable)
new mode 100644 (file)
index ec963b1..0fdab7e
@@ -28,7 +28,7 @@ function crepair_init(&$a) {
                        $o .= '</div>';
                        $a->page['aside'] .= $o;
 
-       }       
+       }
 }
 
 
@@ -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')) ? $_POST['remote_self'] : false);
 
-       $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,13 +71,14 @@ function crepair_post(&$a) {
                dbesc($notify),
                dbesc($poll),
                dbesc($attag),
+               intval($remote_self),
                intval($contact['id']),
                local_user()
        );
 
        if($photo) {
                logger('mod-crepair: updating photo from ' . $photo);
-               require_once("Photo.php");
+               require_once("include/Photo.php");
 
                $photos = import_profile_photo($photo,local_user(),$contact['id']);
 
@@ -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'],
@@ -163,8 +168,10 @@ function crepair_content(&$a) {
                '$notify'       => $contact['notify'],
                '$poll'         => $contact['poll'],
                '$contact_attag'  => $contact['attag'],
+               '$contact_self' => array('remote_self', t('Mirror all posts to the wall?'), $contact['remote_self'], 
+                                       t('Shall all posts from this contact posted like your own posts?')),
                '$lbl_submit'   => t('Submit')
-       ));
+           ));
 
        return $o;