diff options
author | friendica <info@friendica.com> | 2013-03-12 17:39:35 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-03-12 17:39:35 -0700 |
commit | e7b6669dc31d84d7cf2f1f3288b6a758ac88dfda (patch) | |
tree | f06e21aa27c983d96f6c51c720bfe76e453e35a4 /include | |
parent | 022316fd49b6c8ecd713a4d198b587dd13565f8b (diff) | |
download | volse-hubzilla-e7b6669dc31d84d7cf2f1f3288b6a758ac88dfda.tar.gz volse-hubzilla-e7b6669dc31d84d7cf2f1f3288b6a758ac88dfda.tar.bz2 volse-hubzilla-e7b6669dc31d84d7cf2f1f3288b6a758ac88dfda.zip |
update xchans on url change
Diffstat (limited to 'include')
-rw-r--r-- | include/zot.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php index e1a5f789d..abaa5c9ab 100644 --- a/include/zot.php +++ b/include/zot.php @@ -454,12 +454,19 @@ function import_xchan($arr) { $new_flags = $r[0]['xchan_flags']; - if(($r[0]['xchan_name_date'] != $arr['name_updated']) || ($r[0]['xchan_connurl'] != $arr['connections_url']) || ($r[0]['xchan_flags'] != $new_flags)) { - $r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s', xchan_connurl = '%s', xchan_flags = %d where xchan_hash = '%s' limit 1", + if(($r[0]['xchan_name_date'] != $arr['name_updated']) + || ($r[0]['xchan_connurl'] != $arr['connections_url']) + || ($r[0]['xchan_flags'] != $new_flags) + || ($r[0]['xchan_addr'] != $arr['address']) + || ($r[0]['xchan_url'] != $arr['url'])) { + $r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s', xchan_connurl = '%s', xchan_flags = %d, + xchan_addr = '%s', xchan_url = '%s' where xchan_hash = '%s' limit 1", dbesc($arr['name']), dbesc($arr['name_updated']), dbesc($arr['connections_url']), intval($new_flags), + dbesc($arr['address']), + dbesc($arr['url']), dbesc($xchan_hash) ); } |