From bddf4c6626a071a1299d08ad1b116b5fd9655d54 Mon Sep 17 00:00:00 2001 From: eldy Date: Wed, 5 Oct 2011 22:54:39 +0200 Subject: [PATCH] Qual: Removed ob* functions --- htdocs/adherents/class/adherent.class.php | 4 ---- htdocs/lib/functions2.lib.php | 12 ++++-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 8fe32acc931..f332c0c5500 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1560,11 +1560,9 @@ class Adherent extends CommonObject //curl_setopt($ch, CURLOPT_POST, 0); //curl_setopt($ch, CURLOPT_POSTFIELDS, "a=3&b=5"); //--- Start buffering - //ob_start(); $result=curl_exec($ch); dol_syslog($result); //--- End buffering and clean output - //ob_end_clean(); if (curl_error($ch) > 0) { // error @@ -1632,11 +1630,9 @@ class Adherent extends CommonObject //curl_setopt($ch, CURLOPT_POST, 0); //curl_setopt($ch, CURLOPT_POSTFIELDS, "a=3&b=5"); //--- Start buffering - //ob_start(); $result=curl_exec($ch); dol_syslog($result); //--- End buffering and clean output - //ob_end_clean(); $rescode=curl_error($ch); if ($rescode > 0) { diff --git a/htdocs/lib/functions2.lib.php b/htdocs/lib/functions2.lib.php index 971438d3beb..7dd7ed08c28 100644 --- a/htdocs/lib/functions2.lib.php +++ b/htdocs/lib/functions2.lib.php @@ -981,19 +981,15 @@ function dol_print_reduction($reduction=0,$langs) /** - * Return OS version + * Return OS version. + * Note that PHP_OS returns only OS (not version) and OS PHP was built on, not + * necessarly OS PHP runs on. * * @return string OS version */ function version_os() { - // Get version of OS - ob_start(); - phpinfo(); - $chaine = ob_get_contents(); - ob_end_clean(); - preg_match('/System <\/td>([^<]*)<\/td>/i',$chaine,$reg); - $osversion=$reg[1]; + $osversion=php_uname(); return $osversion; }