Return from version::delete() if there isn't a valid version id
This commit is contained in:
committed by
WineHQ
parent
a7789c2a8d
commit
518def1855
@@ -215,6 +215,10 @@ class Version {
|
||||
*/
|
||||
function delete($bSilent=false)
|
||||
{
|
||||
/* We need the versionId to continue */
|
||||
if(!$this->iVersionId)
|
||||
return;
|
||||
|
||||
/* is the current user allowed to delete this version? */
|
||||
if(!$_SESSION['current']->canDeleteVersion($this))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user