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:
This commit is contained in:
commit
6855474146
8 changed files with 24 additions and 10 deletions
2
LICENSE
2
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
|
||||
|
|
4
README
4
README
|
@ -0,0 +1,4 @@
|
|||
Friendica Social Communications Server
|
||||
======================================
|
||||
|
||||
Welcome to the free social web.
|
2
boot.php
2
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 );
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
||||
|
|
|
@ -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()
|
||||
);
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue