BUGFIX: Fix translatable being enabled when it shouldn't be

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71258 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-02-03 02:49:34 +00:00
parent 60f75c5ca4
commit 2f81c822bb

View File

@ -487,6 +487,8 @@ class Translatable extends DataObjectDecorator {
}
function alternateGetByUrl($urlSegment, $extraFilter, $cache = null, $orderby = null) {
if(!Translatable::is_enabled()) return;
$SQL_URLSegment = Convert::raw2sql($urlSegment);
Translatable::disable();
$record = DataObject::get_one('SiteTree', "URLSegment = '{$SQL_URLSegment}'");