diff options
author | friendica <info@friendica.com> | 2015-03-23 15:36:17 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-03-23 15:36:17 -0700 |
commit | f2127d4ba717484140530e17eb8ae495cab349d7 (patch) | |
tree | 3e54141dc0b7255e72b9ce9c897248caf2b3d7ee /include | |
parent | 62b2fa6ac7ee85c8572eb868eb30dc2e20cf3040 (diff) | |
download | volse-hubzilla-f2127d4ba717484140530e17eb8ae495cab349d7.tar.gz volse-hubzilla-f2127d4ba717484140530e17eb8ae495cab349d7.tar.bz2 volse-hubzilla-f2127d4ba717484140530e17eb8ae495cab349d7.zip |
limit notification detail queries for items and events
Diffstat (limited to 'include')
-rw-r--r-- | include/api.php | 6 | ||||
-rw-r--r-- | include/hubloc.php | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/api.php b/include/api.php index fdc8edece..3ac8ddbda 100644 --- a/include/api.php +++ b/include/api.php @@ -622,10 +622,14 @@ require_once('include/items.php'); function api_red_xchan(&$a,$type) { + logger('api_xchan'); + if(api_user() === false) return false; + logger('api_xchan'); require_once('include/hubloc.php'); - if($_SERVER['request_method'] === 'POST') { + + if($_SERVER['REQUEST_METHOD'] === 'POST') { $r = xchan_store($_REQUEST); } $r = xchan_fetch($_REQUEST); diff --git a/include/hubloc.php b/include/hubloc.php index ece7bd21a..a4efe1c75 100644 --- a/include/hubloc.php +++ b/include/hubloc.php @@ -184,6 +184,8 @@ function hubloc_mark_as_down($posturl) { function xchan_store($arr) { + logger('xchan_store: ' . print_r($arr,true)); + if(! $arr['hash']) $arr['hash'] = $arr['guid']; if(! $arr['hash']) @@ -202,7 +204,7 @@ function xchan_store($arr) { if(! $arr['url']) $arr['url'] = z_root(); if(! $arr['photo']) - $arr['photo'] = get_default_profile_photo(); + $arr['photo'] = z_root() . '/' . get_default_profile_photo(); $r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_addr, xchan_url, xchan_connurl, xchan_follow, xchan_connpage, xchan_name, xchan_network, xchan_instance_url, xchan_flags, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s','%s',%d,'%s') ", dbesc($arr['hash']), |