]> git.mxchange.org Git - friendica.git/commitdiff
fixed parser error
authorRoland Haeder <roland@mxchange.org>
Fri, 24 Mar 2017 19:50:10 +0000 (20:50 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 24 Mar 2017 19:52:26 +0000 (20:52 +0100)
Signed-off-by: Roland Haeder <roland@mxchange.org>
boot.php

index 5df8c6c4d9037f1b6c726ef988eb5008055ef302..05e11728216fbfe37b58dc3b70efb64c614b5327 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -665,10 +665,10 @@ class App {
                        $this->scheme = 'https';
                }
 
-               if (x($_SERVER,'SERVER_NAME')) {
+               if (x($_SERVER, 'SERVER_NAME')) {
                        $this->hostname = $_SERVER['SERVER_NAME'];
 
-                       if (x($_SERVER,'SERVER_PORT') && $_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443)
+                       if (x($_SERVER, 'SERVER_PORT') && $_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
                                $this->hostname .= ':' . $_SERVER['SERVER_PORT'];
                        }
                        /*
@@ -676,6 +676,7 @@ class App {
                         * or in a sub-directory and adjust accordingly
                         */
 
+                       /// @TODO This kind of escaping breaks syntax-highlightning on CoolEdit (Midnight Commander)
                        $path = trim(dirname($_SERVER['SCRIPT_NAME']), '/\\');
                        if (isset($path) && strlen($path) && ($path != $this->path)) {
                                $this->path = $path;
@@ -686,11 +687,12 @@ class App {
                        $this->hostname = $hostname;
                }
 
-               if (is_array($_SERVER["argv"]) && $_SERVER["argc"]>1 && substr(end($_SERVER["argv"]), 0, 4)=="http" ) {
-                       $this->set_baseurl(array_pop($_SERVER["argv"]) );
+               if (is_array($_SERVER["argv"]) && $_SERVER["argc"] > 1 && substr(end($_SERVER["argv"]), 0, 4) == "http" ) {
+                       $this->set_baseurl(array_pop($_SERVER["argv"]));
                        $_SERVER["argc"] --;
                }
 
+               /// @TODO no longer needed?
                #set_include_path("include/$this->hostname" . PATH_SEPARATOR . get_include_path());
 
                if ((x($_SERVER,'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'],0,9) === "pagename=") {