objectManager: Only init filterInfo when needed

This commit is contained in:
Alexander Nicolaysen Sørnes
2009-08-13 15:54:16 +02:00
parent 3668b29e8e
commit db6d9b5723

View File

@@ -64,8 +64,15 @@ class ObjectManager
return $this->sState; return $this->sState;
} }
private function initFilterInfo()
{
$this->oFilters = $this->getOptionalSetting('objectGetFilterInfo', FALSE);
}
public function getFilterInfoFromInput($aClean) public function getFilterInfoFromInput($aClean)
{ {
$this->initFilterInfo();
if($this->oFilters) if($this->oFilters)
$this->oFilters->readInput($aClean); $this->oFilters->readInput($aClean);
} }
@@ -132,7 +139,7 @@ class ObjectManager
$this->oMultiPage = new MultiPage(FALSE); $this->oMultiPage = new MultiPage(FALSE);
$this->oTableRow = new OMTableRow(null); $this->oTableRow = new OMTableRow(null);
$this->sState = 'accepted'; $this->sState = 'accepted';
$this->oFilters = $this->getOptionalSetting('objectGetFilterInfo', FALSE); $this->oFilters = null; // We only fill this when needed, as it can be quite slow
// initialize the common responses array // initialize the common responses array
$this->aCommonResponses = array(); $this->aCommonResponses = array();