diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-09-29 12:03:13 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-09-29 12:03:13 +0000 |
commit | eaddae88046f037405757679a1c24461ec0d8dbe (patch) | |
tree | 20b5ec9871554c29b3c56edf6ed1bbeb02d324e9 | |
parent | e9515d1ee18074928ae1e013dd0ff8666ecbd475 (diff) | |
download | elgg-eaddae88046f037405757679a1c24461ec0d8dbe.tar.gz elgg-eaddae88046f037405757679a1c24461ec0d8dbe.tar.bz2 |
Closes #383 & #384
git-svn-id: https://code.elgg.org/elgg/trunk@2144 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | actions/admin/site/update_basic.php | 9 | ||||
-rw-r--r-- | actions/systemsettings/install.php | 12 | ||||
-rw-r--r-- | languages/en.php | 7 | ||||
-rw-r--r-- | views/default/settings/system.php | 17 | ||||
-rw-r--r-- | views/failsafe/settings/system.php | 13 |
5 files changed, 47 insertions, 11 deletions
diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php index 78944e49c..5710e63b9 100644 --- a/actions/admin/site/update_basic.php +++ b/actions/admin/site/update_basic.php @@ -28,7 +28,8 @@ throw new InstallationException(elgg_echo('InvalidParameterException:NonElggSite')); $site->description = get_input('sitedescription');
- $site->name = get_input('sitename');
+ $site->name = get_input('sitename'); + $site->email = get_input('siteemail');
$site->url = get_input('wwwroot');
datalist_set('path',sanitise_filepath(get_input('path')));
@@ -49,6 +50,12 @@ unset_config('ping_home', $site->getGUID()); else set_config('ping_home', 'disabled', $site->getGUID()); + + $api = get_input('api'); + if ($api) + unset_config('disable_api', $site->getGUID()); + else + set_config('disable_api', 'disabled', $site->getGUID()); // Now ping home //if ((!isset($usage)) || ($usage!='disabled')) diff --git a/actions/systemsettings/install.php b/actions/systemsettings/install.php index 59d784df6..a7a15b29d 100644 --- a/actions/systemsettings/install.php +++ b/actions/systemsettings/install.php @@ -41,7 +41,8 @@ $site = new ElggSite();
$site->name = get_input('sitename');
$site->url = get_input('wwwroot'); - $site->description = get_input('sitedescription');
+ $site->description = get_input('sitedescription'); + $site->email = get_input('siteemail');
$site->access_id = 2; // The site is public
$guid = $site->save();
@@ -70,7 +71,14 @@ if ($usage) unset_config('ping_home', $site->getGUID()); else - set_config('ping_home', 'disabled', $site->getGUID());
+ set_config('ping_home', 'disabled', $site->getGUID()); + + $api = get_input('api'); + if ($api) + unset_config('disable_api', $site->getGUID()); + else + set_config('disable_api', 'disabled', $site->getGUID()); +
// activate some plugins by default enable_plugin('profile', $site->getGUID()); diff --git a/languages/en.php b/languages/en.php index 8efed72a4..7ad046fef 100644 --- a/languages/en.php +++ b/languages/en.php @@ -657,7 +657,12 @@ Alternatively, you can enter your database settings below and we will try and do 'installation:usage' => "This option lets Elgg send anonymous usage statistics back to Curverider.", 'installation:usage:label' => "Send anonymous usage statistics", 'installation:view' => "Enter the view which will be used as the default for your site or leave this blank for the default view (if in doubt, leave as default):", -
+ + 'installation:siteemail' => "Site email address (used when sending system emails)", + + 'installation:disableapi' => "Elgg comes with an flexible and extendible API that enables applications use certain Elgg features remotely", + 'installation:disableapi:label' => "Enable the RESTful API", +
'upgrade:db' => 'Your database was upgraded.',
/** diff --git a/views/default/settings/system.php b/views/default/settings/system.php index 24f76be6c..2ddd8ac7b 100644 --- a/views/default/settings/system.php +++ b/views/default/settings/system.php @@ -22,7 +22,7 @@ }
$form_body = "";
- foreach(array('sitename','sitedescription', 'wwwroot','path','dataroot', 'view') as $field) {
+ foreach(array('sitename','sitedescription', 'siteemail', 'wwwroot','path','dataroot', 'view') as $field) {
$form_body .= "<p>";
$form_body .= elgg_echo('installation:' . $field) . "<br />";
$warning = elgg_echo('installation:warning:' . $field);
@@ -36,14 +36,23 @@ $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: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 6e7c68999..475ffc870 100644 --- a/views/failsafe/settings/system.php +++ b/views/failsafe/settings/system.php @@ -22,7 +22,7 @@ }
$form_body = "";
- foreach(array('sitename','sitedescription', 'wwwroot','path','dataroot', 'view') as $field) {
+ foreach(array('sitename','sitedescription', 'siteemail', 'wwwroot','path','dataroot', 'view') as $field) {
$form_body .= "<p>";
$form_body .= elgg_echo('installation:' . $field) . "<br />";
$warning = elgg_echo('installation:warning:' . $field);
@@ -37,14 +37,21 @@ $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: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');
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 .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:usage:label')), 'internalname' => 'usage', 'value' => $on ));
+ $form_body .= "</p>"; $form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go'));
|