diff options
author | Mario <mario@mariovavti.com> | 2021-08-30 18:03:54 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-08-30 18:03:54 +0000 |
commit | e20a2752d65d16322784622978839f701f475475 (patch) | |
tree | 11e2c62e0ad7e1dab2b5e812709939723f119aa0 | |
parent | e25558e24d8758b788fec7873431492f965d694d (diff) | |
download | volse-hubzilla-e20a2752d65d16322784622978839f701f475475.tar.gz volse-hubzilla-e20a2752d65d16322784622978839f701f475475.tar.bz2 volse-hubzilla-e20a2752d65d16322784622978839f701f475475.zip |
add an optional force flag to actor_store()
-rw-r--r-- | Zotlabs/Lib/Activity.php | 4 | ||||
-rw-r--r-- | include/photo/photo_driver.php | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 3e0b067d9..4f63b31da 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -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; } diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 256369c69..b7ace4f37 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -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']); |