Module: appdb Branch: master Commit: fe56884a98ac13c2cbe5af26af33063a9089edb9 URL: http://source.winehq.org/git/appdb.git/?a=commit;h=fe56884a98ac13c2cbe5af26a...
Author: Alexander Nicolaysen Sørnes alex@thehandofagony.com Date: Mon Oct 22 18:58:15 2007 +0200
Prevent ids from disappearing during form processing
---
include/application.php | 4 +++- include/testData.php | 8 ++++++-- include/version.php | 8 ++++++-- 3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/include/application.php b/include/application.php index 47033fa..15bf660 100644 --- a/include/application.php +++ b/include/application.php @@ -618,7 +618,9 @@ class Application { /* $aValues can be $_REQUEST or any array with the values from outputEditor() */ public function GetOutputEditorValues($aValues) { - $this->iAppId = $aValues['iAppId']; + if($aValues['iAppId']) + $this->iAppId = $aValues['iAppId']; + $this->sName = $aValues['sAppName']; $this->sDescription = $aValues['shAppDescription']; $this->iCatId = $aValues['iAppCatId']; diff --git a/include/testData.php b/include/testData.php index 3dd833e..03b56f2 100644 --- a/include/testData.php +++ b/include/testData.php @@ -815,8 +815,12 @@ class testData{ /* $aValues can be $_REQUEST or any array with the values from outputEditor() */ function GetOutputEditorValues($aValues) { - $this->iTestingId = $aValues['iTestingId']; - $this->iVersionId = $aValues['iVersionId']; + if($aValues['iTestingId']) + $this->iTestingId = $aValues['iTestingId']; + + if($aValues['iVersionId']) + $this->iVersionId = $aValues['iVersionId']; + $this->shWhatWorks = $aValues['shWhatWorks']; $this->shWhatDoesnt = $aValues['shWhatDoesnt']; $this->shWhatNotTested = $aValues['shWhatNotTested']; diff --git a/include/version.php b/include/version.php index 6da13c4..63a5e03 100644 --- a/include/version.php +++ b/include/version.php @@ -705,8 +705,12 @@ class version { /* $aValues can be $_REQUEST or any array with the values from outputEditor() */ public function GetOutputEditorValues($aValues) { - $this->iAppId = $aValues['iAppId']; - $this->iVersionId = $aValues['iVersionId']; + if($aValues['iAppId']) + $this->iAppId = $aValues['iAppId']; + + if($aValues['iVersionId']) + $this->iVersionId = $aValues['iVersionId']; + $this->sName = $aValues['sVersionName']; $this->sDescription = $aValues['shVersionDescription']; $this->sTestedRating = $aValues['sMaintainerRating'];