BUG 6688 KT issues
Part of the solution was to fix some issues in core that failed to update uploaded files to a plugin in local DB Change-Id: I60d18b0fa8416923780df802110ad81473a43b86
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
try {
|
//try {
|
||||||
|
|
||||||
//First review if there is no error with the uploaded document
|
//First review if there is no error with the uploaded document
|
||||||
if ((isset($_FILES['form']))&&($_FILES['form']['error']['APP_DOC_FILENAME'] != 0)) {
|
if ((isset($_FILES['form']))&&($_FILES['form']['error']['APP_DOC_FILENAME'] != 0)) {
|
||||||
@@ -152,7 +152,6 @@
|
|||||||
|
|
||||||
$aFields = array('APP_DOC_UID' => $appDocUid,
|
$aFields = array('APP_DOC_UID' => $appDocUid,
|
||||||
'APP_UID' => $_SESSION['APPLICATION'],
|
'APP_UID' => $_SESSION['APPLICATION'],
|
||||||
|
|
||||||
'DEL_INDEX' => $_SESSION['INDEX'],
|
'DEL_INDEX' => $_SESSION['INDEX'],
|
||||||
'USR_UID' => $_SESSION['USER_LOGGED'],
|
'USR_UID' => $_SESSION['USER_LOGGED'],
|
||||||
'DOC_UID' => $docUid,
|
'DOC_UID' => $docUid,
|
||||||
@@ -167,7 +166,8 @@
|
|||||||
$oAppDocument->create($aFields);
|
$oAppDocument->create($aFields);
|
||||||
break;
|
break;
|
||||||
default: //New
|
default: //New
|
||||||
$aFields = array('APP_UID' => $_SESSION['APPLICATION'],
|
$aFields = array(
|
||||||
|
'APP_UID' => $_SESSION['APPLICATION'],
|
||||||
'DEL_INDEX' => $_SESSION['INDEX'],
|
'DEL_INDEX' => $_SESSION['INDEX'],
|
||||||
'USR_UID' => $_SESSION['USER_LOGGED'],
|
'USR_UID' => $_SESSION['USER_LOGGED'],
|
||||||
'DOC_UID' => $docUid,
|
'DOC_UID' => $docUid,
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
|
||||||
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
$oPluginRegistry =& PMPluginRegistry::getSingleton();
|
||||||
if ( $oPluginRegistry->existsTrigger ( PM_UPLOAD_DOCUMENT ) && class_exists ('uploadDocumentData' ) ) {
|
if ( $oPluginRegistry->existsTrigger ( PM_UPLOAD_DOCUMENT ) && class_exists ('uploadDocumentData' ) ) {
|
||||||
|
$triggerDetail=$oPluginRegistry->getTriggerInfo( PM_UPLOAD_DOCUMENT );
|
||||||
$oData['APP_UID'] = $_SESSION['APPLICATION'];
|
$oData['APP_UID'] = $_SESSION['APPLICATION'];
|
||||||
$documentData = new uploadDocumentData (
|
$documentData = new uploadDocumentData (
|
||||||
$_SESSION['APPLICATION'],
|
$_SESSION['APPLICATION'],
|
||||||
@@ -214,8 +214,15 @@
|
|||||||
$uploadReturn=$oPluginRegistry->executeTriggers ( PM_UPLOAD_DOCUMENT , $documentData );
|
$uploadReturn=$oPluginRegistry->executeTriggers ( PM_UPLOAD_DOCUMENT , $documentData );
|
||||||
if($uploadReturn){
|
if($uploadReturn){
|
||||||
$aFields['APP_DOC_PLUGIN']=$triggerDetail->sNamespace;
|
$aFields['APP_DOC_PLUGIN']=$triggerDetail->sNamespace;
|
||||||
$oAppDocument1 = new AppDocument();
|
if(!isset($aFields['APP_DOC_UID'])){
|
||||||
$oAppDocument1->update($aFields);
|
$aFields['APP_DOC_UID']=$sAppDocUid;
|
||||||
|
}
|
||||||
|
if(!isset($aFields['DOC_VERSION'])){
|
||||||
|
$aFields['DOC_VERSION']=$iDocVersion;
|
||||||
|
}
|
||||||
|
//$oAppDocument1 = new AppDocument();
|
||||||
|
//G::pr($aFields);die;
|
||||||
|
$oAppDocument->update($aFields);
|
||||||
unlink ( $sPathName . $sFileName );
|
unlink ( $sPathName . $sFileName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -280,11 +287,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
|
$_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
|
||||||
|
/*
|
||||||
} catch ( Exception $e ) {
|
} catch ( Exception $e ) {
|
||||||
/* Render Error page */
|
|
||||||
$aMessage['MESSAGE'] = $e->getMessage();
|
$aMessage['MESSAGE'] = $e->getMessage();
|
||||||
$G_PUBLISH = new Publisher;
|
$G_PUBLISH = new Publisher;
|
||||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage );
|
||||||
G::RenderPage( 'publish' );
|
G::RenderPage( 'publish' );
|
||||||
}
|
}*/
|
||||||
@@ -610,7 +610,6 @@
|
|||||||
$listing=$oPluginRegistry->executeTriggers(PM_CASE_DOCUMENT_LIST, $folderData);
|
$listing=$oPluginRegistry->executeTriggers(PM_CASE_DOCUMENT_LIST, $folderData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
require_once 'classes/model/OutputDocument.php';
|
require_once 'classes/model/OutputDocument.php';
|
||||||
$oOutputDocument = new OutputDocument();
|
$oOutputDocument = new OutputDocument();
|
||||||
$aGields = $oOutputDocument->load($aFields['DOC_UID']);
|
$aGields = $oOutputDocument->load($aFields['DOC_UID']);
|
||||||
|
|||||||
Reference in New Issue
Block a user