示例#1
0
文件: Model.php 项目: nabble/ajde
 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;
 }
示例#2
0
 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;
 }