BUGFIX Fixed SiteTree->getIsDeletedFromStage() to return false on non-numeric IDs (isNew())

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69857 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-01-07 23:01:38 +00:00
parent 0747fc6d52
commit c8200f67ac

View File

@ -1705,6 +1705,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
*/
function getIsDeletedFromStage() {
if(!$this->ID) return true;
if($this->isNew()) return false;
$stageVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Stage', $this->ID);
$liveVersion = Versioned::get_versionnumber_by_stage('SiteTree', 'Live', $this->ID);