|
|
|
@ -127,6 +127,10 @@ function check_system_version() |
|
|
|
|
|
|
|
|
|
// The number of sessions |
|
|
|
|
$number_of_sessions = Statistics::countSessions(); |
|
|
|
|
$packager = api_get_configuration_value('packager'); |
|
|
|
|
if (empty($packager)) { |
|
|
|
|
$packager = 'chamilo'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$data = array( |
|
|
|
|
'url' => api_get_path(WEB_PATH), |
|
|
|
@ -144,6 +148,11 @@ function check_system_version() |
|
|
|
|
'language' => api_get_setting('platformLanguage'), //helps us know the spread of language usage for campuses, by main language |
|
|
|
|
'adminname' => api_get_setting('administratorName').' '.api_get_setting('administratorSurname'), //not sure this is necessary... |
|
|
|
|
'ip' => $_SERVER['REMOTE_ADDR'], //the admin's IP address, with the only purpose of trying to geolocate portals around the globe to draw a map |
|
|
|
|
// Reference to the packager system or provider through which |
|
|
|
|
// Chamilo is installed/downloaded. Packagers can change this in |
|
|
|
|
// the default config file (main/install/configuration.dist.php) |
|
|
|
|
// or in the installed config file. The default value is 'chamilo' |
|
|
|
|
'packager' => $packager, |
|
|
|
|
); |
|
|
|
|
$version = null; |
|
|
|
|
// version.php has been updated to include the version in an HTTP header |
|
|
|
@ -182,14 +191,13 @@ function check_system_version() |
|
|
|
|
/** |
|
|
|
|
* Function to make an HTTP request through fsockopen (specialised for GET) |
|
|
|
|
* Derived from Jeremy Saintot: http://www.php.net/manual/en/function.fsockopen.php#101872 |
|
|
|
|
* @param string IP or hostname |
|
|
|
|
* @param int Target port |
|
|
|
|
* @param string URI (defaults to '/') |
|
|
|
|
* @param array GET data |
|
|
|
|
* @param float Timeout |
|
|
|
|
* @param bool Include HTTP Request headers? |
|
|
|
|
* @param bool Include HTTP Response headers? |
|
|
|
|
* @param string $ip |
|
|
|
|
* @param string $ip IP or hostname |
|
|
|
|
* @param int $port Target port |
|
|
|
|
* @param string $uri URI (defaults to '/') |
|
|
|
|
* @param array $getdata GET data |
|
|
|
|
* @param int $timeout Timeout |
|
|
|
|
* @param bool $req_hdr Include HTTP Request headers? |
|
|
|
|
* @param bool $res_hdr Include HTTP Response headers? |
|
|
|
|
* @return string |
|
|
|
|
*/ |
|
|
|
|
function _http_request($ip, $port = 80, $uri = '/', $getdata = array(), $timeout = 5, $req_hdr = false, $res_hdr = false) |
|
|
|
|