protected function _load($sql, $values, $populate = true) { $return = parent::_load($sql, $values, $populate); if (Ajde_Lang::getInstance()->autoTranslateModels() && $return) { // get translation $lang = Ajde_Lang::getInstance(); if ($translation = $this->getTranslated($lang->getLang())) { /* @var $translation Ajde_Lang_Proxy_Model */ $this->reset(); $this->loadFromValues($translation->values()); } } return $return; }
protected function _load($sql, $values, $populate = true) { $return = parent::_load($sql, $values, $populate); if ($return && Ajde::app()->hasRequest() && Ajde::app()->getRequest()->getParam('filterPublished', false) == true) { $this->filterPublished(); } return $return; }