Fix to update strings parameteres for backends
authorNozomi Anzai <anzai@sraoss.co.jp>
Wed, 26 Mar 2014 01:41:05 +0000 (10:41 +0900)
committerNozomi Anzai <anzai@sraoss.co.jp>
Wed, 26 Mar 2014 01:41:05 +0000 (10:41 +0900)
Previously the way to use the function checkString() was wrong, and
updating backend_hostnamex, backend_data_directoryx, backend_flagx failed.

pgconfig.php

index ac2a2502b6408bfe3e90d77ca17126d92913e232..4d9397168c8aae013d1fb5d518107e7b9eae8ef4 100644 (file)
@@ -19,7 +19,7 @@
  * is" without express or implied warranty.
  *
  * @author     Ryuma Ando <ando@ecomas.co.jp>
- * @copyright  2003-2013 PgPool Global Development Group
+ * @copyright  2003-2014 PgPool Global Development Group
  * @version    CVS: $Id$
  */
 
@@ -746,7 +746,7 @@ function doCheck()
 
             // backend_hostname
             $result = checkString($configValue['backend_hostname'][$i],
-                                  $pgpoolConfigBackendParam['backend_hostname']['regexp']);
+                                  $pgpoolConfigBackendParam['backend_hostname']);
             if (!$result) {
                 $error['backend_hostname'][$i] = TRUE;
             }
@@ -769,7 +769,7 @@ function doCheck()
 
             // backend_data_directory
             $result = checkString($configValue['backend_data_directory'][$i],
-                                  $pgpoolConfigBackendParam['backend_data_directory']['regexp']);
+                                  $pgpoolConfigBackendParam['backend_data_directory']);
             if (!$result) {
                 $error['backend_data_directory'][$i] = TRUE;
             }
@@ -777,7 +777,7 @@ function doCheck()
             // backend_flag
             if (paramExists('backend_flag')) {
                 $result = checkString($configValue['backend_flag'][$i],
-                                      $pgpoolConfigBackendParam['backend_flag']['regexp']);
+                                      $pgpoolConfigBackendParam['backend_flag']);
                 if (!$result) {
                     $error['backend_flag'][$i] = TRUE;
                 }
@@ -799,7 +799,7 @@ function doCheck()
 
             // heartbeat_destination
             $result = checkString($configValue['heartbeat_destination'][$i],
-                                  $pgpoolConfigHbDestinationParam['heartbeat_destination']['regexp']);
+                                  $pgpoolConfigHbDestinationParam['heartbeat_destination']);
             if (!$result) {
                 $error['heartbeat_destination'][$i] = TRUE;
             }
@@ -814,7 +814,7 @@ function doCheck()
 
             // heartbeat_device
             $result = checkString($configValue['heartbeat_device'][$i],
-                                  $pgpoolConfigHbDestinationParam['heartbeat_device']['regexp']);
+                                  $pgpoolConfigHbDestinationParam['heartbeat_device']);
             if (!$result) {
                 $error['heartbeat_device'][$i] = TRUE;
             }
@@ -835,7 +835,7 @@ function doCheck()
 
             // other_pgpool_hostname
             $result = checkString($configValue['other_pgpool_hostname'][$i],
-                                  $pgpoolConfigWdOtherParam['other_pgpool_hostname']['regexp']);
+                                  $pgpoolConfigWdOtherParam['other_pgpool_hostname']);
             if (!$result) {
                 $error['other_pgpool_hostname'][$i] = TRUE;
             }