diff options
author | friendica <info@friendica.com> | 2012-11-02 00:19:04 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-11-02 00:19:04 -0700 |
commit | 83cf11dd956c0fbb84c1c50c643b43a3824dc6da (patch) | |
tree | 72ef390c3529b82698cc1d2466109a32bdedf4f3 /include | |
parent | 37653a376085e7f155ec101b937583f5d08012cc (diff) | |
download | volse-hubzilla-83cf11dd956c0fbb84c1c50c643b43a3824dc6da.tar.gz volse-hubzilla-83cf11dd956c0fbb84c1c50c643b43a3824dc6da.tar.bz2 volse-hubzilla-83cf11dd956c0fbb84c1c50c643b43a3824dc6da.zip |
fixed the hash, now onward & upward
Diffstat (limited to 'include')
-rw-r--r-- | include/follow.php | 6 | ||||
-rw-r--r-- | include/identity.php | 2 | ||||
-rw-r--r-- | include/zot.php | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/include/follow.php b/include/follow.php index 3cf29c733..9cf501ef4 100644 --- a/include/follow.php +++ b/include/follow.php @@ -78,13 +78,11 @@ function new_contact($uid,$url,$channel,$interactive = false) { $global_perms = get_perms(); foreach($j->permissions as $k => $v) { - logger('perm: ' . $k . ' = ' . $v); - logger('global: ' . print_r($global_perms[$k],true)); - if($v) + if($v) { $their_perms = $their_perms | intval($global_perms[$k][1]); + } } - logger('Permissions: ' . $their_perms); diff --git a/include/identity.php b/include/identity.php index ca20fd22e..c188c5025 100644 --- a/include/identity.php +++ b/include/identity.php @@ -125,7 +125,7 @@ function create_identity($arr) { $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_l, xchan_photo_m, xchan_photo_s, xchan_addr, xchan_url, xchan_name, xchan_network, xchan_photo_date, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", dbesc($hash), - dbesc($ret['channel']['channel_guid']), + dbesc($guid), dbesc($sig), dbesc($key['pubkey']), dbesc($a->get_baseurl() . "/photo/profile/l/{$newuid}"), diff --git a/include/zot.php b/include/zot.php index ef4b64e4a..2f11eb299 100644 --- a/include/zot.php +++ b/include/zot.php @@ -188,7 +188,7 @@ function zot_register_hub($arr) { function import_xchan_from_json($j) { - $xchan_hash = base64url_encode(hash('whirlpool',$j->quid . $j->guid_sig, true)); + $xchan_hash = base64url_encode(hash('whirlpool',$j->guid . $j->guid_sig, true)); $import_photos = false; // FIXME - verify the signature @@ -196,6 +196,7 @@ function import_xchan_from_json($j) { $r = q("select * from xchan where xchan_hash = '%s' limit 1", dbesc($xchan_hash) ); + if($r) { if($r[0]['xchan_photo_date'] != $j->photo_updated) $update_photos = true; |