Merge pull request #881 from cvogeley/master

Add allowed and not allowed emails to the UI in the
This commit is contained in:
RedMatrix 2015-01-30 18:14:10 +11:00
commit b381579959
2 changed files with 5 additions and 1 deletions

View File

@ -250,6 +250,7 @@ function admin_page_site_post(&$a){
$allowed_sites = ((x($_POST,'allowed_sites')) ? notags(trim($_POST['allowed_sites'])) : ''); $allowed_sites = ((x($_POST,'allowed_sites')) ? notags(trim($_POST['allowed_sites'])) : '');
$allowed_email = ((x($_POST,'allowed_email')) ? notags(trim($_POST['allowed_email'])) : ''); $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'])) : '');
$block_public = ((x($_POST,'block_public')) ? True : False); $block_public = ((x($_POST,'block_public')) ? True : False);
$force_publish = ((x($_POST,'publish_all')) ? True : False); $force_publish = ((x($_POST,'publish_all')) ? True : False);
$disable_discover_tab = ((x($_POST,'disable_discover_tab')) ? True : False); $disable_discover_tab = ((x($_POST,'disable_discover_tab')) ? True : False);
@ -308,6 +309,7 @@ function admin_page_site_post(&$a){
set_config('system','register_text', $register_text); set_config('system','register_text', $register_text);
set_config('system','allowed_sites', $allowed_sites); set_config('system','allowed_sites', $allowed_sites);
set_config('system','allowed_email', $allowed_email); set_config('system','allowed_email', $allowed_email);
set_config('system','not_allowed_email', $not_allowed_email);
set_config('system','block_public', $block_public); set_config('system','block_public', $block_public);
set_config('system','publish_all', $force_publish); set_config('system','publish_all', $force_publish);
set_config('system','disable_discover_tab', $disable_discover_tab); set_config('system','disable_discover_tab', $disable_discover_tab);
@ -435,6 +437,7 @@ function admin_page_site(&$a) {
'$abandon_days' => array('abandon_days', t('Accounts abandoned after x days'), get_config('system','account_abandon_days'), t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')), '$abandon_days' => array('abandon_days', t('Accounts abandoned after x days'), get_config('system','account_abandon_days'), t('Will not waste system resources polling external sites for abandonded accounts. Enter 0 for no time limit.')),
'$allowed_sites' => array('allowed_sites', t("Allowed friend domains"), get_config('system','allowed_sites'), t("Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains")), '$allowed_sites' => array('allowed_sites', t("Allowed friend domains"), get_config('system','allowed_sites'), t("Comma separated list of domains which are allowed to establish friendships with this site. Wildcards are accepted. Empty to allow any domains")),
'$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")), '$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")),
'$not_allowed_email' => array('not_allowed_email', t("Not allowed email domains"), get_config('system','not_allowed_email'), t("Comma separated list of domains which are not allowed in email addresses for registrations to this site. Wildcards are accepted. Empty to allow any domains, unless allowed domains have been defined.")),
'$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 logged in.")), '$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 logged in.")),
'$verify_email' => array('verify_email', t("Verify Email Addresses"), get_config('system','verify_email'), t("Check to verify email addresses used in account registration (recommended).")), '$verify_email' => array('verify_email', t("Verify Email Addresses"), get_config('system','verify_email'), t("Check to verify email addresses used in account registration (recommended).")),
'$force_publish' => array('publish_all', t("Force publish"), get_config('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")), '$force_publish' => array('publish_all', t("Force publish"), get_config('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")),

View File

@ -55,7 +55,8 @@
{{include file="field_input.tpl" field=$register_text}} {{include file="field_input.tpl" field=$register_text}}
{{include file="field_select.tpl" field=$register_policy}} {{include file="field_select.tpl" field=$register_policy}}
{{include file="field_select.tpl" field=$access_policy}} {{include file="field_select.tpl" field=$access_policy}}
{{include file="field_textarea.tpl" field=$allowed_email}}
{{include file="field_textarea.tpl" field=$not_allowed_email}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
<h3>{{$upload}}</h3> <h3>{{$upload}}</h3>