Ignore:
Timestamp:
Dec 11, 2010, 10:20:12 PM (13 years ago)
Author:
patdenice
Message:

feature 2048: send technical details only to get_version_list.php of PEM API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r8082 r8084  
    17051705function fetchRemote($src, &$dest, $get_data=array(), $post_data=array(), $user_agent='Piwigo', $step=0)
    17061706{
    1707   global $conf;
    1708 
    17091707  // Try to retrieve data from local file?
    17101708  if (!url_is_remote($src))
     
    17241722  // After 3 redirections, return false
    17251723  if ($step > 3) return false;
    1726 
    1727   // Send anonymous data to piwigo server
    1728   if ($conf['send_hosting_technical_details']
    1729     and $_SERVER['HTTP_HOST'] != 'localhost' and $step==0
    1730     and preg_match('#^http://(?:[a-z]+\.)?piwigo\.org#', $src))
    1731   {
    1732     $post_data = array_merge($post_data, array(
    1733       'uuid' => hash_hmac('md5', get_absolute_root_url(), $conf['secret_key']),
    1734       'os' => urlencode(PHP_OS),
    1735       'pwgversion' => urlencode(PHPWG_VERSION),
    1736       'phpversion' => urlencode(phpversion()),
    1737       'dbengine' => urlencode(DB_ENGINE),
    1738       'dbversion' => urlencode(pwg_get_db_version()),
    1739       )
    1740     );
    1741   }
    17421724
    17431725  // Initialization
     
    20632045  return $tag_ids;
    20642046}
     2047
     2048function get_hosting_technical_details()
     2049{
     2050  global $conf;
     2051
     2052  $details = array();
     2053  if ($conf['send_hosting_technical_details'] and $_SERVER['HTTP_HOST'] != 'localhost')
     2054  {
     2055    $details = array(
     2056      'uuid' => hash_hmac('md5', get_absolute_root_url(), $conf['secret_key']),
     2057      'os' => urlencode(PHP_OS),
     2058      'pwgversion' => urlencode(PHPWG_VERSION),
     2059      'phpversion' => urlencode(phpversion()),
     2060      'dbengine' => urlencode(DB_ENGINE),
     2061      'dbversion' => urlencode(pwg_get_db_version()),
     2062    );
     2063  }
     2064
     2065  return $details;
     2066}
    20652067?>
Note: See TracChangeset for help on using the changeset viewer.