Fix some notice in setting pgpool.conf.
authorpengbo <pengbo@sraoss.co.jp>
Mon, 4 Sep 2017 09:14:03 +0000 (18:14 +0900)
committerpengbo <pengbo@sraoss.co.jp>
Mon, 4 Sep 2017 09:14:03 +0000 (18:14 +0900)
pgconfig.php
templates/pgconfig.tpl

index bc4233a8ce6c27bfb807a1c843800bec41bfdac6..1ce0ea204df0496af8cddb745c5592130dd563ff 100644 (file)
@@ -442,6 +442,9 @@ function writeConfigFile($configValue, $pgpoolConfigParamAll)
 
     $param_names = getMultiParams();
     foreach ($param_names as $group => $key_arr) {
+        if (! isset($configValue[$key_arr[0]])) {
+            continue;
+        }
         for ($i = 0; $i < count($configValue[$key_arr[0]]); $i++) {
             foreach ($key_arr as $key) {
                 $value = (isset($configValue[$key][$i])) ? $configValue[$key][$i] : NULL;
index 3a60b34b0dc1c8d0e65ea83cae5cbd021b4eca3d..5424da0a3c774990d19439d5f621f52fc729380b 100644 (file)
@@ -93,6 +93,8 @@
         {* --------------------------------------------------------------------- *}
 
         {custom_tr_pgconfig param='enable_pool_hba'}
+      </tbody>
+      <tbody id="tb_enable_pool_hba_on">
         {if paramExists('pool_passwd')}
             {custom_tr_pgconfig param='pool_passwd'}
         {/if}
             {custom_tr_pgconfig param='ssl'}
           </tbody>
 
-          <tbody id="tb_ssl_1">
+          <tbody id="tb_ssl_on">
             {custom_tr_pgconfig param='ssl_key'}
             {custom_tr_pgconfig param='ssl_cert'}
             {custom_tr_pgconfig param='ssl_ca_cert'}