瀏覽代碼

System update (winter remix)

markseu 9 年之前
父節點
當前提交
be062efe6d
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      system/plugins/core.php

+ 7 - 0
system/plugins/core.php

@@ -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)
 	{