Index: branches/5.2.x/core/units/phrases/phrase_tp.php =================================================================== diff -u -N -r14748 -r15608 --- branches/5.2.x/core/units/phrases/phrase_tp.php (.../phrase_tp.php) (revision 14748) +++ branches/5.2.x/core/units/phrases/phrase_tp.php (.../phrase_tp.php) (revision 15608) @@ -1,6 +1,6 @@ Application->GetVar('simple_mode') && (int)$this->Application->ConfigValue('UsePopups'); } - function PhraseCount($params) + /** + * Returns phrase count for given module + * + * @param Array $params + * @return int + * @access protected + */ + protected function PhraseCount($params) { static $cache = null; @@ -43,13 +50,20 @@ return array_key_exists($module, $cache) ? $cache[$module] : 0; } - function EventCount($params) + /** + * 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)) { + if ( !isset($cache) ) { $sql = 'SELECT COUNT(*), IF(Module LIKE "Core:%", "Core", Module) AS Module - FROM ' . $this->Application->getUnitOption('emailevents', 'TableName') . ' + FROM ' . $this->Application->getUnitOption('email-template', 'TableName') . ' GROUP BY Module'; $cache = $this->Conn->GetCol($sql, 'Module'); }