Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
This commit is contained in:
@@ -16,7 +16,13 @@ class Security {
|
||||
|
||||
$block_public = ((x($_POST,'block_public')) ? True : False);
|
||||
set_config('system','block_public',$block_public);
|
||||
|
||||
|
||||
$cloud_noroot = ((x($_POST,'cloud_noroot')) ? 1 : 0);
|
||||
set_config('system','cloud_disable_siteroot',1 - $cloud_noroot);
|
||||
|
||||
$cloud_disksize = ((x($_POST,'cloud_disksize')) ? 1 : 0);
|
||||
set_config('system','cloud_report_disksize',$cloud_disksize);
|
||||
|
||||
$ws = $this->trim_array_elems(explode("\n",$_POST['whitelisted_sites']));
|
||||
set_config('system','whitelisted_sites',$ws);
|
||||
|
||||
@@ -87,6 +93,8 @@ 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.")),
|
||||
'$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')), '' ],
|
||||
'$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")),
|
||||
|
||||
@@ -344,8 +344,8 @@ class Channel extends \Zotlabs\Web\Controller {
|
||||
'$uid' => ((\App::$profile['profile_uid']) ? \App::$profile['profile_uid'] : '0'),
|
||||
'$gid' => '0',
|
||||
'$cid' => '0',
|
||||
'$cmin' => '0',
|
||||
'$cmax' => '0',
|
||||
'$cmin' => '(-1)',
|
||||
'$cmax' => '(-1)',
|
||||
'$star' => '0',
|
||||
'$liked' => '0',
|
||||
'$conv' => '0',
|
||||
|
||||
@@ -35,11 +35,20 @@ class Cloud extends \Zotlabs\Web\Controller {
|
||||
if (argc() > 1)
|
||||
$which = argv(1);
|
||||
|
||||
|
||||
if (argc() < 2 && intval(get_config('system','cloud_disable_siteroot'))) {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
construct_page();
|
||||
killme();
|
||||
}
|
||||
|
||||
$profile = 0;
|
||||
|
||||
if ($which)
|
||||
profile_load( $which, $profile);
|
||||
|
||||
|
||||
|
||||
$auth = new \Zotlabs\Storage\BasicAuth();
|
||||
|
||||
$ob_hash = get_observer_hash();
|
||||
|
||||
@@ -213,8 +213,8 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
'$uid' => '0',
|
||||
'$gid' => '0',
|
||||
'$cid' => '0',
|
||||
'$cmin' => '0',
|
||||
'$cmax' => '99',
|
||||
'$cmin' => '(-1)',
|
||||
'$cmax' => '(-1)',
|
||||
'$star' => '0',
|
||||
'$liked' => '0',
|
||||
'$conv' => '0',
|
||||
|
||||
@@ -9,7 +9,7 @@ require_once('include/conversation.php');
|
||||
class Home extends \Zotlabs\Web\Controller {
|
||||
|
||||
function init() {
|
||||
|
||||
|
||||
$ret = array();
|
||||
|
||||
call_hooks('home_init',$ret);
|
||||
|
||||
@@ -113,7 +113,7 @@ class Invite extends \Zotlabs\Web\Controller {
|
||||
$invite_code = autoname(8) . rand(1000,9999);
|
||||
$nmessage = str_replace('$invite_code',$invite_code,$message);
|
||||
|
||||
$r = q("INSERT INTO register (hash,created) VALUES ('%s', '%s') ",
|
||||
$r = q("INSERT INTO register (hash,created,uid,password,lang) VALUES ('%s', '%s',0,'','') ",
|
||||
dbesc($invite_code),
|
||||
dbesc(datetime_convert())
|
||||
);
|
||||
|
||||
@@ -123,8 +123,8 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
$def_acl = array('allow_gid' => '<' . $r[0]['hash'] . '>');
|
||||
}
|
||||
|
||||
$default_cmin = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmin',0) : 0);
|
||||
$default_cmax = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmax',99) : 99);
|
||||
$default_cmin = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmin',0) : (-1));
|
||||
$default_cmax = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmax',99) : (-1));
|
||||
|
||||
$cid = ((x($_GET,'cid')) ? intval($_GET['cid']) : 0);
|
||||
$star = ((x($_GET,'star')) ? intval($_GET['star']) : 0);
|
||||
@@ -140,6 +140,7 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
|
||||
$deftag = '';
|
||||
|
||||
|
||||
if(x($_GET,'search') || $file || (!$pf && $cid))
|
||||
$nouveau = true;
|
||||
|
||||
@@ -334,8 +335,8 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
'$uid' => ((local_channel()) ? local_channel() : '0'),
|
||||
'$gid' => (($gid) ? $gid : '0'),
|
||||
'$cid' => (($cid) ? $cid : '0'),
|
||||
'$cmin' => (($cmin) ? $cmin : '0'),
|
||||
'$cmax' => (($cmax) ? $cmax : '0'),
|
||||
'$cmin' => (($cmin) ? $cmin : '(-1)'),
|
||||
'$cmax' => (($cmax) ? $cmax : '(-1)'),
|
||||
'$star' => (($star) ? $star : '0'),
|
||||
'$liked' => (($liked) ? $liked : '0'),
|
||||
'$conv' => (($conv) ? $conv : '0'),
|
||||
@@ -420,8 +421,9 @@ class Network extends \Zotlabs\Web\Controller {
|
||||
$pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(\App::$pager['itemspage']), intval(\App::$pager['start']));
|
||||
}
|
||||
|
||||
|
||||
if(($cmin != 0) || ($cmax != 99)) {
|
||||
// cmin and cmax are both -1 when the affinity tool is disabled
|
||||
|
||||
if(($cmin != (-1)) || ($cmax != (-1))) {
|
||||
|
||||
// Not everybody who shows up in the network stream will be in your address book.
|
||||
// By default those that aren't are assumed to have closeness = 99; but this isn't
|
||||
|
||||
@@ -118,8 +118,8 @@ class Pubstream extends \Zotlabs\Web\Controller {
|
||||
'$uid' => ((local_channel()) ? local_channel() : '0'),
|
||||
'$gid' => '0',
|
||||
'$cid' => '0',
|
||||
'$cmin' => '0',
|
||||
'$cmax' => '99',
|
||||
'$cmin' => '(-1)',
|
||||
'$cmax' => '(-1)',
|
||||
'$star' => '0',
|
||||
'$liked' => '0',
|
||||
'$conv' => '0',
|
||||
|
||||
@@ -121,8 +121,8 @@ class Search extends \Zotlabs\Web\Controller {
|
||||
'$uid' => ((\App::$profile['profile_uid']) ? \App::$profile['profile_uid'] : '0'),
|
||||
'$gid' => '0',
|
||||
'$cid' => '0',
|
||||
'$cmin' => '0',
|
||||
'$cmax' => '0',
|
||||
'$cmin' => '(-1)',
|
||||
'$cmax' => '(-1)',
|
||||
'$star' => '0',
|
||||
'$liked' => '0',
|
||||
'$conv' => '0',
|
||||
|
||||
Reference in New Issue
Block a user