a few more fsw tweaks
This commit is contained in:
parent
d453560be9
commit
eb5e6aae72
11 changed files with 48 additions and 21 deletions
|
@ -935,8 +935,12 @@ function consume_feed($xml,$importer,$contact, &$hub) {
|
|||
if(! is_array($contact))
|
||||
return;
|
||||
|
||||
if($contact['network'] === 'stat' && strlen($datarray['title']))
|
||||
unset($datarray['title']);
|
||||
if($contact['network'] === 'stat') {
|
||||
if(strlen($datarray['title']))
|
||||
unset($datarray['title']);
|
||||
if(($contact['rel'] == REL_VIP) || ($contact['rel'] == REL_BUD))
|
||||
$datarray['last-child'] = 1;
|
||||
}
|
||||
$datarray['parent-uri'] = $item_id;
|
||||
$datarray['uid'] = $importer['uid'];
|
||||
$datarray['contact-id'] = $contact['id'];
|
||||
|
@ -960,7 +964,7 @@ function new_follower($importer,$contact,$datarray,$item) {
|
|||
|
||||
if(is_array($contact)) {
|
||||
if($contact['network'] == 'stat' && $contact['rel'] == REL_FAN) {
|
||||
$q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||
$r = q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||
intval(REL_BUD),
|
||||
intval($contact['id']),
|
||||
intval($importer['uid'])
|
||||
|
@ -1010,7 +1014,7 @@ function new_follower($importer,$contact,$datarray,$item) {
|
|||
|
||||
function lose_follower($importer,$contact,$datarray,$item) {
|
||||
|
||||
if($contact['rel'] == REL_BUD) {
|
||||
if(($contact['rel'] == REL_BUD) || ($contact['rel'] == REL_FAN)) {
|
||||
q("UPDATE `contact` SET `rel` = %d WHERE `id` = %d LIMIT 1",
|
||||
intval(REL_FAN),
|
||||
intval($contact['id'])
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
killme();
|
||||
}
|
||||
|
||||
$r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`page-flags`
|
||||
$r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, `user`.`page-flags`
|
||||
FROM `contact` LEFT JOIN `user` ON `user`.`uid` = `contact`.`uid`
|
||||
WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
|
||||
intval($uid)
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
require_once('datetime.php');
|
||||
require_once('simplepie/simplepie.inc');
|
||||
require_once('include/items.php');
|
||||
|
||||
require_once('include/Contact.php');
|
||||
|
||||
$debugging = get_config('system','debugging');
|
||||
|
|
|
@ -136,7 +136,7 @@ EOT;
|
|||
|
||||
$signature = base64url_encode($rsa->sign($data . $precomputed));
|
||||
|
||||
$signature2 = base64url_encode($rsa->sign($data));
|
||||
$signature2 = base64url_encode($rsa->sign($data));
|
||||
|
||||
$salmon_tpl = load_view_file('view/magicsig.tpl');
|
||||
$salmon = replace_macros($salmon_tpl,array(
|
||||
|
@ -154,7 +154,7 @@ EOT;
|
|||
));
|
||||
|
||||
$a = get_app();
|
||||
$return_code = trim($a->get_curl_code);
|
||||
$return_code = trim($a->get_curl_code());
|
||||
|
||||
// check for success, e.g. 2xx
|
||||
|
||||
|
@ -177,7 +177,8 @@ EOT;
|
|||
'Content-type: application/magic-envelope+xml',
|
||||
'Content-length: ' . strlen($salmon)
|
||||
));
|
||||
$return_code = trim($a->get_curl_code);
|
||||
$return_code = trim($a->get_curl_code());
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue