]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3817 cleans up advanced settings form
authorCash Costello <cash.costello@gmail.com>
Sun, 15 Jul 2012 01:32:35 +0000 (21:32 -0400)
committerCash Costello <cash.costello@gmail.com>
Sun, 15 Jul 2012 01:32:35 +0000 (21:32 -0400)
actions/admin/site/update_advanced.php
views/default/forms/admin/site/update_advanced.php

index 897a2f98359343b189f591e275be28605234dd62..0fd8d1f35e4dd68524946252194351f0ef309067 100644 (file)
@@ -53,8 +53,6 @@ if ($site = elgg_get_site_entity()) {
        $user_default_access = (get_input('allow_user_default_access')) ? 1 : 0;
        set_config('allow_user_default_access', $user_default_access, $site->getGUID());
 
-       set_config('view', get_input('view'), $site->getGUID());
-
        $debug = get_input('debug');
        if ($debug) {
                set_config('debug', $debug, $site->getGUID());
index b935090f08b3d85ecefb3c3789c335b7c50592e4..14b74e4f914c15f74c42908df2f64b98bf28a3ee 100644 (file)
@@ -30,21 +30,21 @@ $form_body .= elgg_view('input/access', array(
 )) . "</div>";
 $form_body .= "<div>" . elgg_echo('installation:allow_user_default_access:description') . "<br />";
 $form_body .= elgg_view("input/checkboxes", array(
-       'options' => array(elgg_echo('installation:allow_user_default_access:label') => elgg_echo('installation:allow_user_default_access:label')),
+       'options' => array(elgg_echo('installation:allow_user_default_access:label') => 1),
        'name' => 'allow_user_default_access',
-       'value' => (elgg_get_config('allow_user_default_access') ? elgg_echo('installation:allow_user_default_access:label') : ""),
+       'value' => (elgg_get_config('allow_user_default_access') ? 1 : 0),
 )) . "</div>";
 $form_body .= "<div>" . elgg_echo('installation:simplecache:description') . "<br />";
 $form_body .= elgg_view("input/checkboxes", array(
-       'options' => array(elgg_echo('installation:simplecache:label') => elgg_echo('installation:simplecache:label')),
+       'options' => array(elgg_echo('installation:simplecache:label') => 1),
        'name' => 'simplecache_enabled',
-       'value' => (elgg_get_config('simplecache_enabled') ? elgg_echo('installation:simplecache:label') : ""),
+       'value' => (elgg_get_config('simplecache_enabled') ? 1 : 0),
 )) . "</div>";
 $form_body .= "<div>" . elgg_echo('installation:systemcache:description') . "<br />";
 $form_body .= elgg_view("input/checkboxes", array(
-       'options' => array(elgg_echo('installation:systemcache:label') => elgg_echo('installation:systemcache:label')),
+       'options' => array(elgg_echo('installation:systemcache:label') => 1),
        'name' => 'system_cache_enabled',
-       'value' => (elgg_get_config('system_cache_enabled') ? elgg_echo('installation:systemcache:label') : ""),
+       'value' => (elgg_get_config('system_cache_enabled') ? 1 : 0),
 )) . "</div>";
 
 $debug_options = array('0' => elgg_echo('installation:debug:none'), 'ERROR' => elgg_echo('installation:debug:error'), 'WARNING' => elgg_echo('installation:debug:warning'), 'NOTICE' => elgg_echo('installation:debug:notice'));
@@ -58,9 +58,9 @@ $form_body .= '</div>';
 
 // control new user registration
 $options = array(
-       'options' => array(elgg_echo('installation:registration:label') => elgg_echo('installation:registration:label')),
+       'options' => array(elgg_echo('installation:registration:label') => 1),
        'name' => 'allow_registration',
-       'value' => elgg_get_config('allow_registration') ? elgg_echo('installation:registration:label') : '',
+       'value' => elgg_get_config('allow_registration') ? 1 : 0,
 );
 $form_body .= '<div>' . elgg_echo('installation:registration:description');
 $form_body .= '<br />' .elgg_view('input/checkboxes', $options) . '</div>';
@@ -68,28 +68,25 @@ $form_body .= '<br />' .elgg_view('input/checkboxes', $options) . '</div>';
 // control walled garden
 $walled_garden = elgg_get_config(walled_garden);
 $options = array(
-       'options' => array(elgg_echo('installation:walled_garden:label') => elgg_echo('installation:walled_garden:label')),
+       'options' => array(elgg_echo('installation:walled_garden:label') => 1),
        'name' => 'walled_garden',
-       'value' => $walled_garden ? elgg_echo('installation:walled_garden:label') : '',
+       'value' => $walled_garden ? 1 : 0,
 );
 $form_body .= '<div>' . elgg_echo('installation:walled_garden:description');
 $form_body .= '<br />' . elgg_view('input/checkboxes', $options) . '</div>';
 
 $form_body .= "<div>" . elgg_echo('installation:httpslogin') . "<br />";
 $form_body .= elgg_view("input/checkboxes", array(
-       'options' => array(elgg_echo('installation:httpslogin:label') => elgg_echo('installation:httpslogin:label')),
+       'options' => array(elgg_echo('installation:httpslogin:label') => 1),
        'name' => 'https_login',
-       'value' => (elgg_get_config('https_login') ? elgg_echo('installation:httpslogin:label') : "")
+       'value' => (elgg_get_config('https_login') ? 1 : 0)
 )) . "</div>";
 
 $form_body .= "<div>" . elgg_echo('installation:disableapi') . "<br />";
-$on = elgg_echo('installation:disableapi:label');
 $disable_api = elgg_get_config('disable_api');
-if ($disable_api) {
-       $on = (disable_api ?  "" : elgg_echo('installation:disableapi:label'));
-}
+$on = $disable_api ?  0 : 1;
 $form_body .= elgg_view("input/checkboxes", array(
-       'options' => array(elgg_echo('installation:disableapi:label') => elgg_echo('installation:disableapi:label')),
+       'options' => array(elgg_echo('installation:disableapi:label') => 1),
        'name' => 'api',
        'value' => $on,
 ));