mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR: Fixed column escaping for PostgreSQL support.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89517 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d2918f40ed
commit
b07e4e5181
@ -1473,12 +1473,12 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
if($numReplaced) $this->write();
|
||||
|
||||
// Published site
|
||||
$published = DB::query("SELECT * FROM \"SiteTree_Live\" WHERE ID = $this->ID")->record();
|
||||
$published = DB::query("SELECT * FROM \"SiteTree_Live\" WHERE \"ID\" = $this->ID")->record();
|
||||
$origPublished = $published;
|
||||
$published[$fieldName] = str_replace($old, $new, $published[$fieldName], $numReplaced);
|
||||
if($numReplaced) {
|
||||
DB::query("UPDATE \"SiteTree_Live\" SET \"$fieldName\" = '"
|
||||
. Convert::raw2sql($published[$fieldName]) . "' WHERE ID = $this->ID");
|
||||
. Convert::raw2sql($published[$fieldName]) . "' WHERE \"ID\" = $this->ID");
|
||||
|
||||
$publishedClass = $origPublished['ClassName'];
|
||||
$origPublishedObj = new $publishedClass($origPublished);
|
||||
|
Loading…
x
Reference in New Issue
Block a user