From 2710a00543df92b81f6855c2d08f02f8b8b4f560 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kasper=20Sk=C3=A5rh=C3=B8j?= <kasper@typo3.org>
Date: Wed, 31 Mar 2004 14:51:20 +0000
Subject: [PATCH] * Fixed another small bug in detection of
 simulateStaticDocuments.

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@172 709f56b5-9817-0410-a4d7-c38de5d9e867
---
 ChangeLog                                     | 4 ++++
 typo3/sysext/cms/tslib/class.tslib_fe.php     | 7 ++++---
 typo3/sysext/cms/tslib/class.tslib_pibase.php | 4 ++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 26e22559ee90..649a7ceaf252 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-03-31  Kasper Skårhøj,,,  <kasper@typo3.com>
+
+	* Fixed another small bug in detection of simulateStaticDocuments.
+
 2004-03-31  Kasper Skårhøj,,,  <kasper@typo3.com>
 
 	* Fixed distinction between ' and " in EM.
diff --git a/typo3/sysext/cms/tslib/class.tslib_fe.php b/typo3/sysext/cms/tslib/class.tslib_fe.php
index 1026a65dc073..fe48b6210b10 100755
--- a/typo3/sysext/cms/tslib/class.tslib_fe.php
+++ b/typo3/sysext/cms/tslib/class.tslib_fe.php
@@ -497,9 +497,10 @@
 			// Resolving of "simulateStaticDocuments" URLs:
 		if ($this->siteScript && substr($this->siteScript,0,9)!='index.php')	{		// If there has been a redirect (basically; we arrived here otherwise than via "index.php" in the URL) this can happend either due to a CGI-script or because of reWrite rule. Earlier we used $GLOBALS['HTTP_SERVER_VARS']['REDIRECT_URL'] to check but
 			$uParts = parse_url($this->siteScript);	// Parse the path:
-			$requestFilename = basename($uParts['path']);		// This is the filename of the script/simulated html-file.
-			if (dirname($uParts['path'])=='.' && $requestFilename && substr($requestFilename,-5)=='.html')	{
-				$parts = explode('.',$requestFilename);
+			$fI = t3lib_div::split_fileref($uParts['path']);
+
+			if (!$fI['path'] && $fI['file'] && substr($fI['file'],-5)=='.html')	{
+				$parts = explode('.',$fI['file']);
 				$pCount = count($parts);
 				if ($pCount>2)	{
 					$this->type = intval($parts[$pCount-2]);
diff --git a/typo3/sysext/cms/tslib/class.tslib_pibase.php b/typo3/sysext/cms/tslib/class.tslib_pibase.php
index d0597e71c5f9..9ce2b39af404 100755
--- a/typo3/sysext/cms/tslib/class.tslib_pibase.php
+++ b/typo3/sysext/cms/tslib/class.tslib_pibase.php
@@ -470,7 +470,7 @@ class tslib_pibase {
 			($showResultCount ? '
 			<p>'.sprintf(
 				str_replace('###SPAN_BEGIN###','<span'.$this->pi_classParam('browsebox-strong').'>',$this->pi_getLL('pi_list_browseresults_displays','Displaying results ###SPAN_BEGIN###%s to %s</span> out of ###SPAN_BEGIN###%s</span>')),
-				$pR1,
+				$this->internal['res_count'] > 0 ? $pR1 : 0,
 				min(array($this->internal['res_count'],$pR2)),
 				$this->internal['res_count']
 				).'</p>':''
@@ -1234,4 +1234,4 @@ class tslib_pibase {
 }
 
 // NO extension of class - does not make sense here.
-?>
\ No newline at end of file
+?>
-- 
GitLab