[geeklog-cvs] geeklog: Fix for COM_onFrontpage when being called from a theme'...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Jan 22 13:06:48 EST 2011
changeset 8064:c714dca14441
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/c714dca14441
user: Dirk Haun <dirk at haun-online.de>
date: Sat Jan 22 19:04:49 2011 +0100
description:
Fix for COM_onFrontpage when being called from a theme's functions.php (bug #0001254, patch provided by mystral-kk)
diffstat:
public_html/lib-common.php | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diffs (28 lines):
diff -r fe4f08774c57 -r c714dca14441 public_html/lib-common.php
--- a/public_html/lib-common.php Sat Jan 22 18:41:44 2011 +0100
+++ b/public_html/lib-common.php Sat Jan 22 19:04:49 2011 +0100
@@ -6216,19 +6216,15 @@
$onFrontpage = false;
// on a Zeus webserver, prefer PATH_INFO over SCRIPT_NAME
- if( empty( $_SERVER['PATH_INFO'] ))
- {
+ if (empty($_SERVER['PATH_INFO'])) {
$scriptName = $_SERVER['SCRIPT_NAME'];
- }
- else
- {
+ } else {
$scriptName = $_SERVER['PATH_INFO'];
}
- preg_match( '/\/\/[^\/]*(.*)/', $_CONF['site_url'], $pathonly );
- if(( $scriptName == $pathonly[1] . '/index.php' ) &&
- empty( $topic ) && ( $page == 1 ) && !$newstories )
- {
+ preg_match('/\/\/[^\/]*(.*)/', $_CONF['site_url'], $pathonly);
+ if (($scriptName == $pathonly[1] . '/index.php') &&
+ empty($topic) && (empty($page) || ($page == 1)) && !$newstories) {
$onFrontpage = true;
}
More information about the geeklog-cvs
mailing list