aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-25 21:22:36 -0700
committerfriendica <info@friendica.com>2013-09-25 21:22:36 -0700
commit6519433301a571d8e12ffa24b56534bb2e3afe5f (patch)
tree5aaea06e72cd8772eb4c5387423d1f480e194e97 /include/zot.php
parent00e5ded1c892a94c79a854327b44d8673cc43274 (diff)
downloadvolse-hubzilla-6519433301a571d8e12ffa24b56534bb2e3afe5f.tar.gz
volse-hubzilla-6519433301a571d8e12ffa24b56534bb2e3afe5f.tar.bz2
volse-hubzilla-6519433301a571d8e12ffa24b56534bb2e3afe5f.zip
suppress creating the directory update record for profile updates which are part of the normal import_xchan sequence - otherwise we get two for every change. Create it normally if we are called with a profile_update message and don't go through the whole import_xchan thing.
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php
index ae470b70b..0290bc402 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -688,7 +688,7 @@ function import_xchan($arr,$ud_flags = 1) {
if($dirmode != DIRECTORY_MODE_NORMAL) {
if(array_key_exists('profile',$arr) && is_array($arr['profile'])) {
- $profile_changed = import_directory_profile($xchan_hash,$arr['profile'],$arr['address'],$ud_flags);
+ $profile_changed = import_directory_profile($xchan_hash,$arr['profile'],$arr['address'],$ud_flags, 1);
if($profile_changed) {
$what .= 'profile ';
$changed = true;
@@ -1376,7 +1376,7 @@ function process_profile_delivery($sender,$arr,$deliveries) {
dbesc($sender['hash'])
);
if($r)
- import_directory_profile($sender['hash'],$arr,$r[0]['xchan_addr'], 1);
+ import_directory_profile($sender['hash'],$arr,$r[0]['xchan_addr'], 1, 0);
}
@@ -1387,7 +1387,7 @@ function process_profile_delivery($sender,$arr,$deliveries) {
*
*/
-function import_directory_profile($hash,$profile,$addr,$ud_flags = 1) {
+function import_directory_profile($hash,$profile,$addr,$ud_flags = 1, $suppress_update = 0) {
logger('import_directory_profile', LOGGER_DEBUG);
if(! $hash)
@@ -1493,7 +1493,7 @@ function import_directory_profile($hash,$profile,$addr,$ud_flags = 1) {
$d = array('xprof' => $arr, 'profile' => $profile, 'update' => $update);
call_hooks('import_directory_profile', $d);
- if($d['update'])
+ if(($d['update']) && (! $suppress_update))
update_modtime($arr['xprof_hash'],random_string() . '@' . get_app()->get_hostname(), $addr, $ud_flags);
return $d['update'];
}