ChangeSet ID: 31108 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@winehq.org 2007/04/26 19:06:07
Modified files: include : version.php
Log message: Alexander Nicolaysen Sørnes alex@thehandofagony.com Return from version::delete() if there isn't a valid version id
Patch: http://cvs.winehq.org/patch.py?id=31108
Old revision New revision Changes Path 1.124 1.125 +4 -0 appdb/include/version.php
Index: appdb/include/version.php diff -u -p appdb/include/version.php:1.124 appdb/include/version.php:1.125 --- appdb/include/version.php:1.124 27 Apr 2007 0: 6: 7 -0000 +++ appdb/include/version.php 27 Apr 2007 0: 6: 7 -0000 @@ -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;