Merge pull request #156 from wecodenl/master

Bugfix for urls with %27 in the url
This commit is contained in:
Sean Harvey 2014-08-23 11:57:43 +12:00
commit ffe6c34565

View File

@ -263,7 +263,7 @@ class SiteTreeSubsites extends DataExtension {
$origDisableSubsiteFilter = Subsite::$disable_subsite_filter;
Subsite::disable_subsite_filter(true);
$candidatePage = DataObject::get_one("SiteTree", "\"URLSegment\" = '" . urldecode( $rest). "' AND \"SubsiteID\" = " . $subsiteID, false);
$candidatePage = DataObject::get_one("SiteTree", "\"URLSegment\" = '" . Convert::raw2sql(urldecode( $rest)) . "' AND \"SubsiteID\" = " . $subsiteID, false);
Subsite::disable_subsite_filter($origDisableSubsiteFilter);
if($candidatePage) {