mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
Merge pull request #81 from halkyon/e_deprecated_fixes
Remove use of deprecated ereg_replace() and use preg_replace()
This commit is contained in:
commit
a4f56b98d2
@ -102,8 +102,8 @@ class FilesystemPublisher extends StaticPublisher {
|
||||
// perform similar transformations to SiteTree::generateURLSegment()
|
||||
$urlSegment = str_replace('&','-and-',$urlSegment);
|
||||
$urlSegment = str_replace('&','-and-',$urlSegment);
|
||||
$urlSegment = ereg_replace('[^A-Za-z0-9\/-]+','-',$urlSegment);
|
||||
$urlSegment = ereg_replace('-+','-',$urlSegment);
|
||||
$urlSegment = preg_replace('/[^A-Za-z0-9\/-]+/', '-', $urlSegment);
|
||||
$urlSegment = preg_replace('/-+/', '-', $urlSegment);
|
||||
$urlSegment = trim($urlSegment, '/');
|
||||
|
||||
$filename = $urlSegment ? "$urlSegment.$this->fileExtension" : "index.$this->fileExtension";
|
||||
|
Loading…
x
Reference in New Issue
Block a user