Application->GetVar('simple_mode') && (int)$this->Application->ConfigValue('UsePopups'); } /** * Returns phrase count for given module * * @param Array $params * @return int * @access protected */ protected function PhraseCount($params) { static $cache = null; if (!isset($cache)) { $sql = 'SELECT COUNT(*), Module FROM ' . $this->getUnitConfig()->getTableName() . ' GROUP BY Module'; $cache = $this->Conn->GetCol($sql, 'Module'); } $module = $params['module']; return array_key_exists($module, $cache) ? $cache[$module] : 0; } /** * Returns e-mail template count for given module * * @param Array $params * @return int * @access protected */ protected function TemplateCount($params) { static $cache = null; if (!isset($cache)) { $sql = 'SELECT COUNT(*), IF(Module LIKE "Core:%", "Core", Module) AS Module FROM ' . $this->Application->getUnitConfig('email-template')->getTableName() . ' GROUP BY Module'; $cache = $this->Conn->GetCol($sql, 'Module'); } $module = $params['module']; return array_key_exists($module, $cache) ? $cache[$module] : 0; } /** * Determine if primary translation should be shown * * @param Array $params * @return string * @access protected */ protected function ShowSourceLanguage($params) { if ( $this->IsNewItem($params) ) { return false; } $object = $this->getObject($params); /* @var $object kDBItem */ $ml_helper = $this->Application->recallObject('kMultiLanguageHelper'); /* @var $ml_helper kMultiLanguageHelper */ return !$ml_helper->editingInSourceLanguage($object->GetDBField('TranslateFromLanguage')); } /** * Shows field label with %s replaced with source translation language * * @param Array $params * @return string * @access protected */ protected function SourceLanguageTitle($params) { $object = $this->getObject($params); /* @var $object kDBItem */ $ml_helper = $this->Application->recallObject('kMultiLanguageHelper'); /* @var $ml_helper kMultiLanguageHelper */ return $ml_helper->replaceSourceLanguage($object, $params['label']); } }