Merge pull request #3693 from annando/remote-self-finally

"remote self" now finally really works with addons
pull/3694/head
Tobias Diekershoff 2017-09-08 11:00:06 +02:00 zatwierdzone przez GitHub
commit d79fe20f61
2 zmienionych plików z 10 dodań i 3 usunięć

Wyświetl plik

@ -1595,9 +1595,6 @@ function item_is_remote_self($contact, &$datarray) {
$datarray['author-link'] = $datarray['owner-link'];
$datarray['author-avatar'] = $datarray['owner-avatar'];
// Trigger automatic reactions for addons
$datarray['api_source'] = true;
unset($datarray['created']);
unset($datarray['edited']);
}
@ -1623,6 +1620,13 @@ function item_is_remote_self($contact, &$datarray) {
$datarray["app"] = "Feed";
}
// Trigger automatic reactions for addons
$datarray['api_source'] = true;
// We have to tell the hooks who we are - this really should be improved
$_SESSION["authenticated"] = true;
$_SESSION["uid"] = $contact['uid'];
return true;
}

Wyświetl plik

@ -303,6 +303,9 @@ function poller_exec_function($queue, $funcname, $argv) {
$up_duration = number_format(microtime(true) - $poller_up_start, 3);
// Reset global data to avoid interferences
unset($_SESSION);
$funcname($argv, $argc);
$a->process_id = $old_process_id;