From c406571bd2a014dac3b4a023f96ec6331eb788b0 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 18 Jul 2008 11:40:34 +0000 Subject: Improvements to get_context git-svn-id: https://code.elgg.org/elgg/trunk@1466 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/plugins.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'engine/lib/plugins.php') diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index b92ffd72d..51a47601d 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -98,12 +98,11 @@ } } } else { - $file = $_SERVER["SCRIPT_NAME"]; - if (substr_count($file,'handlers/pagehandler')) { - if (preg_match("/pg\/([a-zA-Z0-9\-\_]*)\//",$_SERVER['REQUEST_URI'],$matches)) { - return $matches[1]; - } + //if (substr_count($file,'handlers/pagehandler')) { + if (preg_match("/pg\/([a-zA-Z0-9\-\_]*)\//",$_SERVER['REQUEST_URI'],$matches)) { + return $matches[1]; } else { + $file = $_SERVER["SCRIPT_NAME"]; $file = str_replace("\\","/",$file); $file = str_replace("//","/",$file); if (preg_match("/mod\/([a-zA-Z0-9\-\_]*)\//",$file,$matches)) { -- cgit v1.2.3