ability to link contacts that are "really me, but on another system/network".
This commit is contained in:
		
					parent
					
						
							
								76e56fd44e
							
						
					
				
			
			
				commit
				
					
						d7154a4606
					
				
			
		
					 5 changed files with 21 additions and 2 deletions
				
			
		
							
								
								
									
										2
									
								
								boot.php
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								boot.php
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -6,7 +6,7 @@ ini_set('pcre.backtrack_limit', 250000);
 | 
			
		|||
 | 
			
		||||
define ( 'FRIENDIKA_VERSION',      '2.2.1032' );
 | 
			
		||||
define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
 | 
			
		||||
define ( 'DB_UPDATE_VERSION',      1073      );
 | 
			
		||||
define ( 'DB_UPDATE_VERSION',      1074      );
 | 
			
		||||
 | 
			
		||||
define ( 'EOL',                    "<br />\r\n"     );
 | 
			
		||||
define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,6 +52,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
 | 
			
		|||
  `uid` int(11) NOT NULL COMMENT 'owner uid',
 | 
			
		||||
  `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 | 
			
		||||
  `self` tinyint(1) NOT NULL DEFAULT '0',
 | 
			
		||||
  `remote_self` tinyint(1) NOT NULL DEFAULT '0',
 | 
			
		||||
  `rel` tinyint(1) NOT NULL DEFAULT '0',
 | 
			
		||||
  `duplex` tinyint(1) NOT NULL DEFAULT '0',
 | 
			
		||||
  `network` char(255) NOT NULL,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1260,6 +1260,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee
 | 
			
		|||
				if(! x($datarray,'author-avatar'))
 | 
			
		||||
					$datarray['author-avatar'] = $contact['thumb'];
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
				$r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
 | 
			
		||||
					dbesc($item_id),
 | 
			
		||||
					intval($importer['uid'])
 | 
			
		||||
| 
						 | 
				
			
			@ -1416,6 +1417,12 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $secure_fee
 | 
			
		|||
					$datarray['last-child'] = 0;
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				// This is my contact on another system, but it's really me.
 | 
			
		||||
				// Turn this into a wall post.
 | 
			
		||||
 | 
			
		||||
				if($contact['remote_self'])
 | 
			
		||||
					$datarray['wall'] = 1;
 | 
			
		||||
 | 
			
		||||
				$datarray['parent-uri'] = $item_id;
 | 
			
		||||
				$datarray['uid'] = $importer['uid'];
 | 
			
		||||
				$datarray['contact-id'] = $contact['id'];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -747,6 +747,12 @@ function dfrn_notify_post(&$a) {
 | 
			
		|||
				continue;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// This is my contact on another system, but it's really me.
 | 
			
		||||
			// Turn this into a wall post.
 | 
			
		||||
 | 
			
		||||
			if($contact['remote_self'])
 | 
			
		||||
				$datarray['wall'] = 1;
 | 
			
		||||
 | 
			
		||||
			$datarray['parent-uri'] = $item_id;
 | 
			
		||||
			$datarray['uid'] = $importer['importer_uid'];
 | 
			
		||||
			$datarray['contact-id'] = $importer['id'];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<?php
 | 
			
		||||
 | 
			
		||||
define( 'UPDATE_VERSION' , 1073 );
 | 
			
		||||
define( 'UPDATE_VERSION' , 1074 );
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *
 | 
			
		||||
| 
						 | 
				
			
			@ -585,3 +585,8 @@ function update_1072() {
 | 
			
		|||
	q("ALTER TABLE `item` ADD `starred` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` ");
 | 
			
		||||
	q("ALTER TABLE `item` ADD INDEX ( `starred` ) ");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function update_1073() {
 | 
			
		||||
	q("ALTER TABLE `contact` ADD `remote_self` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `self` ");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue