diff --git a/application/menunode.class.inc.php b/application/menunode.class.inc.php index f1612fe06..19f4b7fd2 100644 --- a/application/menunode.class.inc.php +++ b/application/menunode.class.inc.php @@ -641,13 +641,20 @@ class OQLMenuNode extends MenuNode * @param integer $iAllowedResults Expected "rights" for the action: either UR_ALLOWED_YES, UR_ALLOWED_NO, UR_ALLOWED_DEPENDS or a mix of them... * @return MenuNode */ - public function __construct($sMenuId, $sOQL, $iParentIndex, $fRank = 0, $bSearch = false, $sEnableClass = null, $iActionCode = null, $iAllowedResults = UR_ALLOWED_YES, $sEnableStimulus = null, $bSearchFormOpen = true) + public function __construct($sMenuId, $sOQL, $iParentIndex, $fRank = 0, $bSearch = false, $sEnableClass = null, $iActionCode = null, $iAllowedResults = UR_ALLOWED_YES, $sEnableStimulus = null, $bSearchFormOpen = null) { parent::__construct($sMenuId, $iParentIndex, $fRank, $sEnableClass, $iActionCode, $iAllowedResults, $sEnableStimulus); $this->sPageTitle = "Menu:$sMenuId+"; $this->sOQL = $sOQL; $this->bSearch = $bSearch; - $this->bSearchFormOpen = $bSearchFormOpen; + if ($bSearchFormOpen == null) + { + $this->bSearchFormOpen = MetaModel::GetConfig()->Get('legacy_search_drawer_open'); + } + else + { + $this->bSearchFormOpen = $bSearchFormOpen; + } $this->m_aParams = array(); $this->aReflectionProperties['oql'] = $sOQL; $this->aReflectionProperties['do_search'] = $bSearch; diff --git a/application/ui.extkeywidget.class.inc.php b/application/ui.extkeywidget.class.inc.php index a430dface..574e91e17 100644 --- a/application/ui.extkeywidget.class.inc.php +++ b/application/ui.extkeywidget.class.inc.php @@ -328,9 +328,10 @@ EOF $aParams = array(); $oFilter = new DBObjectSearch($this->sTargetClass); } + $bOpen = MetaModel::GetConfig()->Get('legacy_search_drawer_open'); $oFilter->SetModifierProperty('UserRightsGetSelectFilter', 'bSearchMode', $this->bSearchMode); $oBlock = new DisplayBlock($oFilter, 'search', false, $aParams); - $sHTML .= $oBlock->GetDisplay($oPage, $this->iId, array('open' => true, 'currentId' => $this->iId)); + $sHTML .= $oBlock->GetDisplay($oPage, $this->iId, array('open' => $bOpen, 'currentId' => $this->iId)); $sHTML .= "