Application->GetVar('simple_mode') && (int)$this->Application->ConfigValue('UsePopups'); } function PhraseCount($params) { static $cache = null; if (!isset($cache)) { $sql = 'SELECT COUNT(*), Module FROM ' . $this->Application->getUnitOption($this->Prefix, 'TableName') . ' GROUP BY Module'; $cache = $this->Conn->GetCol($sql, 'Module'); } $module = $params['module']; return array_key_exists($module, $cache) ? $cache[$module] : 0; } function EventCount($params) { static $cache = null; if (!isset($cache)) { $sql = 'SELECT COUNT(*), IF(Module LIKE "Core:%", "Core", Module) AS Module FROM ' . $this->Application->getUnitOption('emailevents', 'TableName') . ' 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']); } }