]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
.
[friendica.git] / mod / contacts.php
index 8a36fa4cb6ced11b63946b00bd81a4f5e0193eaf..6e62ec8ef5538595ba8e9dccbfdde48a883d7940 100644 (file)
@@ -2,6 +2,7 @@
 
 require_once('include/Contact.php');
 require_once('include/socgraph.php');
+require_once('include/contact_selectors.php');
 
 function contacts_init(&$a) {
        if(! local_user())
@@ -211,6 +212,9 @@ function contacts_content(&$a) {
                                intval($contact_id),
                                intval(local_user())
                        );
+                       if ($archived) {
+                               q("UPDATE `item` SET `private` = 2 WHERE `contact-id` = %d AND `uid` = %d", intval($contact_id), intval(local_user()));
+                       }
                        if($r) {
                                //notice( t('Contact has been ') . (($archived) ? t('archived') : t('unarchived')) . EOL );
                                info( (($archived) ? t('Contact has been archived') : t('Contact has been unarchived')) . EOL );
@@ -342,7 +346,7 @@ function contacts_content(&$a) {
 
                $lost_contact = (($contact['archive'] && $contact['term-date'] != '0000-00-00 00:00:00' && $contact['term-date'] < datetime_convert('','','now')) ? t('Communications lost with this contact!') : '');
 
-               $o .= replace_macros($tpl,array(
+               $o .= replace_macros($tpl, array(
                        '$header' => t('Contact Editor'),
                        '$tab_str' => $tab_str,
                        '$submit' => t('Submit'),
@@ -384,7 +388,7 @@ function contacts_content(&$a) {
                        '$dir_icon' => $dir_icon,
                        '$alt_text' => $alt_text,
                        '$sparkle' => $sparkle,
-                       '$url' => $url
+                       '$url' => $url,
 
                ));
 
@@ -567,7 +571,7 @@ function contacts_content(&$a) {
        }
        
        $tpl = get_markup_template("contacts-template.tpl");
-       $o .= replace_macros($tpl,array(
+       $o .= replace_macros($tpl, array(
                '$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''),
                '$tabs' => $t,
                '$total' => $total,