[geeklog-cvs] geeklog: Made url rewriting work on setups that only set $_SERVE...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Mar 1 15:31:42 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1986404b773e
changeset: 6812:1986404b773e
user: Dirk Haun <dirk at haun-online.de>
date: Sun Mar 01 13:43:11 2009 +0100
description:
Made url rewriting work on setups that only set $_SERVER['ORIG_PATH_INFO'] (bug #0000816)
diffstat:
2 files changed, 16 insertions(+), 17 deletions(-)
public_html/docs/history | 2 ++
system/classes/url.class.php | 31 ++++++++++++++-----------------
diffs (87 lines):
diff -r d1a4cbb036ee -r 1986404b773e public_html/docs/history
--- a/public_html/docs/history Sun Mar 01 11:05:21 2009 +0100
+++ b/public_html/docs/history Sun Mar 01 13:43:11 2009 +0100
@@ -11,6 +11,8 @@
+ (TBD) Comment moderation and editable comments, by Jared Wenerd
Other changes:
+- Made url rewriting work on setups that only set $_SERVER['ORIG_PATH_INFO']
+ (bug #0000816)
- Fixed duplicate plugin entries when a plugin has more than one entry for the
admin or user menu (bug #0000820)
- {contributedby_user} and {contributedby_fullname} weren't set in the story
diff -r d1a4cbb036ee -r 1986404b773e system/classes/url.class.php
--- a/system/classes/url.class.php Sun Mar 01 11:05:21 2009 +0100
+++ b/system/classes/url.class.php Sun Mar 01 13:43:11 2009 +0100
@@ -2,16 +2,15 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.4 |
+// | Geeklog 1.6 |
// +---------------------------------------------------------------------------+
// | url.class.php |
// | |
// | class to allow for spider friendly URL's |
// +---------------------------------------------------------------------------+
-// | Copyright (C) 2002 by the following authors: |
+// | Copyright (C) 2002-2009 by the following authors: |
// | |
-// | Authors: Tony Bibbs - tony at tonybibbs.com |
-// | |
+// | Authors: Tony Bibbs - tony AT tonybibbs DOT com |
// +---------------------------------------------------------------------------+
// | |
// | This program is free software; you can redistribute it and/or |
@@ -29,8 +28,6 @@
// | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
// | |
// +---------------------------------------------------------------------------+
-//
-// $Id: url.class.php,v 1.11 2006/09/09 12:52:06 dhaun Exp $
/**
* This class will allow you to use friendlier URL's, like:
@@ -76,23 +73,23 @@
*/
function _getArguments()
{
- if (isset ($_SERVER['PATH_INFO'])) {
- if ($_SERVER['PATH_INFO'] == '')
- {
- if (isset ($_ENV['ORIG_PATH_INFO']))
- {
+ if (isset($_SERVER['PATH_INFO'])) {
+ if ($_SERVER['PATH_INFO'] == '') {
+ if (isset($_ENV['ORIG_PATH_INFO'])) {
$this->_arguments = explode('/', $_ENV['ORIG_PATH_INFO']);
} else {
$this->_arguments = array();
}
} else {
- $this->_arguments = explode ('/', $_SERVER['PATH_INFO']);
+ $this->_arguments = explode('/', $_SERVER['PATH_INFO']);
}
- array_shift ($this->_arguments);
- } else if (isset ($_ENV['ORIG_PATH_INFO'])) {
- $this->_arguments = explode('/', substr($_ENV['ORIG_PATH_INFO'],1));
+ array_shift($this->_arguments);
+ } elseif (isset($_ENV['ORIG_PATH_INFO'])) {
+ $this->_arguments = explode('/', substr($_ENV['ORIG_PATH_INFO'], 1));
+ } elseif (isset($_SERVER['ORIG_PATH_INFO'])) {
+ $this->_arguments = explode('/', substr($_SERVER['ORIG_PATH_INFO'], 1));
} else {
- $this->_arguments = array ();
+ $this->_arguments = array();
}
}
@@ -200,7 +197,7 @@
if (!$this->isEnabled()) {
return $url;
}
-
+
$pos = strpos($url,'?');
$query_string = substr($url,$pos+1);
$finalList = array();
More information about the geeklog-cvs
mailing list