function execute() { $map = new ComponentMap_Article(); if (!$map->isAllowed('publish')) { return false; } return parent::execute(); }
/** * Adds filtering conditions to query string * * @param array $aWhere filter conditions * @param string $sSql query string * * @return string */ protected function _prepareWhereQuery($aWhere, $sSql) { $sSql = parent::_prepareWhereQuery($aWhere, $sSql); $sArtTable = getViewName('oxarticles', $this->_iEditLang); $sArtTitleField = "{$sArtTable}.oxtitle"; // if searching in article title field, updating sql for this case if ($this->_aWhere[$sArtTitleField]) { $sSqlForTitle = " (CONCAT( {$sArtTable}.oxtitle, if(isnull(oxparentarticles.oxtitle), '', oxparentarticles.oxtitle), {$sArtTable}.oxvarselect)) "; $sSql = getStr()->preg_replace("/{$sArtTable}\\.oxtitle\\s+like/", "{$sSqlForTitle} like", $sSql); } return $sSql; }