Bug #14221
closedconfig.stat_apache_pagenames code [type] ends up empty
0%
Description
on line 1288 of class.tslib_fe.php:
$pageName = str_replace('[type]',$this->page['type'],$pageName);
tslib_fe::getConfigArray() refers to $this->page['type'] which is empty
i think the line should be changed to
$pageName = str_replace("[type]",$GLOBALS['TSFE']->type,$pageName);
(issue imported from #M187)
Updated by Ingmar Schlecht over 20 years ago
Could you check if the following works:
$pageName = str_replace("[type]",$this->type,$pageName);
Updated by Ingmar Schlecht over 20 years ago
Peter, I haven't got a reply from you, so the bug will probably not be fixed in 3.7.
Updated by old_pekue over 20 years ago
hey ingmar,
sorry - i overlooked the bugnote youve added: youre right:
$pageName = str_replace("[type]",$this->type,$pageName);
would work as well.
thanks for fixing
pekue
Updated by Schmid Valentin almost 20 years ago
The bug is still not fixed in 3.7. But ingmars Bugfix works correct. Thanks.
There's also 'nice to have' (or Bug?) for 'config.stat_apache_pagenames':
The code [title] does not produce the same result as
'config.simulateStaticDocuments_addTitle = 30'
This would be very nice. You'll see the difference if you have special
chars in the Document-Title (like german Umlauts)
This is the relevant Code for 'config.stat_apache_pagenames':
$shortTitle = substr(ereg_replace('[^\.[:alnum:]_-]','_',$this->page['title']),0,30);
This is the relevant Code for 'config.simulateStaticDocuments_addTitle = 30'
(Remark: $inTitle is the same as $this->page['title'])
$out = '';
if ($titleChars) {
$out = $this->csConvObj->specCharsToASCII($this->renderCharset, $inTitle);
$out= ereg_replace('[^[:alnum:]_-]','_',trim(substr($out,0,$titleChars)));
$out= ereg_replace('_*$','',$out);
$out= ereg_replace('^_*','',$out);
if ($out) $out.='.';
}
(I think best would be to place the conversion in a function)