mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
'URLSegment' on line 484 and 494 now escaped
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71567 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4e0bf2c671
commit
5312773e18
@ -481,7 +481,7 @@ class Translatable extends DataObjectDecorator {
|
||||
|
||||
if(!$this->owner->ID && $this->isTranslation()) {
|
||||
$SQL_URLSegment = Convert::raw2sql($this->owner->URLSegment);
|
||||
$existingOriginalPage = Translatable::get_one_by_lang('SiteTree', Translatable::default_lang(), "URLSegment = '{$SQL_URLSegment}'");
|
||||
$existingOriginalPage = Translatable::get_one_by_lang('SiteTree', Translatable::default_lang(), "\"URLSegment\" = '{$SQL_URLSegment}'");
|
||||
if($existingOriginalPage) $this->owner->URLSegment .= "-{$this->owner->Lang}";
|
||||
}
|
||||
}
|
||||
@ -491,7 +491,7 @@ class Translatable extends DataObjectDecorator {
|
||||
|
||||
$SQL_URLSegment = Convert::raw2sql($urlSegment);
|
||||
Translatable::disable();
|
||||
$record = DataObject::get_one('SiteTree', "URLSegment = '{$SQL_URLSegment}'");
|
||||
$record = DataObject::get_one('SiteTree', "\"URLSegment\" = '{$SQL_URLSegment}'");
|
||||
Translatable::enable();
|
||||
|
||||
return $record;
|
||||
|
Loading…
x
Reference in New Issue
Block a user