mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fixed Versioned::publish() when the class name is bad, for example after a module has been removed.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80933 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1b1809f1a2
commit
57bb3c09d7
@ -426,10 +426,10 @@ class Versioned extends DataObjectDecorator {
|
|||||||
$extTable = $this->extendWithSuffix($baseClass);//die($extTable);
|
$extTable = $this->extendWithSuffix($baseClass);//die($extTable);
|
||||||
|
|
||||||
if(is_numeric($fromStage)) {
|
if(is_numeric($fromStage)) {
|
||||||
$from = Versioned::get_version($this->owner->class, $this->owner->ID, $fromStage);
|
$from = Versioned::get_version($baseClass, $this->owner->ID, $fromStage);
|
||||||
} else {
|
} else {
|
||||||
$this->owner->flushCache();
|
$this->owner->flushCache();
|
||||||
$from = Versioned::get_one_by_stage($this->owner->class, $fromStage, "\"{$baseClass}\".\"ID\" = {$this->owner->ID}");
|
$from = Versioned::get_one_by_stage($baseClass, $fromStage, "\"{$baseClass}\".\"ID\" = {$this->owner->ID}");
|
||||||
}
|
}
|
||||||
|
|
||||||
$publisherID = isset(Member::currentUser()->ID) ? Member::currentUser()->ID : 0;
|
$publisherID = isset(Member::currentUser()->ID) ? Member::currentUser()->ID : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user