From ee6e7c551c647de636f58251525816ed31a87153 Mon Sep 17 00:00:00 2001 From: real_nowhereman Date: Sun, 3 Apr 2011 17:13:12 +0000 Subject: [PATCH] nasty auth bug --- fp-plugins/prettyurls/plugin.prettyurls.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/fp-plugins/prettyurls/plugin.prettyurls.php b/fp-plugins/prettyurls/plugin.prettyurls.php index 5c4a8c3..61607f2 100644 --- a/fp-plugins/prettyurls/plugin.prettyurls.php +++ b/fp-plugins/prettyurls/plugin.prettyurls.php @@ -251,7 +251,8 @@ class Plugin_PrettyURLs { global $fp_params; $this->fp_params =& $fp_params; - $this->baseurl = PRETTYURLS_PATHINFO? BLOG_BASEURL . 'index.php/' : BLOG_BASEURL; + // $this->baseurl = PRETTYURLS_PATHINFO? BLOG_BASEURL . 'index.php/' : BLOG_BASEURL; + $this->baseurl = BLOG_BASEURL . '?u=/'; if (PRETTYURLS_TITLES) { #if ($f = io_load_file(PRETTYURLS_CACHE)) @@ -271,13 +272,16 @@ class Plugin_PrettyURLs { # this is not working if you reach flatpress via symlink # unless you don't edit manually defaults.php - if (strpos($_SERVER['REQUEST_URI'], BLOG_ROOT)!==false) { - $url = $_SERVER['REQUEST_URI']; - $del = BLOG_ROOT; - if (strpos($url, 'index.php')!==false) - $del = $del . 'index.php/'; - $url = substr($url, strlen($del)-1); - } + //if (strpos($_SERVER['REQUEST_URI'], BLOG_ROOT)!==false) { + // $url = $_SERVER['REQUEST_URI']; + // $del = BLOG_ROOT; + // if (strpos($url, 'index.php')!==false) + // $del = $del . 'index.php/'; + // $url = substr($url, strlen($del)-1); + //} + + $url = $_GET['u']; + // removes querystrings if (false !== $i = strpos($url, '?'))