Always read input first in downloadurl::outputEditorSingle(). Makes sure changes aren't lost
when reloading the form due to input errors
This commit is contained in:
committed by
WineHQ
parent
74425f0b5a
commit
982dc97756
@@ -224,7 +224,12 @@ class downloadurl
|
||||
/* Output an editor for a single new URL */
|
||||
function outputEditorSingle($iVersionId = NULL, $aValues = NULL)
|
||||
{
|
||||
if($iVersionId)
|
||||
if($aValues["sDownloadUrlUrl"] &&
|
||||
$aValues["sDownloadUrlDescription"])
|
||||
{
|
||||
$sDownloadUrlUrl = $aValues["sDownloadUrlUrl"];
|
||||
$sDownloadUrlDescription = $aValues["sDownloadUrlDescription"];
|
||||
} else if($iVersionId)
|
||||
{
|
||||
if($hResult = appData::getData($iVersionId, "downloadurl",
|
||||
TRUE, TRUE))
|
||||
@@ -233,12 +238,9 @@ class downloadurl
|
||||
$sDownloadUrlUrl = $oRow->url;
|
||||
$sDownloadUrlDescription = $oRow->description;
|
||||
}
|
||||
} else
|
||||
{
|
||||
$sDownloadUrlUrl = $aValues["sDownloadUrlUrl"];
|
||||
$sDownloadUrlDescription = $aValues["sDownloadUrlDescription"];
|
||||
}
|
||||
|
||||
|
||||
$sReturn .= html_frame_start("Download URL","90%");
|
||||
$sReturn .= html_table_begin("");
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ class version_queue
|
||||
|
||||
function outputEditor()
|
||||
{
|
||||
global $aClean;
|
||||
|
||||
/* Display duplicate list if this is a an existing version */
|
||||
if($this->oVersion->iVersionId)
|
||||
$this->displayMoveTestTable();
|
||||
|
||||
Reference in New Issue
Block a user