BUG 9023 "Knowledgetree and ProcessMaker show error to upload some..." SOLVED
- Problem running case with field file with property value "Input" in the Dynaform, generates the following error: "This row doesn't exist!" - Added the missing code in this section when the KnowledgeTree plugin is enabled.
This commit is contained in:
@@ -211,6 +211,7 @@ try {
|
||||
}
|
||||
|
||||
$oAppDocument->create($aFields);
|
||||
|
||||
$iDocVersion = $oAppDocument->getDocVersion();
|
||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$aInfo = pathinfo($oAppDocument->getAppDocFilename());
|
||||
@@ -218,15 +219,26 @@ try {
|
||||
$sPathName = PATH_DOCUMENT . $_SESSION ['APPLICATION'] . PATH_SEP;
|
||||
$sFileName = $sAppDocUid . '_'.$iDocVersion.'.' . $sExtension;
|
||||
G::uploadFile ( $_FILES ['form'] ['tmp_name'] [$sFieldName], $sPathName, $sFileName );
|
||||
|
||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
if ($oPluginRegistry->existsTrigger ( PM_UPLOAD_DOCUMENT ) && class_exists ( 'uploadDocumentData' )) {
|
||||
$documentData = new uploadDocumentData ( $_SESSION ['APPLICATION'], $_SESSION ['USER_LOGGED'], $sPathName . $sFileName, $aFields ['APP_DOC_FILENAME'], $sAppDocUid );
|
||||
if ($oPluginRegistry->existsTrigger(PM_UPLOAD_DOCUMENT) && class_exists("uploadDocumentData")) {
|
||||
$triggerDetail = $oPluginRegistry->getTriggerInfo(PM_UPLOAD_DOCUMENT);
|
||||
$documentData = new uploadDocumentData($_SESSION["APPLICATION"], $_SESSION["USER_LOGGED"], $sPathName . $sFileName, $aFields["APP_DOC_FILENAME"], $sAppDocUid, $iDocVersion);
|
||||
$uploadReturn = $oPluginRegistry->executeTriggers(PM_UPLOAD_DOCUMENT, $documentData);
|
||||
|
||||
if ($uploadReturn) {
|
||||
$aFields['APP_DOC_PLUGIN']=$triggerDetail->sNamespace;
|
||||
$oAppDocument1 = new AppDocument();
|
||||
$oAppDocument1->update($aFields);
|
||||
$aFields["APP_DOC_PLUGIN"] = $triggerDetail->sNamespace;
|
||||
|
||||
if (!isset($aFields["APP_DOC_UID"])) {
|
||||
$aFields["APP_DOC_UID"] = $sAppDocUid;
|
||||
}
|
||||
if (!isset($aFields["DOC_VERSION"])) {
|
||||
$aFields["DOC_VERSION"] = $iDocVersion;
|
||||
}
|
||||
|
||||
$oAppDocument->update($aFields);
|
||||
|
||||
unlink($sPathName . $sFileName);
|
||||
}
|
||||
}
|
||||
@@ -270,7 +282,6 @@ try {
|
||||
|
||||
}
|
||||
catch (Exception $e) {
|
||||
|
||||
$G_PUBLISH = new Publisher;
|
||||
$aMessage = array();
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
|
||||
Reference in New Issue
Block a user