mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
add an optional force flag to actor_store()
This commit is contained in:
@@ -1531,7 +1531,7 @@ class Activity {
|
||||
return;
|
||||
}
|
||||
|
||||
static function actor_store($url, $person_obj) {
|
||||
static function actor_store($url, $person_obj, $force = false) {
|
||||
|
||||
if (!is_array($person_obj)) {
|
||||
return;
|
||||
@@ -1641,7 +1641,7 @@ class Activity {
|
||||
// Record exists. Cache existing records for one week at most
|
||||
// then refetch to catch updated profile photos, names, etc.
|
||||
$d = datetime_convert('UTC', 'UTC', 'now - 3 days');
|
||||
if($r[0]['hubloc_updated'] > $d) {
|
||||
if($r[0]['hubloc_updated'] > $d && !$force) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -247,7 +247,6 @@ function import_xchan_photo($photo, $xchan, $thing = false, $force = false) {
|
||||
$result = z_fetch_url($photo, true, 0, [ 'headers' => $h ]);
|
||||
}
|
||||
|
||||
|
||||
if(isset($result)) {
|
||||
$hdrs = [];
|
||||
$h = explode("\n", $result['header']);
|
||||
|
||||
Reference in New Issue
Block a user