]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
set update frequency to twice daily for 'feed' contacts, unable to set update frequen...
[friendica.git] / mod / contacts.php
index 33d1955a54b2c51ac056651a1b3407979a90ab62..177ca99734033bee7c1d280e4ffd6cc73471661b 100644 (file)
@@ -40,6 +40,8 @@ function contacts_post(&$a) {
                return; // NOTREACHED
        }
 
+       call_hooks('contact_edit_post', $_POST);
+
        $profile_id = intval($_POST['profile-assign']);
        if($profile_id) {
                $r = q("SELECT `id` FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
@@ -51,9 +53,9 @@ function contacts_post(&$a) {
                        return;
                }
        }
+logger('contact_edit ' . print_r($_POST,true));
 
-
-       $priority = intval($_POST['priority']);
+       $priority = intval($_POST['poll']);
        if($priority == (-1))
                
        if($priority > 5 || $priority < 0)
@@ -165,7 +167,8 @@ function contacts_content(&$a) {
                                        '$type' => 'text',
                                        '$content' => t('stopped following'),
                                        '$nick' => $a->user['nickname'],
-                                       '$verb' => ACTIVITY_UNFOLLOW
+                                       '$verb' => ACTIVITY_UNFOLLOW,
+                                       '$ostat_follow' => '<as:verb>http://ostatus.org/schema/1.0/unfollow</as:verb>' . "\r\n"
                                ));
 
                                if((x($orig_record[0],'notify')) && (strlen($orig_record[0]['notify']))) {
@@ -174,6 +177,12 @@ function contacts_content(&$a) {
                                }
                        }
 
+                       if($orig_record[0]['network'] === 'dfrn') {
+                               require_once('include/items.php');
+                               dfrn_deliver($a->user,$orig_record[0],'placeholder', 1);
+                       }
+
+
                        contact_remove($contact_id);
                        notice( t('Contact has been removed.') . EOL );
                        goaway($a->get_baseurl() . '/contacts');
@@ -243,7 +252,7 @@ function contacts_content(&$a) {
                        '$contact_id' => $r[0]['id'],
                        '$block_text' => (($r[0]['blocked']) ? t('Unblock this contact') : t('Block this contact') ),
                        '$ignore_text' => (($r[0]['readonly']) ? t('Unignore this contact') : t('Ignore this contact') ),
-                       '$insecure' => (($r[0]['network'] === 'dfrn') ? '' : load_view_file('view/insecure_net.tpl')),
+                       '$insecure' => (($r[0]['network'] === 'stat') ? load_view_file('view/insecure_net.tpl') : ''),
                        '$info' => $r[0]['info'],
                        '$blocked' => (($r[0]['blocked']) ? '<div id="block-message">' . t('Currently blocked') . '</div>' : ''),
                        '$ignored' => (($r[0]['readonly']) ? '<div id="ignore-message">' . t('Currently ignored') . '</div>' : ''),
@@ -259,7 +268,11 @@ function contacts_content(&$a) {
 
                ));
 
-               return $o;
+               $arr = array('contact' => $r[0],'output' => $o);
+
+               call_hooks('contact_edit', $arr);
+
+               return $arr['output'];
 
        }
 
@@ -349,6 +362,7 @@ function contacts_content(&$a) {
                                '$url' => $url
                        ));
                }
+
                $o .= '<div id="contact-edit-end"></div>';
 
        }