aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/plugins.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/plugins.php')
-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;