From 2db4d050fc182e3962aeb82a976388f3c71484cf Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Mon, 08 Jul 2013 11:33:17 -0400
Subject: [PATCH] - added suffix "_num" to loop counter variables - fixed permission of vars starting with _

---
 interface/web/sites/database_edit.php |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php
index 833b18d..8dc3ab3 100644
--- a/interface/web/sites/database_edit.php
+++ b/interface/web/sites/database_edit.php
@@ -264,6 +264,10 @@
 						if(preg_match('/(^|,)' . preg_quote($server_config['ip_address'], '/') . '(,|$)/', $this->dataRecord['remote_ips']) == false) {
 							$this->dataRecord['remote_ips'] .= ',' . $server_config['ip_address'];
 						}
+                        $tmp = preg_split('/\s*,\s*/', $this->dataRecord['remote_ips']);
+                        $tmp = array_unique($tmp);
+                        $this->dataRecord['remote_ips'] = implode(',', $tmp);
+                        unset($tmp);
 					}
 				}
             }
@@ -328,6 +332,10 @@
 						if(preg_match('/(^|,)' . preg_quote($server_config['ip_address'], '/') . '(,|$)/', $this->dataRecord['remote_ips']) == false) {
 							$this->dataRecord['remote_ips'] .= ',' . $server_config['ip_address'];
 						}
+                        $tmp = preg_split('/\s*,\s*/', $this->dataRecord['remote_ips']);
+                        $tmp = array_unique($tmp);
+                        $this->dataRecord['remote_ips'] = implode(',', $tmp);
+                        unset($tmp);
 					}
 				}
             }

--
Gitblit v1.9.1