Return from version::delete() if there isn't a valid version id

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-04-27 00:06:07 +00:00
committed by WineHQ
parent a7789c2a8d
commit 518def1855

View File

@@ -215,6 +215,10 @@ class Version {
*/ */
function delete($bSilent=false) function delete($bSilent=false)
{ {
/* We need the versionId to continue */
if(!$this->iVersionId)
return;
/* is the current user allowed to delete this version? */ /* is the current user allowed to delete this version? */
if(!$_SESSION['current']->canDeleteVersion($this)) if(!$_SESSION['current']->canDeleteVersion($this))
return false; return false;