]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/init-cmd.php
small typos and wording in the API docs
[nominatim.git] / lib / init-cmd.php
index 274256a642e96bd58339dec1f50de75d9ae1e636..50c709c9ad16d1c89dfc359a1f083abfb3623dfa 100644 (file)
@@ -1,26 +1,28 @@
 <?php
-       require_once('init.php');
-       require_once('cmd.php');
 
-       // handle http proxy when using file_get_contents
-       if (CONST_HTTP_Proxy) {
-         $proxy = 'tcp://' . CONST_HTTP_Proxy_Host . ':' . CONST_HTTP_Proxy_Port;
-         $aHeaders = array();
-         if(CONST_HTTP_Proxy_Login != null && CONST_HTTP_Proxy_Login != '' && CONST_HTTP_Proxy_Password != null && CONST_HTTP_Proxy_Password != '') {
-           $auth = base64_encode(CONST_HTTP_Proxy_Login . ':' . CONST_HTTP_Proxy_Password);
-           $aHeaders = array("Proxy-Authorization: Basic $auth");
-         }
-         $aContext = array(
-           'http' => array(
-             'proxy' => $proxy,
-             'request_fulluri' => true,
-             'header' => $aHeaders
-           ),
-           'https' => array(
-             'proxy' => $proxy,
-             'request_fulluri' => true,
-             'header' => $aHeaders
-           )
-         );
-         stream_context_set_default($aContext);
-       }
+require_once('init.php');
+require_once('cmd.php');
+require_once('DebugNone.php');
+
+// handle http proxy when using file_get_contents
+if (CONST_HTTP_Proxy) {
+    $proxy = 'tcp://' . CONST_HTTP_Proxy_Host . ':' . CONST_HTTP_Proxy_Port;
+    $aHeaders = array();
+    if (CONST_HTTP_Proxy_Login != null && CONST_HTTP_Proxy_Login != '' && CONST_HTTP_Proxy_Password != null && CONST_HTTP_Proxy_Password != '') {
+        $auth = base64_encode(CONST_HTTP_Proxy_Login . ':' . CONST_HTTP_Proxy_Password);
+        $aHeaders = array("Proxy-Authorization: Basic $auth");
+    }
+    $aContext = array(
+                 'http' => array(
+                            'proxy' => $proxy,
+                            'request_fulluri' => true,
+                            'header' => $aHeaders
+                           ),
+                 'https' => array(
+                             'proxy' => $proxy,
+                             'request_fulluri' => true,
+                             'header' => $aHeaders
+                            )
+                );
+    stream_context_set_default($aContext);
+}