aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-02-29 06:56:59 -0500
committerSimon L'nu <simon.lnu@gmail.com>2012-02-29 06:56:59 -0500
commit68554741465e92fe2e462b8de4470ddd0eb91302 (patch)
tree97fe9b7eb83b696688f3eec9cffb4dc57d2a0901
parent21d1dc48a8e83e55c55d894f85b742ef667553d7 (diff)
parentfb33b4f2bcd18e63d311e6dba3aaa2ea5efdec3b (diff)
downloadvolse-hubzilla-68554741465e92fe2e462b8de4470ddd0eb91302.tar.gz
volse-hubzilla-68554741465e92fe2e462b8de4470ddd0eb91302.tar.bz2
volse-hubzilla-68554741465e92fe2e462b8de4470ddd0eb91302.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: Update LICENSE Update README cleaned up mess created when both people request friendship and one approves as duplex call time pass by reference deprecated From Tobias H - catch some irregularities caused by cut/paste code * master:
-rwxr-xr-xLICENSE2
-rw-r--r--README4
-rwxr-xr-xboot.php2
-rwxr-xr-xinclude/html2bbcode.php2
-rwxr-xr-xinclude/items.php2
-rw-r--r--mod/dfrn_confirm.php12
-rwxr-xr-xmod/display.php8
-rwxr-xr-xmod/network.php2
8 files changed, 24 insertions, 10 deletions
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
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.
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/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);
}
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/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.
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),