Completed
Branch develop (9f3f84)
by Peter
01:57
created
update.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -169,6 +169,9 @@
 block discarded – undo
169 169
         return;
170 170
     }
171 171
 	
172
+	/**
173
+	 * @param string $type
174
+	 */
172 175
 	protected function inwxSetNameserverInfo($type = null)
173 176
     {
174 177
         $object = "nameserver";
Please login to merge, or discard this patch.
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     protected function setIniFileDomain($apidomain = null)
51 51
     {
52 52
         preg_match("/(?!.{253})((?!-)[A-Za-z0-9-]{1,63}(?<!-)\.){1,126}+[A-Za-z]{2,6}/", $apidomain, $domainReturn);
53
-		$domainReturn[0] = str_replace('.', '-', $domainReturn[0]);
53
+        $domainReturn[0] = str_replace('.', '-', $domainReturn[0]);
54 54
 		
55 55
         $this->iniFileDomain = $domainReturn[0] . '.ini';
56 56
 
@@ -152,42 +152,42 @@  discard block
 block discarded – undo
152 152
             exit('something went wrong 6');
153 153
         }
154 154
         
155
-		foreach($result["resData"]["record"] as $value)
156
-		{
157
-			if($value['type'] == "A")
158
-			{
159
-				$this->IP4['id'] = $value['id'];
160
-				$this->IP4['oldip'] = $value['content'];
161
-			}
162
-			if($value['type'] == "AAAA")
163
-			{
164
-				$this->IP6['id'] = $value['id'];
165
-				$this->IP6['oldip'] = $value['content'];
166
-			}
167
-		}
155
+        foreach($result["resData"]["record"] as $value)
156
+        {
157
+            if($value['type'] == "A")
158
+            {
159
+                $this->IP4['id'] = $value['id'];
160
+                $this->IP4['oldip'] = $value['content'];
161
+            }
162
+            if($value['type'] == "AAAA")
163
+            {
164
+                $this->IP6['id'] = $value['id'];
165
+                $this->IP6['oldip'] = $value['content'];
166
+            }
167
+        }
168 168
 		
169 169
         return;
170 170
     }
171 171
 	
172
-	protected function inwxSetNameserverInfo($type = null)
172
+    protected function inwxSetNameserverInfo($type = null)
173 173
     {
174 174
         $object = "nameserver";
175 175
         $methode = "updateRecord";
176 176
             
177 177
         $params = array();
178 178
 		
179
-		if($type == 'ipv4')
180
-		{
181
-			$params['id'] = $this->IP4['id'];
182
-			$params['content'] = $this->IP4['newip'];
183
-		}
184
-		elseif($type == 'ipv6')
185
-		{
186
-			$params['id'] = $this->IP6['id'];
187
-			$params['content'] = $this->IP6['newip'];
188
-		}
189
-		else
190
-			exit('something went wrong 9');	
179
+        if($type == 'ipv4')
180
+        {
181
+            $params['id'] = $this->IP4['id'];
182
+            $params['content'] = $this->IP4['newip'];
183
+        }
184
+        elseif($type == 'ipv6')
185
+        {
186
+            $params['id'] = $this->IP6['id'];
187
+            $params['content'] = $this->IP6['newip'];
188
+        }
189
+        else
190
+            exit('something went wrong 9');	
191 191
             
192 192
         $result = $this->domrobot->call($object, $methode, $params);
193 193
             
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
             exit('something went wrong 10');
201 201
         }
202 202
 		
203
-	if(OUTPUT)
204
-	    echo('good');
203
+    if(OUTPUT)
204
+        echo('good');
205 205
         		
206 206
         return;
207 207
     }
@@ -212,17 +212,17 @@  discard block
 block discarded – undo
212 212
         
213 213
         $this->inwxGetNameserverInfo();
214 214
 		
215
-		if(filter_var($ipv4, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4))
216
-		{
217
-			$this->IP4['newip'] = $ipv4;
218
-			$this->inwxSetNameserverInfo('ipv4');
219
-		}
215
+        if(filter_var($ipv4, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4))
216
+        {
217
+            $this->IP4['newip'] = $ipv4;
218
+            $this->inwxSetNameserverInfo('ipv4');
219
+        }
220 220
             
221
-		if(filter_var($ipv6, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
222
-		{
223
-			$this->IP6['newip'] = $ipv6;
224
-			$this->inwxSetNameserverInfo('ipv6');
225
-		}
221
+        if(filter_var($ipv6, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
222
+        {
223
+            $this->IP6['newip'] = $ipv6;
224
+            $this->inwxSetNameserverInfo('ipv6');
225
+        }
226 226
 		
227 227
         $this->inwxLogout();
228 228
         
Please login to merge, or discard this patch.