mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +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'));
|
||||
}
|
||||
|
||||
/* Check if hook exists because otherwise callHook() will override $menuitems */
|
||||
if($this->hasHook('documentNavigationBar'))
|
||||
$menuitems = $this->callHook('documentNavigationBar', $document, $menuitems);
|
||||
|
||||
/* Do not use $this->callHook() because $menuitems must be returned by the hook
|
||||
* or left unchanged
|
||||
/* Do not use $this->callHook() because $menuitems must be returned by the the
|
||||
* first hook and passed to next hook. $this->callHook() will just pass
|
||||
* the menuitems to each single hook. Hence, the last hook will win.
|
||||
*/
|
||||
/*
|
||||
$hookObjs = $this->getHookObjects();
|
||||
foreach($hookObjs as $hookObj) {
|
||||
if (method_exists($hookObj, 'documentNavigationBar')) {
|
||||
$menuitems = $hookObj->documentNavigationBar($this, $document, $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'));
|
||||
}
|
||||
|
||||
/* Check if hook exists because otherwise callHook() will override $menuitems */
|
||||
if($this->hasHook('documentNavigationBar'))
|
||||
$menuitems = $this->callHook('documentNavigationBar', $document, $menuitems);
|
||||
|
||||
/* Do not use $this->callHook() because $menuitems must be returned by the hook
|
||||
* or left unchanged
|
||||
/* Do not use $this->callHook() because $menuitems must be returned by the the
|
||||
* first hook and passed to next hook. $this->callHook() will just pass
|
||||
* the menuitems to each single hook. Hence, the last hook will win.
|
||||
*/
|
||||
/*
|
||||
$hookObjs = $this->getHookObjects();
|
||||
foreach($hookObjs as $hookObj) {
|
||||
if (method_exists($hookObj, 'documentNavigationBar')) {
|
||||
$menuitems = $hookObj->documentNavigationBar($this, $document, $menuitems);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
self::showNavigationBar($menuitems);
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user