From 4dd4a2258235cfafc0d5a4f87d116755ebe52ead Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 14:52:23 -0800 Subject: [PATCH 1/5] From Tobias H - catch some irregularities caused by cut/paste code --- boot.php | 2 +- include/items.php | 2 +- mod/display.php | 8 ++++---- mod/network.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/boot.php b/boot.php index c3e5c0de0..e1dc7e537 100755 --- a/boot.php +++ b/boot.php @@ -9,7 +9,7 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1265' ); +define ( 'FRIENDICA_VERSION', '2.3.1266' ); define ( 'DFRN_PROTOCOL_VERSION', '2.22' ); define ( 'DB_UPDATE_VERSION', 1129 ); diff --git a/include/items.php b/include/items.php index 7d52571c2..250d023ce 100755 --- a/include/items.php +++ b/include/items.php @@ -2424,7 +2424,7 @@ function local_delivery($importer,$data) { // This is my contact on another system, but it's really me. // Turn this into a wall post. - if($contact['remote_self']) + if($importer['remote_self']) $datarray['wall'] = 1; $datarray['parent-uri'] = $item_id; diff --git a/mod/display.php b/mod/display.php index d96be4333..f510f793d 100755 --- a/mod/display.php +++ b/mod/display.php @@ -74,11 +74,11 @@ function display_content(&$a) { $x = array( 'is_owner' => true, 'allow_location' => $a->user['allow_location'], - 'default_location' => $a->user['default_location'], + 'default_location' => $a->user['default-location'], 'nickname' => $a->user['nickname'], - 'lockstate' => ((($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'), - 'acl' => populate_acl((($group || $cid) ? $def_acl : $a->user), $celeb), - 'bang' => (($group || $cid) ? '!' : ''), + 'lockstate' => ( (is_array($a->user)) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))) ? 'lock' : 'unlock'), + 'acl' => populate_acl($a->user, $celeb), + 'bang' => '', 'visitor' => 'block', 'profile_uid' => local_user() ); diff --git a/mod/network.php b/mod/network.php index 03a671b61..894ac48ed 100755 --- a/mod/network.php +++ b/mod/network.php @@ -263,7 +263,7 @@ function network_content(&$a, $update = 0) { $x = array( 'is_owner' => true, 'allow_location' => $a->user['allow_location'], - 'default_location' => $a->user['default_location'], + 'default_location' => $a->user['default-location'], 'nickname' => $a->user['nickname'], 'lockstate' => ((($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'), 'acl' => populate_acl((($group || $cid) ? $def_acl : $a->user), $celeb), From 21803e0cd33d51cd634d0147409f0a6529441c8e Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 14:54:17 -0800 Subject: [PATCH 2/5] call time pass by reference deprecated --- include/html2bbcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/html2bbcode.php b/include/html2bbcode.php index 65920380b..51d629940 100755 --- a/include/html2bbcode.php +++ b/include/html2bbcode.php @@ -10,7 +10,7 @@ Originally made for the syncom project: http://wiki.piratenpartei.de/Syncom function node2bbcode(&$doc, $oldnode, $attributes, $startbb, $endbb) { do { - $done = node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb); + $done = node2bbcodesub($doc, $oldnode, $attributes, $startbb, $endbb); } while ($done); } From 60ae0d8974ce9f0406978130e4feac84a332509b Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Feb 2012 17:32:44 -0800 Subject: [PATCH 3/5] cleaned up mess created when both people request friendship and one approves as duplex --- mod/dfrn_confirm.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 5a24f0089..0bc3ea7df 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -107,7 +107,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { * */ - $r = q("SELECT * FROM `contact` WHERE ( ( `issued-id` != '' AND `issued-id` = '%s' ) OR ( `id` = %d AND `id` != 0 ) ) AND `uid` = %d LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE ( ( `issued-id` != '' AND `issued-id` = '%s' ) OR ( `id` = %d AND `id` != 0 ) ) AND `uid` = %d AND `duplex` = 0 LIMIT 1", dbesc($dfrn_id), intval($cid), intval($uid) @@ -116,6 +116,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { if(! count($r)) { logger('dfrn_confirm: Contact not found in DB.'); notice( t('Contact not found.') . EOL ); + notice( t('This may occasionally happen if contact was requested by both persons and it has already been approved.') . EOL ); return; } @@ -631,6 +632,15 @@ function dfrn_confirm_post(&$a,$handsfree = null) { xml_status(3,$message); } + // It's possible that the other person also requested friendship. + // If it is a duplex relationship, ditch the issued-id if one exists. + + if($duplex) { + $r = q("UPDATE `contact` SET `issued-id` = '' WHERE `id` = %d LIMIT 1", + intval($dfrn_record) + ); + } + // We're good but now we have to scrape the profile photo and send notifications. From aedb7c5f6961e02733c1df6547cde4bb7d7da8c4 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 29 Feb 2012 21:07:33 +1100 Subject: [PATCH 4/5] Update README --- README | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README b/README index e69de29bb..152d481ea 100644 --- a/README +++ b/README @@ -0,0 +1,4 @@ +Friendica Social Communications Server +====================================== + +Welcome to the free social web. From fb33b4f2bcd18e63d311e6dba3aaa2ea5efdec3b Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 29 Feb 2012 21:09:20 +1100 Subject: [PATCH 5/5] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 65ec68b9c..15c3e825b 100755 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2010, 2011 the Friendica Project +Copyright (c) 2010-2012 the Friendica Project All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy