original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Return the available Comm templates.
  
  @staticvar array $data
  @return array The tempalteId => subject list
docstring_tokens: Return the available Comm templates .