poco discovery
This commit is contained in:
parent
6accc190d4
commit
93d85858d5
2
boot.php
2
boot.php
@ -16,7 +16,7 @@ require_once('include/features.php');
|
||||
define ( 'FRIENDICA_PLATFORM', 'Friendica Red');
|
||||
define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||
define ( 'ZOT_REVISION', 1 );
|
||||
define ( 'DB_UPDATE_VERSION', 1012 );
|
||||
define ( 'DB_UPDATE_VERSION', 1013 );
|
||||
|
||||
define ( 'EOL', '<br />' . "\r\n" );
|
||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||
|
@ -20,7 +20,7 @@ require_once('include/datetime.php');
|
||||
|
||||
|
||||
|
||||
function poco_load($cid,$uid = 0,$zcid = 0,$url = null) {
|
||||
function poco_load($cid, $uid = 0,$zcid = 0,$url = null) {
|
||||
$a = get_app();
|
||||
|
||||
if($cid) {
|
||||
|
@ -756,10 +756,7 @@ CREATE TABLE IF NOT EXISTS `site` (
|
||||
PRIMARY KEY (`site_url`),
|
||||
KEY `site_flags` (`site_flags`),
|
||||
KEY `site_update` (`site_update`),
|
||||
KEY `site_directory` (`site_directory`),
|
||||
KEY `site_flags_2` (`site_flags`),
|
||||
KEY `site_update_2` (`site_update`),
|
||||
KEY `site_directory_2` (`site_directory`)
|
||||
KEY `site_directory` (`site_directory`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `spam` (
|
||||
@ -833,6 +830,7 @@ CREATE TABLE IF NOT EXISTS `xchan` (
|
||||
`xchan_photo_s` char(255) NOT NULL DEFAULT '',
|
||||
`xchan_addr` char(255) NOT NULL DEFAULT '',
|
||||
`xchan_url` char(255) NOT NULL DEFAULT '',
|
||||
`xchan_connurl` char(255) NOT NULL DEFAULT '',
|
||||
`xchan_name` char(255) NOT NULL DEFAULT '',
|
||||
`xchan_network` char(255) NOT NULL DEFAULT '',
|
||||
`xchan_flags` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
@ -844,7 +842,8 @@ CREATE TABLE IF NOT EXISTS `xchan` (
|
||||
KEY `xchan_name` (`xchan_name`),
|
||||
KEY `xchan_network` (`xchan_network`),
|
||||
KEY `xchan_url` (`xchan_url`),
|
||||
KEY `xchan_flags` (`xchan_flags`)
|
||||
KEY `xchan_flags` (`xchan_flags`),
|
||||
KEY `xchan_connurl` (`xchan_connurl`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `xprof` (
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1012 );
|
||||
define( 'UPDATE_VERSION' , 1013 );
|
||||
|
||||
/**
|
||||
*
|
||||
@ -189,3 +189,11 @@ ADD INDEX ( `expires` )");
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
||||
function update_r1012() {
|
||||
$r = q("ALTER TABLE `xchan` ADD `xchan_connurl` CHAR( 255 ) NOT NULL DEFAULT '' AFTER `xchan_url` ,
|
||||
ADD INDEX ( `xchan_connurl` )");
|
||||
|
||||
if($r)
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
@ -118,11 +118,14 @@ function zfinger_init(&$a) {
|
||||
$ret['photo'] = $e['xchan_photo_l'];
|
||||
$ret['photo_updated'] = $e['xchan_photo_date'];
|
||||
$ret['url'] = $e['xchan_url'];
|
||||
$ret['connections_url']= (($e['xchan_connurl']) ? $e['xchan_connurl'] : z_root() . '/poco/' . $e['channel_address']);
|
||||
$ret['name_updated'] = $e['xchan_name_date'];
|
||||
$ret['target'] = $ztarget;
|
||||
$ret['target_sig'] = $zsig;
|
||||
$ret['searchable'] = $searchable;
|
||||
|
||||
if(! $e['xchan_connurl'])
|
||||
|
||||
// FIXME encrypt permissions when targeted so that only the target can view them, requires sending the pubkey and also checking that the target_sig is signed with that pubkey and isn't a forgery.
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user