revert clumsy r376

This commit is contained in:
real_nowhereman 2011-04-03 19:38:07 +00:00
parent 084fd83ca6
commit b9c3a2e7af

View File

@ -251,8 +251,7 @@ class Plugin_PrettyURLs {
global $fp_params;
$this->fp_params =& $fp_params;
// $this->baseurl = PRETTYURLS_PATHINFO? BLOG_BASEURL . 'index.php/' : BLOG_BASEURL;
$this->baseurl = BLOG_BASEURL . '?u=/';
$this->baseurl = PRETTYURLS_PATHINFO? BLOG_BASEURL . 'index.php/' : BLOG_BASEURL;
if (PRETTYURLS_TITLES) {
#if ($f = io_load_file(PRETTYURLS_CACHE))
@ -272,16 +271,13 @@ 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);
//}
$url = $_GET['u'];
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);
}
// removes querystrings
if (false !== $i = strpos($url, '?'))