diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-21 18:30:23 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-21 18:30:23 +0000 |
commit | 2160d5f11f95f81299ae44ece4819c144467d07f (patch) | |
tree | 3a67d2c7b2995e6f8f4f4d989b5278af440186ac /engine/lib/pageowner.php | |
parent | bb2713fad75de0f63c1865f64b04ed69040f4ca3 (diff) | |
download | elgg-2160d5f11f95f81299ae44ece4819c144467d07f.tar.gz elgg-2160d5f11f95f81299ae44ece4819c144467d07f.tar.bz2 |
Default page owner code now ignores the query. Works for pages like pg/bookmarks/add/34?address=http://google.com
git-svn-id: http://code.elgg.org/elgg/trunk@8385 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/pageowner.php')
-rw-r--r-- | engine/lib/pageowner.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php index 034349d67..f4f96b0e6 100644 --- a/engine/lib/pageowner.php +++ b/engine/lib/pageowner.php @@ -113,8 +113,17 @@ function default_page_owner_handler($hook, $entity_type, $returnvalue, $params) } $uri = $_SERVER['REQUEST_URI']; - if (strpos($uri, '/pg') === 0) { - $segments = explode('/', $uri); + // ignore the query + $parts = parse_url($uri); + + if ($parts && isset($parts['path'])) { + $path = $parts['path']; + } else { + return $returnvalue; + } + + if (strpos($path, '/pg') === 0) { + $segments = explode('/', $path); if (isset($segments[3]) && isset($segments[4])) { switch ($segments[3]) { case 'owner': |