mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Don't recreate a missing draft page when calling SiteTree::doUnpublish()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101170 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4b191bdaba
commit
52538032a8
@ -2067,7 +2067,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
|
||||
// If we're on the draft site, then we can update the status.
|
||||
// Otherwise, these lines will resurrect an inappropriate record
|
||||
if(Versioned::current_stage() != 'Live') {
|
||||
if(DB::query("SELECT \"ID\" FROM \"SiteTree\" WHERE \"ID\" = $this->ID")->value()
|
||||
&& Versioned::current_stage() != 'Live') {
|
||||
$this->Status = "Unpublished";
|
||||
$this->write();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user