System update (winter remix)

This commit is contained in:
markseu 2015-12-15 00:22:49 +01:00
parent 60a6952a49
commit be062efe6d

7
system/plugins/core.php Normal file → Executable file
View file

@ -601,6 +601,7 @@ class YellowPage
{
$this->error(500, "Parser '".$this->get("parser")."' does not exist!");
}
if($this->yellow->toolbox->isRequestSelf()) $this->error(500, "Rewrite module not enabled on this server!");
if($this->yellow->getRequestHandler()=="core" && $this->isExisting("redirect") && $this->statusCode==200)
{
$location = $this->yellow->lookup->normaliseLocation($this->get("redirect"), $this->base, $this->location);
@ -2391,6 +2392,12 @@ class YellowToolbox
return preg_match("/^(.*\/)?$pagination:.*$/", $location);
}
// Check if script location is requested
function isRequestSelf()
{
return $_SERVER["REQUEST_URI"] == $_SERVER["SCRIPT_NAME"];
}
// Check if clean URL is requested
function isRequestCleanUrl($location)
{