]> git.mxchange.org Git - friendica.git/commitdiff
Changed logging behaviour
authorMichael Vogel <icarus@dabo.de>
Sun, 21 Jun 2015 06:32:03 +0000 (08:32 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 21 Jun 2015 06:32:03 +0000 (08:32 +0200)
include/ostatus.php

index a03e561320ca02e15e4b7cea195e13b28026697e..d1a1f4f98839b0e6caa578574f01cc994e0c4258 100644 (file)
@@ -401,7 +401,7 @@ function ostatus_import($xml,$importer,&$contact, &$hub) {
                $item_id = ostatus_completion($conversation, $importer["uid"], $item);
 
                if (!$item_id) {
-                       logger("Error storing item ".print_r($item, true), LOGGER_DEBUG);
+                       logger("Error storing item", LOGGER_DEBUG);
                        continue;
                }
 
@@ -572,10 +572,11 @@ function ostatus_completion($conversation_url, $uid, $item = array()) {
        if (!sizeof($items)) {
                if (count($item) > 0) {
                        $item_stored = item_store($item, true);
-                       logger("Conversation ".$conversation_url." couldn't be fetched. Item uri ".$item["uri"]." stored: ".$item_stored, LOGGER_DEBUG);
 
-                       if ($item_stored)
+                       if ($item_stored) {
+                               logger("Conversation ".$conversation_url." couldn't be fetched. Item uri ".$item["uri"]." stored: ".$item_stored, LOGGER_DEBUG);
                                ostatus_store_conversation($item_id, $conversation_url);
+                       }
 
                        return($item_stored);
                } else