diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 69c198470..4df66e745 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1517,7 +1517,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid */ function generateURLSegment($title){ $t = (function_exists('mb_strtolower')) ? mb_strtolower($title) : strtolower($title); - $t = Object::create('Transliterator')->toASCII($t); + $t = Object::create('SS_Transliterator')->toASCII($t); $t = str_replace('&','-and-',$t); $t = str_replace('&','-and-',$t); $t = ereg_replace('[^A-Za-z0-9]+','-',$t); diff --git a/core/model/Transliterator.php b/core/model/Transliterator.php index 6592761f0..62b0be90d 100644 --- a/core/model/Transliterator.php +++ b/core/model/Transliterator.php @@ -6,14 +6,14 @@ * Usage: * * - * $tr = new Transliterator(); + * $tr = new SS_Transliterator(); * $ascii = $tr->toASCII($unicode); * * * @package sapphire * @subpackage model */ -class Transliterator { +class SS_Transliterator { /** * Allow the use of iconv() to perform transliteration. Set to false to disable. * Even if this variable is true, iconv() won't be used if it's not installed. @@ -58,4 +58,8 @@ class Transliterator { protected function useIconv($source) { return iconv("utf-8", "us-ascii//IGNORE//TRANSLIT", $source); } -} \ No newline at end of file +} + +if(!class_exists('Transliterator')) { + class Transliterator extends SS_Transliterator {} +}