$proxy_disabled = ((x($_POST,'proxy_disabled')) ? True : False);
$old_pager = ((x($_POST,'old_pager')) ? True : False);
$only_tag_search = ((x($_POST,'only_tag_search')) ? True : False);
-
+ $rino = ((x($_POST,'rino')) ? intval($_POST['rino']) : 0);
+
+
if($ssl_policy != intval(get_config('system','ssl_policy'))) {
if($ssl_policy == SSL_POLICY_FULL) {
q("update `contact` set
set_config('system','suppress_tags',$suppress_tags);
set_config('system','shortcut_icon',$shortcut_icon);
set_config('system','touch_icon',$touch_icon);
+
if ($banner==""){
// don't know why, but del_config doesn't work...
q("DELETE FROM `config` WHERE `cat` = '%s' AND `k` = '%s' LIMIT 1",
set_config('system','old_pager', $old_pager);
set_config('system','only_tag_search', $only_tag_search);
+ set_config('system','rino_encrypt', $rino);
+
+
info( t('Site settings updated.') . EOL);
goaway($a->get_baseurl(true) . '/admin/site' );
return; // NOTREACHED
'$relocate'=> t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
'$baseurl' => $a->get_baseurl(true),
// name, label, value, help string, extra data...
- '$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), 'UTF-8'),
+ '$sitename' => array('sitename', t("Site name"), $a->config['sitename'],'UTF-8'),
'$hostname' => array('hostname', t("Host name"), $a->config['hostname'], ""),
'$sender_email' => array('sender_email', t("Sender Email"), $a->config['sender_email'], "The email address your server shall use to send notification emails from.", "", "", "email"),
'$banner' => array('banner', t("Banner/Logo"), $banner, ""),
'$register_policy' => array('register_policy', t("Register policy"), $a->config['register_policy'], "", $register_choices),
'$daily_registrations' => array('max_daily_registrations', t("Maximum Daily Registrations"), get_config('system', 'max_daily_registrations'), t("If registration is permitted above, this sets the maximum number of new user registrations to accept per day. If register is set to closed, this setting has no effect.")),
- '$register_text' => array('register_text', t("Register text"), htmlentities($a->config['register_text'], ENT_QUOTES, 'UTF-8'), t("Will be displayed prominently on the registration page.")),
+ '$register_text' => array('register_text', t("Register text"), $a->config['register_text'], t("Will be displayed prominently on the registration page.")),
'$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_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")),
'$only_tag_search' => array('only_tag_search', t("Only search in tags"), get_config('system','only_tag_search'), t("On large systems the text search can slow down the system extremely.")),
'$relocate_url' => array('relocate_url', t("New base url"), $a->get_baseurl(), "Change base url for this server. Sends relocate message to all DFRN contacts of all users."),
- '$form_security_token' => get_form_security_token("admin_site")
+
+ '$rino' => array('rino', t("RINO Encryption"), intval(get_config('system','rino_encrypt')), t("Encryption layer between nodes."), array("Disabled", "RINO1 (deprecated)", "RINO2")),
+
+ '$form_security_token' => get_form_security_token("admin_site")
));
$nu_nickname = ( x($_POST, 'new_user_nickname') ? $_POST['new_user_nickname'] : '');
$nu_email = ( x($_POST, 'new_user_email') ? $_POST['new_user_email'] : '');
- check_form_security_token_redirectOnErr('/admin/users', 'admin_users');
+ check_form_security_token_redirectOnErr($a->get_baseurl().'/admin/users', 'admin_users');
if (!($nu_name==="") && !($nu_email==="") && !($nu_nickname==="")) {
require_once('include/user.php');
intval($a->pager['itemspage'])
);
- function _setup_users($e){
- $a = get_app();
-
- $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
-
+ $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email']));
+ $_setup_users = function ($e) use ($adminlist){
$accounts = Array(
t('Normal Account'),
t('Soapbox Account'),
$e['lastitem_date'] = relative_date($e['lastitem_date']);
//$e['is_admin'] = ($e['email'] === $a->config['admin_email']);
$e['is_admin'] = in_array($e['email'], $adminlist);
+ $e['is_deletable'] = (intval($e['uid']) != local_user());
$e['deleted'] = ($e['account_removed']?relative_date($e['account_expires_on']):False);
return $e;
- }
- $users = array_map("_setup_users", $users);
+ };
+ $users = array_map($_setup_users, $users);
// Get rid of dashes in key names, Smarty3 can't handle them