aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-10 09:15:56 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-10 09:15:56 +0000
commit370bd44782258ca90e45672243da5808f362aab6 (patch)
tree9bad99a8886a9fafb12e9b27d2c28588e72a0d28 /engine
parentfdcdff0fc24292c7dd6116d4c8c5623adb6646c5 (diff)
downloadelgg-370bd44782258ca90e45672243da5808f362aab6.tar.gz
elgg-370bd44782258ca90e45672243da5808f362aab6.tar.bz2
Fixed issue with get_plugin_name and pagehandlers.
git-svn-id: https://code.elgg.org/elgg/trunk@1383 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/plugins.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index 4955c97c3..b92ffd72d 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -99,10 +99,16 @@
}
} else {
$file = $_SERVER["SCRIPT_NAME"];
- $file = str_replace("\\","/",$file);
- $file = str_replace("//","/",$file);
- if (preg_match("/mod\/([a-zA-Z0-9\-\_]*)\//",$file,$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 = str_replace("\\","/",$file);
+ $file = str_replace("//","/",$file);
+ if (preg_match("/mod\/([a-zA-Z0-9\-\_]*)\//",$file,$matches)) {
+ return $matches[1];
+ }
}
}
return false;