kopia lustrzana https://github.com/friendica/friendica
Merge pull request #3693 from annando/remote-self-finally
"remote self" now finally really works with addonspull/3694/head
commit
d79fe20f61
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Ładowanie…
Reference in New Issue