aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-23 10:29:43 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-23 10:29:43 +0000
commitabf321f2fb25d1750c96a67807bcda84a63ba497 (patch)
treeb5adddfd4456b707a35b8c35acb3782ecfe5bce0 /views
parentba23d8e106d4652e229d1839ec2dd13cf4daaad9 (diff)
downloadelgg-abf321f2fb25d1750c96a67807bcda84a63ba497.tar.gz
elgg-abf321f2fb25d1750c96a67807bcda84a63ba497.tar.bz2
Added site default access permissions. Refs #744
git-svn-id: https://code.elgg.org/elgg/trunk@2885 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/input/access.php16
-rw-r--r--views/default/settings/system.php29
-rw-r--r--views/failsafe/settings/system.php22
3 files changed, 38 insertions, 29 deletions
diff --git a/views/default/input/access.php b/views/default/input/access.php
index db938111e..e08eca13a 100644
--- a/views/default/input/access.php
+++ b/views/default/input/access.php
@@ -15,15 +15,19 @@
* @uses $vars['js'] Any Javascript to enter into the input tag
* @uses $vars['internalname'] The name of the input field
*
- */
-
- if (isset($vars['class'])) $class = $vars['class'];
+ */
+
+ if (isset($vars['class'])) $class = $vars['class'];
if (!$class) $class = "input-access";
-
- if ((!isset($vars['options'])) || (!is_array($vars['options'])))
+
+ if (!array_key_exists('value', $vars) || $vars['value'] == ACCESS_DEFAULT)
+ $vars['value'] = get_default_access();
+
+
+ if ((!isset($vars['options'])) || (!is_array($vars['options'])))
{
$vars['options'] = array();
- $vars['options'] = get_write_access_array();
+ $vars['options'] = get_write_access_array();
}
if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
diff --git a/views/default/settings/system.php b/views/default/settings/system.php
index f8317d95c..317a1094e 100644
--- a/views/default/settings/system.php
+++ b/views/default/settings/system.php
@@ -35,26 +35,29 @@
$languages = get_installed_translations();
$form_body .= "<p>" . elgg_echo('installation:language') . elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $vars['config']->language, 'options_values' => $languages)) . "</p>";
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</p>";
-
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('admin:site:access:warning') . "<br />";
+ $form_body .= elgg_echo('installation:sitepermissions') . elgg_view('input/access', array('internalname' => 'default_access','value' => $vars['config']->default_access)) . "</p>";
-
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:disableapi') . "<br />";
- $on = elgg_echo('installation:disableapi:label');
- if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true))
- $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label'));
- $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on ));
- $form_body .= "</p>";
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</p>";
+
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
+
+
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:disableapi') . "<br />";
+ $on = elgg_echo('installation:disableapi:label');
+ if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true))
+ $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label'));
+ $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on ));
+ $form_body .= "</p>";
$form_body .= "<p class=\"admin_usage\">" . elgg_echo('installation:usage') . "<br />";
- $on = elgg_echo('installation:usage:label');
+ $on = elgg_echo('installation:usage:label');
if (isset($CONFIG->ping_home))
$on = ($vars['config']->ping_home!='disabled' ? elgg_echo('installation:usage:label') : "");
$form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:usage:label')), 'internalname' => 'usage', 'value' => $on ));
- $form_body .= "</p>";
-
+ $form_body .= "</p>";
+
$form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go'));
diff --git a/views/failsafe/settings/system.php b/views/failsafe/settings/system.php
index 18e43eac1..420dc45aa 100644
--- a/views/failsafe/settings/system.php
+++ b/views/failsafe/settings/system.php
@@ -36,16 +36,18 @@
$languages = get_installed_translations();
$form_body .= "<p>" . elgg_echo('installation:language') . elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $vars['config']->language, 'options_values' => $languages)) . "</p>";
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</p>";
-
+ $form_body .= "<p>" . elgg_echo('installation:sitepermissions') . elgg_view('input/access', array('internalname' => 'default_access','value' => ACCESS_LOGGED_IN)) . "</p>";
+
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</p>";
+
$form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
-
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:disableapi') . "<br />";
- $on = elgg_echo('installation:disableapi:label');
- if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true))
- $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label'));
- $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on ));
- $form_body .= "</p>";
+
+ $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:disableapi') . "<br />";
+ $on = elgg_echo('installation:disableapi:label');
+ if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true))
+ $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label'));
+ $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on ));
+ $form_body .= "</p>";
$form_body .= "<p class=\"admin_usage\">" . elgg_echo('installation:usage') . "<br />";
$on = elgg_echo('installation:usage:label');
@@ -53,7 +55,7 @@
if (isset($CONFIG->ping_home))
$on = ($vars['config']->ping_home!='disabled' ? elgg_echo('installation:usage:label') : "");
$form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:usage:label')), 'internalname' => 'usage', 'value' => $on ));
- $form_body .= "</p>";
+ $form_body .= "</p>";
$form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go'));