Merge branch 'dev' of /home/macgirvin/zap.macgirvin.com into zap

This commit is contained in:
zotlabs 2018-09-16 21:43:06 -07:00
commit 8d565a8305
5 changed files with 33 additions and 12 deletions

View file

@ -1007,6 +1007,12 @@ class Activity {
if(! $name)
$name = t('Unknown');
$username = $person_obj['preferredUsername'];
$h = parse_url($url);
if($h && $h['host']) {
$username .= '@' . $h['host'];
}
if($person_obj['icon']) {
if(is_array($person_obj['icon'])) {
if(array_key_exists('url',$person_obj['icon']))
@ -1062,7 +1068,7 @@ class Activity {
'xchan_hash' => $url,
'xchan_guid' => $url,
'xchan_pubkey' => $pubkey,
'xchan_addr' => '',
'xchan_addr' => ((strpos($username,'@')) ? $username : ''),
'xchan_url' => $profile,
'xchan_name' => $name,
'xchan_name_date' => datetime_convert(),
@ -1115,7 +1121,7 @@ class Activity {
[
'hubloc_guid' => $url,
'hubloc_hash' => $url,
'hubloc_addr' => '',
'hubloc_addr' => ((strpos($username,'@')) ? $username : ''),
'hubloc_network' => 'activitypub',
'hubloc_url' => $baseurl,
'hubloc_host' => $hostname,

View file

@ -237,6 +237,7 @@ class ActivityStreams {
return ((array_key_exists($propname, $base)) ? $base[$propname] : null);
}
/**
* @brief Fetches a property from an URL.
*
@ -269,6 +270,12 @@ class ActivityStreams {
}
static function is_an_actor($s) {
return(in_array($s,[ 'Application','Group','Service','Person','Service' ]));
}
/**
* @brief
*

View file

@ -396,13 +396,13 @@ class Libsync {
}
$disallowed = [
'channel_id', 'channel_account_id', 'channel_primary', 'channel_prvkey',
'channel_address', 'channel_notifyflags', 'channel_removed', 'channel_deleted',
'channel_system', 'channel_r_stream', 'channel_r_profile', 'channel_r_abook',
'channel_r_storage', 'channel_r_pages', 'channel_w_stream', 'channel_w_wall',
'channel_w_comment', 'channel_w_mail', 'channel_w_like', 'channel_w_tagwall',
'channel_w_chat', 'channel_w_storage', 'channel_w_pages', 'channel_a_republish',
'channel_a_delegate'
'channel_id', 'channel_account_id', 'channel_primary', 'channel_prvkey',
'channel_address', 'channel_notifyflags', 'channel_removed', 'channel_deleted',
'channel_system', 'channel_r_stream', 'channel_r_profile', 'channel_r_abook',
'channel_r_storage', 'channel_r_pages', 'channel_w_stream', 'channel_w_wall',
'channel_w_comment', 'channel_w_mail', 'channel_w_like', 'channel_w_tagwall',
'channel_w_chat', 'channel_w_storage', 'channel_w_pages', 'channel_a_republish',
'channel_a_delegate', 'channel_moved'
];
$clean = array();

View file

@ -531,14 +531,21 @@ class Setup extends \Zotlabs\Web\Controller {
$ck_funcs[0]['status'] = false;
$ck_funcs[0]['help'] = t('Error: libCURL PHP module required but not installed.');
}
if(! function_exists('imagecreatefromjpeg')) {
if((! function_exists('imagecreatefromjpeg')) || (! class_exists('Imagick'))) {
$ck_funcs[1]['status'] = false;
$ck_funcs[1]['help'] = t('Error: GD graphics PHP module with JPEG support required but not installed.');
$ck_funcs[1]['help'] = t('Error: GD PHP module with JPEG support or ImageMagick graphics library required but not installed.');
}
if(! function_exists('openssl_public_encrypt')) {
$ck_funcs[2]['status'] = false;
$ck_funcs[2]['help'] = t('Error: openssl PHP module required but not installed.');
}
if(class_exists('PDO')) {
$x = PDO::getAvailableDrivers();
if((! in_array('mysql',$x)) && (! in_array('pgsql',$x))) {
$ck_funcs[3]['status'] = false;
$ck_funcs[3]['help'] = t('Error: PDO database PHP module missing a driver for either mysql or pgsql.');
}
}
if(! class_exists('PDO')) {
$ck_funcs[3]['status'] = false;
$ck_funcs[3]['help'] = t('Error: PDO database PHP module required but not installed.');

View file

@ -94,7 +94,8 @@ function import_channel($channel, $account_id, $seize, $newname = '') {
'channel_w_comment', 'channel_w_mail', 'channel_w_like', 'channel_w_tagwall',
'channel_w_chat', 'channel_w_storage', 'channel_w_pages', 'channel_a_republish',
'channel_a_delegate', 'perm_limits', 'channel_password', 'channel_salt',
'channel_moved'
'channel_moved', 'channel_primary', 'channel_removed', 'channel_deleted',
'channel_system'
];
$clean = array();