#583 Losing attachments when performing massive change

SVN:1.2[2286]
This commit is contained in:
Romain Quetiez
2012-10-18 09:39:37 +00:00
parent 463748b6da
commit 891b22909a

View File

@@ -468,7 +468,7 @@ EOF
$oPage->p(Dict::S('Attachments:AddAttachment').'<input type="file" name="file" id="file" onChange="ajaxFileUpload();"><span style="display:none;" id="attachment_loading">&nbsp;<img src="../images/indicator.gif"></span> '.$sMaxUpload);
//$oPage->p('<input type="button" onClick="ajaxFileUpload();" value=" Upload !">');
$oPage->p('<span style="display:none;" id="attachment_loading">Loading, please wait...</span>');
$oPage->p('<input type="hidden" id="attachment_plugin"/>');
$oPage->p('<input type="hidden" id="attachment_plugin" name="attachment_plugin"/>');
$oPage->add('</fieldset>');
if ($this->m_bDeleteEnabled)
{
@@ -499,6 +499,12 @@ EOF
protected static function UpdateAttachments($oObject, $oChange = null)
{
if (utils::ReadParam('attachment_plugin', 'not-in-form') == 'not-in-form')
{
// Workaround to an issue in iTop < 2.0
// Leave silently if there is no trace of the attachment form
return;
}
$iTransactionId = utils::ReadParam('transaction_id', null);
if (!is_null($iTransactionId))
{