Commit 6f578970 authored by Kasper Skårhøj's avatar Kasper Skårhøj
Browse files

* Fixed problem with domain look-up when an extra "/" was added to eg. "typo3.com//" -> showing "typo3.org" instead


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@186 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 7f058e5c
2004-04-01 Kasper Skårhøj,,, <kasper@typo3.com>
* Fixed problem with domain look-up when an extra "/" was added to eg. "typo3.com//" -> showing "typo3.org" instead
2004-04-01 Kasper Skårhøj,,, <kasper@typo3.com>
* Fixed some browser detection bugs in t3lib_matchcondition and t3lib_div. Not necessarily exhaustive! For instance a report on Netscape 7.2 being wrongly detected may not be resolved (need teh value of HTTP_USER_AGENT to solve it since I do not have netscape 7.2!)
......
......@@ -50,7 +50,7 @@
*
* SECTION: Page related: Menu, Domain record, Root line
* 296: function getMenu($uid,$fields='*',$sortField='sorting',$addWhere='')
* 315: function getDomainStartPage($domain, $path='',$request_uri='')
* 315: function getDomainStartPage($domain, $path='',$request_uri='')
* 361: function getRootLine($uid, $MP='')
* 421: function getPathFromRootline($rl,$len=20)
* 442: function getExtURL($pagerow,$disable=0)
......@@ -318,8 +318,9 @@ class t3lib_pageSelect {
// Removing extra trailing slashes
$path = trim(ereg_replace('\/[^\/]*$','',$path));
// Appending to domain string
$domain.=$path;
$domain.= $path;
$domain = ereg_replace('\/*$','',$domain);
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'pages.uid,sys_domain.redirectTo,sys_domain.prepend_params',
'pages,sys_domain',
......
......@@ -60,7 +60,7 @@
* 904: function checkPagerecordForIncludeSection($row)
* 916: function setIDfromArgV()
* 932: function getPageAndRootlineWithDomain($domainStartPage)
* 960: function findDomainRecord($recursive=0)
* 960: function findDomainRecord($recursive=0)
* 981: function pageNotFoundHandler($code,$header='')
* 1003: function checkAndSetAlias()
* 1018: function idPartsAnalyze($str)
......@@ -961,7 +961,7 @@
if ($recursive) {
$host = explode('.',t3lib_div::getIndpEnv('HTTP_HOST'));
while(count($host)) {
$pageUid = $this->sys_page->getDomainStartPage(implode('.',$host),t3lib_div::getIndpEnv('SCRIPT_NAME'),t3lib_div::getIndpEnv('REQUEST_URI'));
$pageUid = $this->sys_page->getDomainStartPage(implode('.',$host),t3lib_div::getIndpEnv('SCRIPT_NAME'),t3lib_div::getIndpEnv('REQUEST_URI'));
if ($pageUid) return $pageUid; else array_shift($host);
}
return $pageUid;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment