From adae1958a95d7e801de91d673e927cac348236d9 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Thu, 10 Mar 2011 22:05:49 +0000 Subject: Fixes #2228: Major cleanup of urls -- remove leading pg/ and trailing / from most urls in core and plugins git-svn-id: http://code.elgg.org/elgg/trunk@8653 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/plugins.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engine/lib/plugins.php') diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index e0a6f134d..981896588 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -538,8 +538,9 @@ function elgg_get_calling_plugin_id($mainfilename = false) { } } } else { - if (preg_match("/pg\/([a-zA-Z0-9\-\_]*)\//", $_SERVER['REQUEST_URI'], $matches)) { - return $matches[1]; + //@todo this is a hack -- plugins do not have to match their page handler names! + if ($handler = get_input('handler', FALSE)) { + return $handler; } else { $file = $_SERVER["SCRIPT_NAME"]; $file = str_replace("\\", "/", $file); -- cgit v1.2.3