summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpengbo2018-01-19 04:49:38 +0000
committerpengbo2018-01-19 04:49:38 +0000
commit72399045b89dfe130f5b1c977d6a579966db2201 (patch)
tree1c1f59a3f8c77f6de413d75606f7d2d9bbf03870
parent324d13e783edb3d8ced0166a1fddd9aff2ec285f (diff)
Fix pgpool stop mode doesn't work correctly.
-rw-r--r--command.php1
-rw-r--r--status.php6
2 files changed, 3 insertions, 4 deletions
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 95ad302..b087da2 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);