public function getCommTemplates($mailTarget = false)
    {
        static $data;

        if (! $data) {
            $sql = 'SELECT gct_id_template, gct_name FROM gems__comm_templates ';
            if ($mailTarget) {
                $sql .= 'WHERE gct_target = ? ';
            }
            $sql .= 'ORDER BY gct_name';

            if ($mailTarget) {
                $data = $this->db->fetchPairs($sql, $mailTarget);
            } else {
                $data = $this->db->fetchPairs($sql);
            }
        }

        return $data;
    }
public function getCommTemplates($mailTarget = false)
    {
        static $data;

        if (! $data) {
            $sql = 'SELECT gct_id_template, gct_name FROM gems__comm_templates ';
            if ($mailTarget) {
                $sql .= 'WHERE gct_target = ? ';
            }
            $sql .= 'ORDER BY gct_name';

            if ($mailTarget) {
                $data = $this->db->fetchPairs($sql, $mailTarget);
            } else {
                $data = $this->db->fetchPairs($sql);
            }
        }

        return $data;
    }
public function getCommTemplates ( $ mailTarget = false ) { static $ data ; if ( ! $ data ) { $ sql = 'SELECT gct_id_template, gct_name FROM gems__comm_templates ' ; if ( $ mailTarget ) { $ sql .= 'WHERE gct_target = ? ' ; } $ sql .= 'ORDER BY gct_name' ; if ( $ mailTarget ) { $ data = $ this -> db -> fetchPairs ( $ sql , $ mailTarget ) ; } else { $ data = $ this -> db -> fetchPairs ( $ sql ) ; } } return $ data ; }
Return the available Comm templates.

@staticvar array $data
@return array The tempalteId => subject list
Return the available Comm templates .