aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-12-11 20:09:18 +0000
committerpatdenice <patdenice@piwigo.org>2010-12-11 20:09:18 +0000
commit4ae512231a8817db2f0fbddafd3ed6195153d01c (patch)
tree3489ff6c9db61d29a811bac9f297321de795a056
parent2a741321ba0730e31614e364bdcecdb4e2f17c3a (diff)
feature 2048: add $conf['send_hosting_technical_details'] parameter
git-svn-id: http://piwigo.org/svn/trunk@8082 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php7
-rw-r--r--include/config_default.inc.php4
2 files changed, 8 insertions, 3 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 4106501fb..463cfeb0f 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -1704,6 +1704,8 @@ function cat_admin_access($category_id)
*/
function fetchRemote($src, &$dest, $get_data=array(), $post_data=array(), $user_agent='Piwigo', $step=0)
{
+ global $conf;
+
// Try to retrieve data from local file?
if (!url_is_remote($src))
{
@@ -1723,11 +1725,10 @@ function fetchRemote($src, &$dest, $get_data=array(), $post_data=array(), $user_
if ($step > 3) return false;
// Send anonymous data to piwigo server
- if ($_SERVER['HTTP_HOST'] != 'localhost' and $step==0
+ if ($conf['send_hosting_technical_details']
+ and $_SERVER['HTTP_HOST'] != 'localhost' and $step==0
and preg_match('#^http://(?:[a-z]+\.)?piwigo\.org#', $src))
{
- global $conf;
-
$post_data = array_merge($post_data, array(
'uuid' => hash_hmac('md5', get_absolute_root_url(), $conf['secret_key']),
'os' => urlencode(PHP_OS),
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index bb0293f72..7a334a5f4 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -488,6 +488,10 @@ $conf['template_combine_files'] = true;
// gives an empty value '' to deactivate
$conf['show_php_errors'] = E_ALL;
+// sends your hosting PHP and MySQL versions to piwigo.org as anonymously as
+// possible, for statistics purpose. No personnal data are transmitted
+$conf['send_hosting_technical_details'] = true;
+
// +-----------------------------------------------------------------------+
// | authentication |
// +-----------------------------------------------------------------------+