commit 15ae1d1e80209ab0917c916b88fa3fd53b768010
parent 719ab372de94c6fe68a1c20f78ede7bb7be21b9d
Author: markseu <mark2011@mayberg.se>
Date: Sat, 11 Mar 2017 12:34:23 +0100
System update (built-in server support)
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/system/plugins/core.php b/system/plugins/core.php
@@ -345,6 +345,7 @@ class YellowCore
$this->config->set("serverScheme", $scheme);
$this->config->set("serverAddress", $address);
$this->config->set("serverBase", $base);
+ if(defined("DEBUG") && DEBUG>=3) echo "YellowCore::getRequestInformation $scheme://$address$base<br/>\n";
}
$location = substru($this->toolbox->getLocation(), strlenu($base));
if(empty($fileName)) $fileName = $this->lookup->findFileFromSystem($location);
@@ -2667,7 +2668,7 @@ class YellowToolbox
function getBase()
{
$base = "";
- if(preg_match("/^(.*)\//", $_SERVER["SCRIPT_NAME"], $matches)) $base = rtrim($matches[1], '/');
+ if(preg_match("/^(.*)\/.*\.php$/", $_SERVER["SCRIPT_NAME"], $matches)) $base = $matches[1];
return $base;
}
@@ -2781,7 +2782,7 @@ class YellowToolbox
// Check if script location is requested
function isRequestSelf()
{
- return $_SERVER["REQUEST_URI"]==$_SERVER["SCRIPT_NAME"];
+ return substru($_SERVER["REQUEST_URI"], -10, 10)=="yellow.php";
}
// Check if clean URL is requested
@@ -3377,4 +3378,4 @@ function substrb() { return call_user_func_array("substr", func_get_args()); }
// Error reporting for PHP
error_reporting(E_ALL ^ E_NOTICE);
-?>
-\ No newline at end of file
+?>