mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
pass latest content to hooks. Fix php warnings
This commit is contained in:
parent
37478ecd89
commit
fc4d2edb57
|
@ -74,6 +74,7 @@ if($view) {
|
|||
$view->setParam('enableadminrevapp', $settings->_enableAdminRevApp);
|
||||
$view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp);
|
||||
$view->setParam('enableselfrevapp', $settings->_enableSelfRevApp);
|
||||
$view->setParam('enablehiddenrevapp', $settings->_enableHiddenRevApp);
|
||||
$view->setParam('enablereceiptworkflow', $settings->_enableReceiptWorkflow);
|
||||
$view->setParam('enableselfreceipt', $settings->_enableSelfReceipt);
|
||||
$view->setParam('dropfolderdir', $settings->_dropFolderDir);
|
||||
|
|
|
@ -69,6 +69,7 @@ $(document).ready(function() {
|
|||
$enableadminrevapp = $this->params['enableadminrevapp'];
|
||||
$enableownerrevapp = $this->params['enableownerrevapp'];
|
||||
$enableselfrevapp = $this->params['enableselfrevapp'];
|
||||
$enablehiddenrevapp = $this->params['enablehiddenrevapp'];
|
||||
$enablereceiptworkflow = $this->params['enablereceiptworkflow'];
|
||||
$enableselfreceipt = $this->params['enableselfreceipt'];
|
||||
$workflowmode = $this->params['workflowmode'];
|
||||
|
@ -203,18 +204,18 @@ $(document).ready(function() {
|
|||
$attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all));
|
||||
if($attrdefs) {
|
||||
foreach($attrdefs as $attrdef) {
|
||||
$arr = $this->callHook('editDocumentContentAttribute', $document, $attrdef);
|
||||
$arr = $this->callHook('editDocumentContentAttribute', $latestContent, $attrdef);
|
||||
if(is_array($arr)) {
|
||||
if($arr)
|
||||
$this->formField($arr[0], $arr[1], isset($arr[2]) ? $arr[2] : null);
|
||||
} elseif(is_string($arr)) {
|
||||
echo $arr;
|
||||
} else {
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $document->getAttribute($attrdef), 'attributes_version'));
|
||||
$this->formField(htmlspecialchars($attrdef->getName()), $this->getAttributeEditField($attrdef, $latestContent->getAttribute($attrdef), 'attributes_version'));
|
||||
}
|
||||
}
|
||||
}
|
||||
$arrs = $this->callHook('addDocumentContentAttributes', $document);
|
||||
$arrs = $this->callHook('addDocumentContentAttributes', $latestContent);
|
||||
if(is_array($arrs)) {
|
||||
foreach($arrs as $arr) {
|
||||
$this->formField($arr[0], $arr[1], isset($arr[2]) ? $arr[2] : null);
|
||||
|
|
Loading…
Reference in New Issue
Block a user