UpdateDatabase.php
authoredward <edward@roojs.com>
Thu, 31 Aug 2017 09:57:43 +0000 (17:57 +0800)
committeredward <edward@roojs.com>
Thu, 31 Aug 2017 09:57:43 +0000 (17:57 +0800)
UpdateDatabase.php

index 6204184..c2f38b3 100644 (file)
@@ -1145,14 +1145,18 @@ class Pman_Core_UpdateDatabase extends Pman
             $url = $url . "?" . $request;  
         }
         
-        
         $ch = curl_init($url);
         
         if ($method == 'POST') {
+            
             curl_setopt($ch, CURLOPT_POST, 1);
             curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
+            
+        } else {
+            
             curl_setopt($ch, CURLOPT_HTTPHEADER,
                     array("Content-Type: application/x-www-form-urlencoded", "Content-Length: " . strlen($request)));
+            
         }
         
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);