diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-25 12:28:10 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-25 12:28:10 +0000 |
commit | 6c040e6a9a63e2f9a2f4107ffbb6ab468226f8bc (patch) | |
tree | 875373ed7b8eccb5b96763114685d8cab5becdb3 | |
parent | 4899d1a5b4d74f393a3944915782e3c2faefb7e7 (diff) | |
download | elgg-6c040e6a9a63e2f9a2f4107ffbb6ab468226f8bc.tar.gz elgg-6c040e6a9a63e2f9a2f4107ffbb6ab468226f8bc.tar.bz2 |
Ping now configurable.
git-svn-id: https://code.elgg.org/elgg/trunk@1532 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | actions/admin/site/update_basic.php | 7 | ||||
-rw-r--r-- | actions/systemsettings/install.php | 8 | ||||
-rw-r--r-- | engine/lib/ping.php | 2 | ||||
-rw-r--r-- | languages/en.php | 2 | ||||
-rw-r--r-- | views/default/settings/system.php | 8 |
5 files changed, 21 insertions, 6 deletions
diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php index d86ec9981..10e693d94 100644 --- a/actions/admin/site/update_basic.php +++ b/actions/admin/site/update_basic.php @@ -42,7 +42,12 @@ set_config('debug', 1, $site->getGUID()); else unset_config('debug', $site->getGUID()); -
+ + $usage = get_input('usage'); + if ($usage) + unset_config('ping_home', $site->getGUID()); + else + set_config('ping_home', 'disabled', $site->getGUID()); if ($site->save()) system_message(elgg_echo("admin:configuration:success")); diff --git a/actions/systemsettings/install.php b/actions/systemsettings/install.php index f6832843e..dd60c847c 100644 --- a/actions/systemsettings/install.php +++ b/actions/systemsettings/install.php @@ -41,7 +41,13 @@ if ($debug) set_config('debug', 1, $site->getGUID()); else - unset_config('debug', $site->getGUID());
+ unset_config('debug', $site->getGUID()); + + $usage = get_input('usage'); + if ($usage) + unset_config('ping_home', $site->getGUID()); + else + set_config('ping_home', 'disabled', $site->getGUID());
// activate profile by default enable_plugin('profile', $site->getGUID()); diff --git a/engine/lib/ping.php b/engine/lib/ping.php index a5cedb6fc..ba709ea4e 100644 --- a/engine/lib/ping.php +++ b/engine/lib/ping.php @@ -48,7 +48,7 @@ { global $CONFIG; - if ($CONFIG->ping_home) + if ((!isset($CONFIG->ping_home)) || ($CONFIG->ping_home!='disabled')) { // Now run this stuff, but only once run_function_once("ping_run_once"); diff --git a/languages/en.php b/languages/en.php index b5d1737b4..ec897ba96 100644 --- a/languages/en.php +++ b/languages/en.php @@ -485,7 +485,7 @@ Alternatively, you can enter your database settings below and we will try and do 'language' => "The default language for your site:",
'debug' => "Debug mode provides extra information which can be used to diagnose faults, however it can slow your system down so should only be used if you are having problems:",
'debug:label' => "Turn on debug mode", - 'usage' => "This option lets Elgg send anonymous usage statistics back to Curverider", + 'usage' => "This option lets Elgg send anonymous usage statistics back to Curverider.", 'usage:label' => "Send anonymous usage statistics",
'view' => "Enter the view which will be used as the default for your site (e.g. 'mobile') or leave this blank for the default view:",
diff --git a/views/default/settings/system.php b/views/default/settings/system.php index 27b610fb7..13e730029 100644 --- a/views/default/settings/system.php +++ b/views/default/settings/system.php @@ -60,8 +60,12 @@ <p>
<?php echo elgg_echo('usage'); ?><br />
- <?php
- echo elgg_view("input/checkboxes", array('options' => array(elgg_echo('usage:label')), 'internalname' => 'usage', 'value' => ($vars['config']->site_ping ? elgg_echo('usage') : "") ));
+ <?php + $on = elgg_echo('usage:label'); + + if (isset($CONFIG->ping_home)) + $on = ($vars['config']->ping_home!='disabled' ? elgg_echo('usage:label') : "");
+ echo elgg_view("input/checkboxes", array('options' => array(elgg_echo('usage:label')), 'internalname' => 'usage', 'value' => $on ));
?>
</p>
|