mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
do not call hook documentNavigationBar with callHook, but iterate over hookObjs
This commit is contained in:
parent
c3f5a637f6
commit
d3e6cecaa7
|
@ -751,21 +751,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
||||||
$menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document'));
|
$menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if hook exists because otherwise callHook() will override $menuitems */
|
/* Do not use $this->callHook() because $menuitems must be returned by the the
|
||||||
if($this->hasHook('documentNavigationBar'))
|
* first hook and passed to next hook. $this->callHook() will just pass
|
||||||
$menuitems = $this->callHook('documentNavigationBar', $document, $menuitems);
|
* the menuitems to each single hook. Hence, the last hook will win.
|
||||||
|
|
||||||
/* Do not use $this->callHook() because $menuitems must be returned by the hook
|
|
||||||
* or left unchanged
|
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
$hookObjs = $this->getHookObjects();
|
$hookObjs = $this->getHookObjects();
|
||||||
foreach($hookObjs as $hookObj) {
|
foreach($hookObjs as $hookObj) {
|
||||||
if (method_exists($hookObj, 'documentNavigationBar')) {
|
if (method_exists($hookObj, 'documentNavigationBar')) {
|
||||||
$menuitems = $hookObj->documentNavigationBar($this, $document, $menuitems);
|
$menuitems = $hookObj->documentNavigationBar($this, $document, $menuitems);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
self::showNavigationBar($menuitems);
|
self::showNavigationBar($menuitems);
|
||||||
|
|
||||||
|
|
|
@ -748,21 +748,16 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
||||||
$menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document'));
|
$menuitems['transfer_document'] = array('link'=>$this->params['settings']->_httpRoot."out/out.TransferDocument". $docid, 'label'=>getMLText('transfer_document'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if hook exists because otherwise callHook() will override $menuitems */
|
/* Do not use $this->callHook() because $menuitems must be returned by the the
|
||||||
if($this->hasHook('documentNavigationBar'))
|
* first hook and passed to next hook. $this->callHook() will just pass
|
||||||
$menuitems = $this->callHook('documentNavigationBar', $document, $menuitems);
|
* the menuitems to each single hook. Hence, the last hook will win.
|
||||||
|
|
||||||
/* Do not use $this->callHook() because $menuitems must be returned by the hook
|
|
||||||
* or left unchanged
|
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
$hookObjs = $this->getHookObjects();
|
$hookObjs = $this->getHookObjects();
|
||||||
foreach($hookObjs as $hookObj) {
|
foreach($hookObjs as $hookObj) {
|
||||||
if (method_exists($hookObj, 'documentNavigationBar')) {
|
if (method_exists($hookObj, 'documentNavigationBar')) {
|
||||||
$menuitems = $hookObj->documentNavigationBar($this, $document, $menuitems);
|
$menuitems = $hookObj->documentNavigationBar($this, $document, $menuitems);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
self::showNavigationBar($menuitems);
|
self::showNavigationBar($menuitems);
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user