--- class.tslib_fe.php.ORG Mon Feb 7 19:32:58 2005 +++ class.tslib_fe.php Tue Feb 8 04:55:24 2005 @@ -2661,9 +2661,20 @@ $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); + $substChar = '_'; + if (isset($this->config['config']['simulateStaticDocuments_substChar'])) { + $substChar = $this->config['config']['simulateStaticDocuments_substChar']; + } + $substPreserve = '_-'; + if (isset($this->config['config']['simulateStaticDocuments_substPreserve'])) { + $substPreserve = $this->config['config']['simulateStaticDocuments_substPreserve']; + } + $pattern = '[^[:alnum:]'.$substPreserve.']'; + intval($this->config['config']['simulateStaticDocuments_substConsecutive']) && $pattern .= '+'; + $out= ereg_replace($pattern,$substChar,$out); + strlen($substChar) && $out= ereg_replace('^'.substChar.'*','',$out); + $out= trim(substr($out,0,$titleChars)); + strlen($substChar) && $out= ereg_replace($substChar.'*$','',$out); if ($out) $out.='.'; } $enc = '';