]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
Merge remote-tracking branch 'upstream/develop' into 1601-dfrn-import
[friendica.git] / mod / contacts.php
index ac7c7d85a1f1e0e85b5ba8d606ba22cbfc13fd08..21578a32954d141b10ff4bd3b601f4305d0b050e 100644 (file)
@@ -125,7 +125,7 @@ function contacts_batch_actions(&$a){
                }
        }
        if ($count_actions>0) {
-               info ( sprintf( tt("%d contact edited.", "%d contacts edited", $count_actions), $count_actions) );
+               info ( sprintf( tt("%d contact edited.", "%d contacts edited.", $count_actions), $count_actions) );
        }
 
        if(x($_SESSION,'return_url'))
@@ -302,7 +302,7 @@ function _contact_update_profile($contact_id) {
                        `uri-date` = '%s',
                        `avatar-date` = '%s'
                        WHERE `id` = %d",
-                       dbesc($photos[0]),
+                       dbesc($data["photo"]),
                        dbesc($photos[1]),
                        dbesc($photos[2]),
                        dbesc(datetime_convert()),
@@ -311,6 +311,8 @@ function _contact_update_profile($contact_id) {
                        intval($contact_id)
                );
 
+       // Update the entry in the gcontact table
+       update_gcontact_from_probe($data["url"]);
 }
 
 function _contact_block($contact_id, $orig_record) {
@@ -901,7 +903,10 @@ function contact_posts($a, $contact_id) {
 
        $o .= $tab_str;
 
-       if ($contact["url"]) {
+       $r = q("SELECT `id` FROM `item` WHERE `contact-id` = %d LIMIT 1", intval($contact_id));
+       if ($r)
+               $o .= posts_from_contact($a, $contact_id);
+       elseif ($contact["url"]) {
                $r = q("SELECT `id` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
                        dbesc(normalise_link($contact["url"])));