X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fadmin.php;h=28a7a91e4be2eb14445147c5ca68355f4e07ab5d;hb=836058c47745f502890a209dfd6efcb3596ace84;hp=43834064760eb2529521a09535f6f6ac8cdf64c7;hpb=98bba66dcb335a86385967bc08ce30f5be0f4b75;p=friendica.git diff --git a/mod/admin.php b/mod/admin.php index 4383406476..28a7a91e4b 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -379,7 +379,9 @@ function admin_page_site_post(&$a){ $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 @@ -432,6 +434,7 @@ function admin_page_site_post(&$a){ 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", @@ -515,6 +518,9 @@ function admin_page_site_post(&$a){ 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 @@ -628,7 +634,7 @@ function admin_page_site(&$a) { '$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, ""), @@ -649,7 +655,7 @@ function admin_page_site(&$a) { '$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")), @@ -695,7 +701,10 @@ function admin_page_site(&$a) { '$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") )); @@ -792,7 +801,7 @@ function admin_page_users_post(&$a){ $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'); @@ -946,11 +955,8 @@ function admin_page_users(&$a){ 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'), @@ -963,10 +969,11 @@ function admin_page_users(&$a){ $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