diff --git a/command.php b/command.php index dde45fb..a913c0f 100644 --- a/command.php +++ b/command.php @@ -132,7 +132,6 @@ function execPcp($command, $extra_args = array()) break; case 'PCP_STOP_PGPOOL': - $args .= " {$_POST['stop_mode']}"; $cmd = _PGPOOL2_PCP_DIR . '/pcp_stop_pgpool' . $args; $ret = exec($cmd, $output, $return_var); break; diff --git a/status.php b/status.php index 2d8fb38..2f7b6f9 100644 --- a/status.php +++ b/status.php @@ -59,7 +59,7 @@ $tpl->assign('useSyslog', useSyslog()); $tpl->assign('pipe', (isPipe(_PGPOOL2_LOG_FILE)) ? 1 : 0); $tpl->assign('msgStopPgpool', $message['msgStopPgpool']); $tpl->assign('login_user', $_SESSION[SESSION_LOGIN_USER]); -$tpl->assign('is_superuser', (isset($_SESSION[SESSION_IS_SUPER_USER])) ? +$tpl->assign('is_superuser', (isset($_SESSION[SESSION_IS_SUPER_USER])) ? $_SESSION[SESSION_IS_SUPER_USER] : isSuperUser($_SESSION[SESSION_LOGIN_USER])); // Set params @@ -324,7 +324,7 @@ function _stopPgpool() $m = $_POST['stop_mode']; - $result = execPcp('PCP_STOP_PGPOOL', $m); + $result = execPcp('PCP_STOP_PGPOOL', array('m' => $m)); if (!array_key_exists('SUCCESS', $result)) { $errorCode = 'e1006'; $tpl->assign('errorCode', $errorCode); @@ -354,7 +354,7 @@ function _restartPgpool() // Stop pgpool $m = $_POST['stop_mode']; - $result = execPcp('PCP_STOP_PGPOOL', $m); + $result = execPcp('PCP_STOP_PGPOOL', array('m' => $m)); if (!array_key_exists('SUCCESS', $result)) { $errorCode = 'e1006'; $tpl->assign('errorCode', $errorCode);