]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_notify.php
Replace global $lang with system.language
[friendica.git] / mod / dfrn_notify.php
index e2f0336db6e5e267c0f06016f03e3318c2857773..bfbf4c657a449aec03ab3087ebe0e9a33bea767f 100644 (file)
@@ -208,7 +208,7 @@ function dfrn_dispatch_public($postdata)
        $contact = Contact::getDetailsByAddr($msg['author'], 0);
        if (!$contact) {
                logger('Contact not found for address ' . $msg['author']);
-               System::xmlExit(3, 'Contact not found');
+               System::xmlExit(3, 'Contact ' . $msg['author'] . ' not found');
        }
 
        // We now have some contact, so we fetch it
@@ -222,7 +222,7 @@ function dfrn_dispatch_public($postdata)
        // This should never fail
        if (!DBM::is_result($importer)) {
                logger('Contact not found for address ' . $msg['author']);
-               System::xmlExit(3, 'Contact not found');
+               System::xmlExit(3, 'Contact ' . $msg['author'] . ' not found');
        }
 
        logger('Importing post from ' . $msg['author'] . ' with the public envelope.', LOGGER_DEBUG);
@@ -246,7 +246,7 @@ function dfrn_dispatch_private($user, $postdata)
                $cid = Contact::getIdForURL($msg['author']);
                if (!$cid) {
                        logger('Contact not found for address ' . $msg['author']);
-                       System::xmlExit(3, 'Contact not found');
+                       System::xmlExit(3, 'Contact ' . $msg['author'] . ' not found');
                }
        }
 
@@ -259,12 +259,14 @@ function dfrn_dispatch_private($user, $postdata)
        // This should never fail
        if (!DBM::is_result($importer)) {
                logger('Contact not found for address ' . $msg['author']);
-               System::xmlExit(3, 'Contact not found');
+               System::xmlExit(3, 'Contact ' . $msg['author'] . ' not found');
        }
 
        // Set the user id. This is important if this is a public contact
        $importer['importer_uid']  = $user['uid'];
 
+       $importer = array_merge($importer, $user);
+
        logger('Importing post from ' . $msg['author'] . ' to ' . $user['nickname'] . ' with the private envelope.', LOGGER_DEBUG);
 
        // Now we should be able to import it
@@ -333,7 +335,8 @@ function dfrn_notify_content(App $a) {
                );
 
                if (!DBM::is_result($r)) {
-                       $status = 1;
+                       logger('No user data found for ' . $a->argv[1] . ' - SQL: ' . $sql_extra);
+                       killme();
                }
 
                logger("Remote rino version: ".$rino_remote." for ".$r[0]["url"], LOGGER_DATA);