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

This commit is contained in:
nobody 2021-10-31 13:11:30 -07:00
commit 301884f2b9
6 changed files with 1401 additions and 1423 deletions

View file

@ -9,11 +9,14 @@ class Security {
check_form_security_token_redirectOnErr('/admin/security', 'admin_security');
$allowed_email = ((x($_POST,'allowed_email')) ? notags(trim($_POST['allowed_email'])) : '');
$not_allowed_email = ((x($_POST,'not_allowed_email')) ? notags(trim($_POST['not_allowed_email'])) : '');
set_config('system','allowed_email', $allowed_email);
$not_allowed_email = ((x($_POST,'not_allowed_email')) ? notags(trim($_POST['not_allowed_email'])) : '');
set_config('system','not_allowed_email', $not_allowed_email);
$anonymous_comments = ((x($_POST,'anonymous_comments')) ? intval($_POST['anonymous_comments']) : 0);
set_config('system','anonymous_comments', $anonymous_comments);
$block_public = ((x($_POST,'block_public')) ? True : False);
set_config('system','block_public',$block_public);
@ -140,7 +143,7 @@ class Security {
'$thumbnail_security' => [ 'thumbnail_security', t("Allow SVG thumbnails in file browser"), get_config('system','thumbnail_security',0), t("WARNING: SVG images may contain malicious code.") ],
'$inline_pdf' => [ 'inline_pdf', t("Allow embedded (inline) PDF files"), get_config('system','inline_pdf',0), '' ],
'$anonymous_comments' => [ 'anonymous_comments', t('Permit anonymous comments'), intval(get_config('system','anonymous_comments')), t('Moderation will be performed by channels that select this comment option.') ],
'$transport_security' => array('transport_security', t('Set "Transport Security" HTTP header'),intval(get_config('system','transport_security_header')),''),
'$content_security' => array('content_security', t('Set "Content Security Policy" HTTP header'),intval(get_config('system','content_security_policy')),''),
'$allowed_email' => array('allowed_email', t("Allowed email domains"), get_config('system','allowed_email'), t("Comma separated list of domains which are allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains")),

View file

@ -392,17 +392,13 @@ class Channel {
$permiss = [];
$perm_opts = [
array( t('Nobody except yourself'), 0),
array( t('Only those you specifically allow'), PERMS_SPECIFIC),
array( t('Approved connections'), PERMS_CONTACTS),
array( t('Any connections'), PERMS_PENDING),
array( t('Anybody on this website'), PERMS_SITE),
array( t('Anybody authenticated'), PERMS_AUTHED),
array( t('Anybody on the internet'), PERMS_PUBLIC)
[ t('Restricted - from connections only'), PERMS_SPECIFIC ],
[ t('Semi-public - from anybody that can be identified'), PERMS_AUTHED ],
[ t('Public - from anybody on the internet'), PERMS_PUBLIC ]
];
$limits = PermissionLimits::Get(local_channel());
$anon_comments = get_config('system','anonymous_comments',true);
$anon_comments = get_config('system','anonymous_comments');
foreach($global_perms as $k => $perm) {
$options = [];
@ -413,10 +409,10 @@ class Channel {
$options[$opt[1]] = $opt[0];
}
if($k === 'post_comments') {
$comment_perms = [ $k, $perm, $limits[$k],t('Specifically allowed includes approved connections, but allows you to revoke this permission from specific connections if desired'),$options ];
$comment_perms = [ $k, $perm, $limits[$k],'',$options ];
}
elseif ($k === 'post_mail') {
$mail_perms = [ $k, $perm, $limits[$k],t('Specifically allowed includes approved connections, but allows you to revoke this permission from specific connections if desired'),$options ];
$mail_perms = [ $k, $perm, $limits[$k],'',$options ];
}
else {
$permiss[] = array($k,$perm,$limits[$k],'',$options);

View file

@ -17,7 +17,7 @@ use Zotlabs\Daemon\Run;
* @brief This file defines some global constants and includes the central App class.
*/
define ( 'STD_VERSION', '21.10.27' );
define ( 'STD_VERSION', '21.11.01' );
define ( 'ZOT_REVISION', '11.0' );
define ( 'DB_UPDATE_VERSION', 1253 );

View file

@ -1330,17 +1330,13 @@ function z_status_editor($x, $popup = false) {
$permiss = [];
$perm_opts = [
array( t('Nobody except yourself'), 0),
array( t('Only those you specifically allow'), PERMS_SPECIFIC),
array( t('Approved connections'), PERMS_CONTACTS),
array( t('Any connections'), PERMS_PENDING),
array( t('Anybody on this website'), PERMS_SITE),
array( t('Anybody authenticated'), PERMS_AUTHED),
array( t('Anybody on the internet'), PERMS_PUBLIC)
[ t('Restricted - from connections only'), PERMS_SPECIFIC ],
[ t('Semi-public - from anybody that can be identified'), PERMS_AUTHED ],
[ t('Public - from anybody on the internet'), PERMS_PUBLIC ]
];
$limits = PermissionLimits::Get(local_channel());
$anon_comments = get_config('system','anonymous_comments',true);
$anon_comments = get_config('system','anonymous_comments');
foreach($global_perms as $k => $perm) {
$options = [];
@ -1408,7 +1404,6 @@ function z_status_editor($x, $popup = false) {
'$embedPhotosModalCancel' => t('Cancel'),
'$embedPhotosModalOK' => t('OK'),
'$setloc' => $setloc,
'$voting' => t('Toggle voting'),
'$poll' => t('Toggle poll'),
'$poll_option_label' => t('Option'),
'$poll_add_option_label' => t('Add option'),
@ -1424,7 +1419,7 @@ function z_status_editor($x, $popup = false) {
'$feature_comment_control' => $feature_comment_control,
'$commctrl' => t('Comment Control'),
'$comments_closed' => ((isset($x['item']) && isset($x['item']['comments_closed']) && $x['item']['comments_closed']) ? $x['item']['comments_closed'] : ''),
'$commclosedate' => t('Disable comments after (date)'),
'$commclosedate' => t('Optional: disable comments after (date)'),
'$comment_perms' => $comment_perms,
'$defcommpolicy' => $defcommpolicy,
'$defcommuntil' => $defcommuntil,

File diff suppressed because it is too large Load diff

View file

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