Merge branch 'hotfix-2.3.142'

pull/712/head v2.3.142
Iglocska 2015-10-14 15:08:58 +02:00
commit 3a7b2dd120
2 changed files with 5 additions and 2 deletions

View File

@ -1 +1 @@
{"major":2, "minor":3, "hotfix":141}
{"major":2, "minor":3, "hotfix":142}

View File

@ -1654,7 +1654,10 @@ class Server extends AppModel {
$this->ResqueStatus = new ResqueStatus\ResqueStatus(Resque::redis());
$workers = $this->ResqueStatus->getWorkers();
$this->Log = ClassRegistry::init('Log');
$currentUser = get_current_user();
if (function_exists('posix_getpwuid')) {
$currentUser = posix_getpwuid(posix_geteuid());
$currentUser = $currentUser['name'];
} else $currentUser = trim(shell_exec('whoami'));
foreach ($workers as $pid => $worker) {
if (!is_numeric($pid)) throw new MethodNotAllowedException('Non numeric PID found!');
$pidTest = substr_count(trim(shell_exec('ps -p ' . $pid)), PHP_EOL) > 0 ? true : false;