// Bad default ident options: normalize revision 14492

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14495 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2012-04-05 13:58:58 +00:00
parent dbc0704179
commit bcf1c9ace8
2 changed files with 54 additions and 54 deletions
@@ -760,28 +760,28 @@ class AdminPerformanceControllerCore extends AdminController
return parent::postProcess();
}
public function ajaxProcess()
{
if (Tools::isSubmit('action') && Tools::getValue('action') == 'test_server')
{
$host = pSQL(Tools::getValue('sHost', ''));
$port = (int)Tools::getValue('sPort', 0);
public function ajaxProcess()
{
if (Tools::isSubmit('action') && Tools::getValue('action') == 'test_server')
{
$host = pSQL(Tools::getValue('sHost', ''));
$port = (int)Tools::getValue('sPort', 0);
if ($host != '' && $port != 0)
{
$res = 0;
if ($host != '' && $port != 0)
{
$res = 0;
if (function_exists('memcache_get_server_status') &&
function_exists('memcache_connect') &&
@fsockopen($host, $port))
{
$memcache = @memcache_connect($host, $port);
$res = @memcache_get_server_status($memcache, $host, $port);
}
die(Tools::jsonEncode(array($res)));
}
}
die;
if (function_exists('memcache_get_server_status') &&
function_exists('memcache_connect') &&
@fsockopen($host, $port))
{
$memcache = @memcache_connect($host, $port);
$res = @memcache_get_server_status($memcache, $host, $port);
}
die(Tools::jsonEncode(array($res)));
}
}
die;
}
}