Merge remote-tracking branch 'mike/master' into dev
This commit is contained in:
commit
7c5f1e814b
@ -17,15 +17,20 @@ class Follow extends \Zotlabs\Web\Controller {
|
|||||||
$url = notags(trim($_REQUEST['url']));
|
$url = notags(trim($_REQUEST['url']));
|
||||||
$return_url = $_SESSION['return_url'];
|
$return_url = $_SESSION['return_url'];
|
||||||
$confirm = intval($_REQUEST['confirm']);
|
$confirm = intval($_REQUEST['confirm']);
|
||||||
|
$interactive = (($_REQUEST['interactive']) ? intval($_REQUEST['interactive']) : 1);
|
||||||
$channel = \App::get_channel();
|
$channel = \App::get_channel();
|
||||||
|
|
||||||
$result = new_contact($uid,$url,$channel,true,$confirm);
|
$result = new_contact($uid,$url,$channel,$interactive,$confirm);
|
||||||
|
|
||||||
if($result['success'] == false) {
|
if($result['success'] == false) {
|
||||||
if($result['message'])
|
if($result['message'])
|
||||||
notice($result['message']);
|
notice($result['message']);
|
||||||
goaway($return_url);
|
if($interactive) {
|
||||||
|
goaway($return_url);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
json_return_and_die($result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
info( t('Channel added.') . EOL);
|
info( t('Channel added.') . EOL);
|
||||||
@ -53,7 +58,12 @@ class Follow extends \Zotlabs\Web\Controller {
|
|||||||
if(($can_view_stream) || ($result['abook']['xchan_network'] === 'rss'))
|
if(($can_view_stream) || ($result['abook']['xchan_network'] === 'rss'))
|
||||||
\Zotlabs\Daemon\Master::Summon(array('Onepoll',$result['abook']['abook_id']));
|
\Zotlabs\Daemon\Master::Summon(array('Onepoll',$result['abook']['abook_id']));
|
||||||
|
|
||||||
goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1');
|
if($interactive) {
|
||||||
|
goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
json_return_and_die([ 'success' => true ]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,8 @@ class Wfinger extends \Zotlabs\Web\Controller {
|
|||||||
$result['properties'] = [
|
$result['properties'] = [
|
||||||
'http://webfinger.net/ns/name' => $r[0]['channel_name'],
|
'http://webfinger.net/ns/name' => $r[0]['channel_name'],
|
||||||
'http://xmlns.com/foaf/0.1/name' => $r[0]['channel_name'],
|
'http://xmlns.com/foaf/0.1/name' => $r[0]['channel_name'],
|
||||||
'https://w3id.org/security/v1#publicKeyPem' => $r[0]['xchan_pubkey']
|
'https://w3id.org/security/v1#publicKeyPem' => $r[0]['xchan_pubkey'],
|
||||||
|
'http://purl.org/zot/federation' => 'zot'
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach($aliases as $alias)
|
foreach($aliases as $alias)
|
||||||
|
@ -39,7 +39,7 @@ class Newmember {
|
|||||||
|
|
||||||
t('Find and Connect with others'),
|
t('Find and Connect with others'),
|
||||||
[
|
[
|
||||||
'directory' => t('View the channel directory'),
|
'directory' => t('View the directory'),
|
||||||
'suggest' => t('View friend suggestions'),
|
'suggest' => t('View friend suggestions'),
|
||||||
'connections' => t('Manage your connections'),
|
'connections' => t('Manage your connections'),
|
||||||
],
|
],
|
||||||
@ -64,7 +64,7 @@ class Newmember {
|
|||||||
// hack to put this in the correct spot of the array
|
// hack to put this in the correct spot of the array
|
||||||
|
|
||||||
if($site_firehose || $net_firehose) {
|
if($site_firehose || $net_firehose) {
|
||||||
$options[5]['pubstream'] = t('View public stream. Warning: not moderated');
|
$options[5]['pubstream'] = t('View public stream');
|
||||||
}
|
}
|
||||||
|
|
||||||
$o = replace_macros(get_markup_template('new_member.tpl'), [
|
$o = replace_macros(get_markup_template('new_member.tpl'), [
|
||||||
|
3
boot.php
3
boot.php
@ -51,7 +51,8 @@ require_once('include/bbcode.php');
|
|||||||
|
|
||||||
define ( 'PLATFORM_NAME', 'hubzilla' );
|
define ( 'PLATFORM_NAME', 'hubzilla' );
|
||||||
define ( 'STD_VERSION', '3.3.2' );
|
define ( 'STD_VERSION', '3.3.2' );
|
||||||
define ( 'ZOT_REVISION', '1.3' );
|
define ( 'ZOT_REVISION', '6.0a' );
|
||||||
|
|
||||||
|
|
||||||
define ( 'DB_UPDATE_VERSION', 1207 );
|
define ( 'DB_UPDATE_VERSION', 1207 );
|
||||||
|
|
||||||
|
@ -1322,3 +1322,25 @@ function translate_type($type) {
|
|||||||
return [$type, t('Other') . ' (' . $type . ')'];
|
return [$type, t('Other') . ' (' . $type . ')'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function cal_store_lowlevel($arr) {
|
||||||
|
|
||||||
|
$store = [
|
||||||
|
'cal_aid' => ((array_key_exists('cal_aid',$arr)) ? $arr['cal_aid'] : 0),
|
||||||
|
'cal_uid' => ((array_key_exists('cal_uid',$arr)) ? $arr['cal_uid'] : 0),
|
||||||
|
'cal_hash' => ((array_key_exists('cal_hash',$arr)) ? $arr['cal_hash'] : ''),
|
||||||
|
'cal_name' => ((array_key_exists('cal_name',$arr)) ? $arr['cal_name'] : ''),
|
||||||
|
'uri' => ((array_key_exists('uri',$arr)) ? $arr['uri'] : ''),
|
||||||
|
'logname' => ((array_key_exists('logname',$arr)) ? $arr['logname'] : ''),
|
||||||
|
'pass' => ((array_key_exists('pass',$arr)) ? $arr['pass'] : ''),
|
||||||
|
'ctag' => ((array_key_exists('ctag',$arr)) ? $arr['ctag'] : ''),
|
||||||
|
'synctoken' => ((array_key_exists('synctoken',$arr)) ? $arr['synctoken'] : ''),
|
||||||
|
'cal_types' => ((array_key_exists('cal_types',$arr)) ? $arr['cal_types'] : ''),
|
||||||
|
];
|
||||||
|
|
||||||
|
return create_table_from_array('cal', $store);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,9 +88,18 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
|
|||||||
|
|
||||||
// Premium channel, set confirm before callback to avoid recursion
|
// Premium channel, set confirm before callback to avoid recursion
|
||||||
|
|
||||||
if(array_key_exists('connect_url',$j) && ($interactive) && (! $confirm))
|
if(array_key_exists('connect_url',$j) && (! $confirm)) {
|
||||||
goaway(zid($j['connect_url']));
|
if($interactive) {
|
||||||
|
goaway(zid($j['connect_url']));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$result['message'] = t('Premium channel - please visit:') . ' ' . zid($j['connect_url']);
|
||||||
|
logger('mod_follow: ' . $result['message']);
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// do we have an xchan and hubloc?
|
// do we have an xchan and hubloc?
|
||||||
// If not, create them.
|
// If not, create them.
|
||||||
|
Reference in New Issue
Block a user