Merge branch 'dev' of /home/macgirvin/osada into dev

This commit is contained in:
zotlabs 2019-02-11 15:52:22 -08:00
commit 5ddf47a294
9 changed files with 28 additions and 18 deletions

View file

@ -1112,7 +1112,17 @@ class Libzot {
}
$arr = Activity::decode_note($AS);
logger($AS->debug());
logger($AS->debug(), LOGGER_DATA);
}
// There is nothing inherently wrong with getting a message-id which isn't a canonical URI/URL, but
// at the present time (2019/02) during the Hubzilla transition to zot6 it is likely to cause lots of duplicates for
// messages arriving from different protocols and sources with different message-id semantics. This
// restriction can be relaxed once most Hubzilla sites are upgraded to > 4.0.
if($arr && (strpos($arr['mid'],'http') === false)) {
logger('activity rejected: legacy message-id');
return;
}
@ -1174,10 +1184,6 @@ class Libzot {
if(in_array($env['type'],['activity','response'])) {
$arr = Activity::decode_note($AS);
logger($AS->debug());
$r = q("select hubloc_hash, hubloc_url from hubloc where hubloc_id_url = '%s'",
dbesc($AS->actor['id'])
);
@ -1552,14 +1558,14 @@ class Libzot {
// Comments of all these activities are allowed and will only be rejected (later) if the parent
// doesn't exist.
if ($perm === 'send_stream') {
if (get_pconfig($channel['channel_id'],'system','hyperdrive',true) || $arr['verb'] === 'Announce') {
$allowed = true;
}
}
else {
// if ($perm === 'send_stream') {
// if (get_pconfig($channel['channel_id'],'system','hyperdrive',true) || $arr['verb'] === 'Announce') {
// $allowed = true;
// }
// }
// else {
$allowed = true;
}
// }
$friendofriend = true;
}

View file

@ -17,6 +17,9 @@ class Security {
$block_public = ((x($_POST,'block_public')) ? True : False);
set_config('system','block_public',$block_public);
$block_public_search = ((x($_POST,'block_public_search')) ? 1 : 0);
set_config('system','block_public_search',$block_public_search);
$localdir_hide = ((x($_POST,'localdir_hide')) ? 1 : 0);
set_config('system','localdir_hide',$localdir_hide);
@ -120,6 +123,7 @@ class Security {
'$page' => t('Security'),
'$form_security_token' => get_form_security_token('admin_security'),
'$block_public' => array('block_public', t("Block public"), get_config('system','block_public'), t("Check to block public access to all otherwise public personal pages on this site unless you are currently authenticated.")),
'$block_public_search' => array('block_public_search', t("Block public search"), get_config('system','block_public_search'), t("Prevent access to search content unless you are currently authenticated.")),
'$localdir_hide' => [ 'localdir_hide', t('Hide local directory'), intval(get_config('system','localdir_hide')), t('Only use the global directory') ],
'$cloud_noroot' => [ 'cloud_noroot', t('Provide a cloud root directory'), 1 - intval(get_config('system','cloud_disable_siteroot')), t('The cloud root directory lists all channel names which provide public files') ],
'$cloud_disksize' => [ 'cloud_disksize', t('Show total disk space available to cloud uploads'), intval(get_config('system','cloud_report_disksize')), '' ],

View file

@ -143,7 +143,7 @@ class Channel {
$cntunkmail = ((x($_POST,'cntunkmail')) ? intval($_POST['cntunkmail']) : 0);
$suggestme = ((x($_POST,'suggestme')) ? intval($_POST['suggestme']) : 0);
$anymention = ((x($_POST,'anymention')) ? intval($_POST['anymention']) : 0);
$hyperdrive = ((x($_POST,'hyperdrive')) ? intval($_POST['hyperdrive']) : 0);
// $hyperdrive = ((x($_POST,'hyperdrive')) ? intval($_POST['hyperdrive']) : 0);
$public_uploads = ((isset($_POST['public_uploads'])) ? intval($_POST['public_uploads']) : 0);
@ -261,7 +261,7 @@ class Channel {
set_pconfig(local_channel(),'system','email_notify_host',$mailhost);
set_pconfig(local_channel(),'system','profile_assign',$profile_assign);
set_pconfig(local_channel(),'system','anymention',$anymention);
set_pconfig(local_channel(),'system','hyperdrive',$hyperdrive);
// set_pconfig(local_channel(),'system','hyperdrive',$hyperdrive);
set_pconfig(local_channel(),'system','force_public_uploads',$public_uploads);
set_pconfig(local_channel(),'system','autoperms',$autoperms);
@ -501,7 +501,7 @@ class Channel {
$anymention = '<input type="hidden" name="anymention" value="' . intval(get_pconfig(local_channel(),'system','anymention')) . '" />';
}
$hyperdrive = [ 'hyperdrive', t('Enable hyperdrive'), ((get_pconfig(local_channel(),'system','hyperdrive',true)) ? 1 : 0), t('Dramatically increases the content available in your stream.'), $yes_no ];
// $hyperdrive = [ 'hyperdrive', t('Enable hyperdrive'), ((get_pconfig(local_channel(),'system','hyperdrive',true)) ? 1 : 0), t('Dramatically increases the content available in your stream.'), $yes_no ];
$permissions_set = (($permissions_role != 'custom') ? true : false);
@ -583,7 +583,7 @@ class Channel {
'$autoperms' => $autoperms,
'$anymention' => $anymention,
'$hyperdrive' => $hyperdrive,
// '$hyperdrive' => $hyperdrive,
'$h_not' => t('Notification Settings'),
'$activity_options' => t('By default post a status message when:'),

0
include/items.php Executable file → Normal file
View file

0
include/oembed.php Executable file → Normal file
View file

0
include/plugin.php Executable file → Normal file
View file

View file

@ -7,6 +7,7 @@
{{include file="field_checkbox.tpl" field=$block_public}}
{{include file="field_checkbox.tpl" field=$block_public_search}}
{{include file="field_checkbox.tpl" field=$localdir_hide}}
{{include file="field_checkbox.tpl" field=$cloud_noroot}}
{{include file="field_checkbox.tpl" field=$cloud_disksize}}

View file

@ -215,7 +215,7 @@ var activeCommentText = '';
$('#like-rotator-' + id).show();
$.get('{{$baseurl}}/share/' + id, function(data) {
$('#like-rotator-' + id).hide();
notificationsUpdate();
updateInit();
});
}

View file

@ -189,7 +189,6 @@
</div>
{{/if}}
{{include file="field_checkbox.tpl" field=$cal_first_day}}
{{include file="field_checkbox.tpl" field=$hyperdrive}}
{{if $misc_addon}}
{{$misc_addon}}
{{/if}}