Module: appdb Branch: master Commit: 16d212c552e6f74075d9401eeab8c53667c80be5 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=16d212c552e6f74075d9401ee...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Tue Oct 23 21:49:06 2007 +0200
Prevent ids getting lost during editing
---
include/comment.php | 4 +++- include/distribution.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/comment.php b/include/comment.php index 8274ef1..ca29670 100644 --- a/include/comment.php +++ b/include/comment.php @@ -200,7 +200,9 @@ class Comment { $this->sSubject = $aClean['sSubject']; $this->sBody = $aClean['sBody']; $this->iParentId = $aClean['iThread']; - $this->iVersionId = $aClean['iVersionId']; + + if($aClean['iVersionId']) + $this->iVersionId = $aClean['iVersionId'];
if(!$this->oOwner) $this->oOwner = $_SESSION['current']; diff --git a/include/distribution.php b/include/distribution.php index a51cdef..9dc45f6 100644 --- a/include/distribution.php +++ b/include/distribution.php @@ -443,7 +443,9 @@ class distribution { /* $aValues can be $_REQUEST or any array with the values from outputEditor() */ function GetOutputEditorValues($aValues) { - $this->iDistributionId = $aValues['iDistributionId']; + if($aClean['iDistributionId']) + $this->iDistributionId = $aValues['iDistributionId']; + $this->sName = $aValues['sDistribution']; $this->sUrl = $aValues['sUrl']; }