items: added some logging infos

This commit is contained in:
Michael Vogel 2012-09-02 17:49:06 +02:00
parent d40f25ae08
commit 3c24a7ed3e

View file

@ -793,6 +793,8 @@ function get_atom_elements($feed,$item) {
// There is some better way to parse this array - but it didn't worked for me. // There is some better way to parse this array - but it didn't worked for me.
$child = $item->feed->data["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["feed"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["entry"][0]["child"]["http://activitystrea.ms/spec/1.0/"][object][0]["child"]; $child = $item->feed->data["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["feed"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["entry"][0]["child"]["http://activitystrea.ms/spec/1.0/"][object][0]["child"];
if (is_array($child)) { if (is_array($child)) {
logger('get_atom_elements: Looking for status.net repeated message');
$message = $child["http://activitystrea.ms/spec/1.0/"]["object"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["content"][0]["data"]; $message = $child["http://activitystrea.ms/spec/1.0/"]["object"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]["content"][0]["data"];
$author = $child[SIMPLEPIE_NAMESPACE_ATOM_10]["author"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10]; $author = $child[SIMPLEPIE_NAMESPACE_ATOM_10]["author"][0]["child"][SIMPLEPIE_NAMESPACE_ATOM_10];
$uri = $author["uri"][0]["data"]; $uri = $author["uri"][0]["data"];
@ -801,6 +803,8 @@ function get_atom_elements($feed,$item) {
$avatar = $avatar["href"]; $avatar = $avatar["href"];
if (($name != "") and ($uri != "") and ($avatar != "") and ($message != "")) { if (($name != "") and ($uri != "") and ($avatar != "") and ($message != "")) {
logger('get_atom_elements: fixing sender of repeated message');
$res["owner-name"] = $res["author-name"]; $res["owner-name"] = $res["author-name"];
$res["owner-link"] = $res["author-link"]; $res["owner-link"] = $res["author-link"];
$res["owner-avatar"] = $res["author-avatar"]; $res["owner-avatar"] = $res["author-avatar"];