From 41c4a947b26381be5de4628e0a54d5863e93c2fc Mon Sep 17 00:00:00 2001 From: patdenice Date: Tue, 7 Dec 2010 12:37:37 +0000 Subject: Feature 2048: Send data to piwigo server anonymously (like php and mysql versions) git-svn-id: http://piwigo.org/svn/trunk@8020 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'admin/include') diff --git a/admin/include/functions.php b/admin/include/functions.php index bf9cfa711..cfdd22f0d 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -1719,6 +1719,23 @@ function fetchRemote($src, &$dest, $user_agent='Piwigo', $step=0) } } + // Send anonymous data to piwigo server + if ($_SERVER['HTTP_HOST'] != 'localhost' and $step==0 + and preg_match('#^http://(?:[a-z]+\.)?piwigo\.org#', $src)) + { + global $conf; + + $src = add_url_params($src, array( + 'uuid' => hash_hmac('md5', get_absolute_root_url(), $conf['secret_key']), + 'os' => urlencode(PHP_OS), + 'phpversion' => urlencode(phpversion()), + 'dbengine' => urlencode(DB_ENGINE), + 'dbversion' => urlencode(pwg_get_db_version()), + ) + ); + $src = str_replace('&', '&', $src); + } + // After 3 redirections, return false if ($step > 3) return false; -- cgit v1.2.3